:root {
  --primary: #ffb300;
  --primary-dark: #ff8c00;
  --secondary: #1f2937;
  --bg-body: #f3f4f6;
  --bg-white: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --danger: #ef4444;
  --success: #10b981;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --sidebar-width: 260px;
  --header-height: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Tajawal", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  background: var(--bg-white);
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: var(--shadow);
  z-index: 1001;
  direction: ltr;
}

.logo-mobile {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.menu-toggle-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--secondary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}

.menu-toggle-btn:active {
  background: #f3f4f6;
}

.logo-mobile {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--secondary);
  color: var(--bg-white);
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 1050;
  transition: transform 0.3s ease-in-out;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.sidebar-header h2 {
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 800;
}

.sidebar nav a {
  color: #d1d5db;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 14px 30px;
  font-weight: 500;
  transition: all 0.3s;
  border-right: 4px solid transparent;
}

.sidebar nav a i {
  width: 30px;
  margin-left: 10px;
  font-size: 1.1rem;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  border-right-color: var(--primary);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
  color: #fca5a5;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 10px 30px;
  font-size: 0.95rem;
}

.main {
  margin-right: var(--sidebar-width);
  flex: 1;
  padding: 40px;
  width: 100%;
  transition: margin-right 0.3s ease-in-out;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--bg-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(255, 140, 0, 0.2);
  font-size: 1rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn-danger {
  background: #e74c3c;
  box-shadow: 0 4px 6px rgba(231, 76, 60, 0.2);
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--primary);
}

.card-header h2 {
  font-size: 1.4rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: #f9fafb;
  transition: border 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: #fff;
}

.full-width {
  grid-column: 1 / -1;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: inset -10px 0 10px -10px rgba(0, 0, 0, 0.1);
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  min-width: 600px;
}

.products-table th,
.products-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: right;
  font-size: 0.9rem;
  white-space: nowrap;
}

.products-table th {
  background: #f9f9f9;
  color: var(--text-main);
  font-weight: 700;
}

.products-table td img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #eee;
}

.actions {
  display: flex;
  gap: 8px;
}

.actions button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 80px;
}

.edit-btn {
  background: var(--primary);
  color: #fff;
}

.delete-btn {
  background: var(--danger);
  color: #fff;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main {
    margin-right: 0;
    padding: 80px 20px 20px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .page-header h1 {
    text-align: center;
    font-size: 1.5rem;
  }

  .btn {
    width: 100%;
    padding: 14px;
  }

  .card {
    padding: 15px;
  }

  .table-responsive {
    margin-right: -15px;
    margin-left: -15px;
    border-radius: 0;
    border: none;
    padding: 10px 15px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

/* Login Page Styles */
.login-container {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.logo img {
  width: 140px;
  margin-bottom: 25px;
}

.login-container h1 {
  font-size: 1.7rem;
  color: var(--bg-white);
  margin-bottom: 25px;
  text-align: center;
}

.login-container form {
  background: var(--bg-white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.login-container small {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #ddd;
  font-size: 0.85rem;
}

.login-container small a {
  color: var(--bg-white);
  text-decoration: underline;
}

/* Public Review Page Styles */
#productsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.prod-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prod-card img {
  width: 100%;
  height: 150px;
  object-fit: fill;
  border-radius: 8px;
}

.prod-card h3 {
  font-size: 1.2rem;
  text-align: center;
  color: var(--text-main);
}

.prod-card .price {
  color: var(--primary);
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.prod-card button {
  margin-top: auto;
}

.page-section {
  display: none;
}

.page-section.active-section {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stats-grid .card {
  min-height: 120px;
  padding: 22px;
  text-align: center;
}

.stats-grid .card h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

.stats-grid .card p {
  margin: 0;
  color: var(--text-muted);
}

/* للموبايل */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.good {
  background: #dcfce7;
  color: #166534;
}

.badge.ok {
  background: #fef9c3;
  color: #854d0e;
}

.badge.bad {
  background: #fee2e2;
  color: #991b1b;
}

.badge.neutral {
  background: #e5e7eb;
  color: #374151;
}

.sidebar-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.rating-group {
  margin-bottom: 18px;
}

.star-rating {
  display: flex;
  gap: 8px;
  font-size: 34px;
  cursor: pointer;
  direction: ltr;
  justify-content: center;
  margin-top: 8px;
}

.star-rating span {
  color: #d1d5db;
  transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating span.active {
  color: #f59e0b;
}

.star-rating span:hover {
  transform: scale(1.15);
}

.public-header {
  background: var(--bg-white);
  padding: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.public-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.public-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

/* Mobile */
@media (max-width: 768px) {

  .public-header {
    padding: 12px;
  }

  .public-logo {
    width: 55px;
    height: 55px;
  }

  .public-title {
    font-size: 18px;
  }
}

.welcome-message {
  text-align: center;
  margin: 20px auto;
  color: var(--text-muted);
  font-size: 15px;
}

/* body {
  display: block !important;
  width: 100%;
  min-height: 100vh;
} */

.public-main {
  width: 100%;
  max-width: 800px;
  margin: 0 auto !important;
  padding: 40px 20px;
  box-sizing: border-box;
}

.public-footer {
  width: 100%;
  max-width: 800px;
  margin: 40px auto 0 auto !important;
  padding: 30px 20px;
  box-sizing: border-box;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border-top: 1px solid #eee;
}

.footer-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px auto !important;
}

.footer-title,
.footer-subtitle {
  width: 100%;
  text-align: center !important;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar nav a i {
  width: 20px;
  text-align: center;
}

.products-mobile-list {
  display: none;
}

@media (max-width: 768px) {
  .table-responsive {
    display: none;
  }

  .products-mobile-list {
    display: block;
  }

  .mobile-product-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
  }

  .mobile-product-top {
    display: flex;
    gap: 14px;
    align-items: center;
  }

  .mobile-product-top img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #eee;
  }

  .mobile-product-info {
    flex: 1;
  }

  .mobile-product-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
  }

  .mobile-product-info p {
    margin: 0 0 6px;
    font-weight: 800;
  }

  .mobile-product-rating {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
  }

  .mobile-product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .mobile-product-actions .btn {
    grid-column: 1 / -1;
  }

  .mobile-product-actions button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .mobile-product-actions button {
    border: none !important;
    border-radius: 10px;
    height: 42px;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  }

  .mobile-product-actions .edit-btn {
    background: var(--primary);
    color: #fff;
  }

  .mobile-product-actions .delete-btn {
    background: var(--danger);
    color: #fff;
  }

  .mobile-product-actions .btn {
    height: 54px;
    border-radius: 14px;
    font-size: 18px;
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 10px;
}

.auth-title {
  margin: 0;
  color: var(--primary);
  font-size: 36px;
  font-weight: 800;
}

.auth-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 15px;
}

.auth-link a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  margin-right: 5px;
}

.auth-link a:hover {
  text-decoration: underline;
}

.auth-tagline {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

body.register-page {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.register-page .auth-header {
  text-align: center;
  margin-bottom: 25px;
  color: #fff;
}

.register-page .auth-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.register-page .auth-title {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

.register-page .auth-subtitle,
.register-page .auth-tagline {
  color: rgba(255, 255, 255, 0.9);
}

.register-page form {
  width: 100%;
  max-width: 520px;
}

.auth-page {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-page form {
  width: 100%;
  max-width: 460px;
}

.auth-page .auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-page .auth-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.auth-page .auth-title {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

.auth-page .auth-subtitle,
.auth-page .auth-tagline {
  color: rgba(255, 255, 255, 0.9);
}

.auth-link {
  text-align: center;
  margin-top: 20px;
  color: var(--text-main);
  font-size: 15px;
}

.auth-link a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
  margin-right: 6px;
}

.auth-link a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .auth-page {
    justify-content: flex-start;
    padding-top: 35px;
  }

  .auth-page form {
    padding: 28px 22px;
  }

  .auth-page .auth-title {
    font-size: 26px;
  }

  .auth-page .auth-logo {
    width: 70px;
    height: 70px;
  }
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 25px;
}

.qr-actions .btn {
  width: 100%;
  height: 56px;
}

.qr-info {
  text-align: center;
  margin-bottom: 20px;
}

.qr-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

.qr-subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 25px;
}

.qr-actions .btn {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
}

.branch-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.branch-card p {
  margin: 5px 0;
  color: var(--text-muted);
}

.branch-card a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.branch-delete-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-delete-btn:hover {
  background: #dc2626;
}

.branch-stat-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  line-height: 1.8;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
}

.status-badge.visible {
  background: #dcfce7;
  color: #166534;
}

.status-badge.hidden {
  background: #f3f4f6;
  color: #6b7280;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-weight: 600;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 30px;
  cursor: pointer;
  transition: .3s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  right: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

.switch input:checked+.slider {
  background: #f59e0b;
}

.switch input:checked+.slider:before {
  transform: translateX(-24px);
}

/* Landing Page */
.landing-page {
  display: block !important;
  background: #f8fafc;
}

.landing-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary-dark);
}

.landing-brand img {
  height: 75px;
  width: auto;
  object-fit: contain;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.landing-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white !important;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 140, 0, .25);
}

.landing-btn.small {
  padding: 10px 18px;
}

.landing-btn.secondary {
  background: #1f2937;
}

.hero-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 52px;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 650px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.phone-preview {
  width: 320px;
  background: white;
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .12);
  text-align: center;
}

.preview-logo {
  color: var(--primary-dark);
  font-weight: 800;
  margin-bottom: 20px;
}

.phone-preview h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

.phone-preview p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.preview-product {
  background: #f9fafb;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.preview-product button {
  border: none;
  background: var(--primary-dark);
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 800;
}

.preview-stars {
  color: #f59e0b;
  font-size: 24px;
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 24px;
  text-align: center;
}

.landing-section.light {
  background: white;
  max-width: 100%;
}

.landing-section h2,
.landing-cta h2 {
  font-size: 36px;
  margin-bottom: 35px;
}

.features-grid,
.steps-grid,
.pricing-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.features-grid {
  grid-template-columns: repeat(3, 1fr);
}

.steps-grid {
  grid-template-columns: repeat(4, 1fr);
}

.pricing-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.step-card,
.price-card {
  background: white;
  padding: 28px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}

.feature-card {
  font-size: 32px;
}

.feature-card h3,
.step-card h3,
.price-card h3 {
  font-size: 22px;
  margin: 12px 0;
}

.feature-card p,
.step-card p,
.price-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

.step-card span {
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.price-card .price {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 16px 0;
}

.price-card ul {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  line-height: 2;
  color: var(--text-main);
}

.price-card.featured {
  border: 3px solid var(--primary);
  transform: translateY(-10px);
}

.landing-cta {
  margin: 40px auto;
  padding: 70px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.landing-cta p {
  margin-bottom: 25px;
  font-size: 18px;
}

.landing-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .landing-header {
    flex-direction: column;
    gap: 15px;
  }

  .landing-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 30px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content p {
    font-size: 17px;
  }

  .hero-actions {
    justify-content: center;
  }

  .features-grid,
  .steps-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .price-card.featured {
    transform: none;
  }
}

.price-box {
  margin: 18px 0;
  text-align: center;
}

.old-price {
  color: #9ca3af;
  font-size: 22px;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  margin-bottom: 6px;
}

.new-price {
  color: var(--primary-dark);
  font-size: 36px;
  font-weight: 900;
}

.discount-note {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.selected-plan-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
  font-weight: 700;
}

.subscription-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 16px;
  line-height: 2;
  font-weight: 600;
  color: #7c2d12;
}

.admin-theme {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
}

@media (max-width: 768px) {
  .admin-theme #restaurantsSection .admin-table-responsive {
    display: none !important;
  }

  .admin-theme #restaurantsSection .admin-mobile-list {
    display: block !important;
  }

  .admin-mobile-card {
    padding: 18px;
    margin-bottom: 18px;
  }

  .admin-mobile-card p {
    margin: 8px 0;
  }

  .admin-mobile-card .btn {
    width: 100%;
    margin-top: 22px;
    height: 54px;
    border-radius: 14px;
  }
}

/* Desktop default */
.admin-theme .admin-mobile-list {
  display: none !important;
}

/* Mobile only */
@media (max-width: 768px) {
  .admin-theme #restaurantsSection .admin-table-responsive {
    display: none !important;
  }

  .admin-theme #restaurantsSection .admin-mobile-list {
    display: block !important;
  }
}

.admin-restaurant-summary {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  line-height: 1.9;
}

.admin-restaurant-summary h3 {
  margin-bottom: 8px;
}

.admin-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.admin-quick-actions a,
.admin-quick-actions button {
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: #e5e7eb;
  color: #111827;
}

.admin-quick-actions .primary {
  background: var(--primary);
  color: white;
}

.admin-profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.admin-tab-btn {
  border: none;
  background: #e5e7eb;
  padding: 10px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-activity-item {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  line-height: 1.7;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-tools-grid a,
.admin-tools-grid button {
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: #e5e7eb;
  color: #111827;
}

.admin-tools-grid .primary {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 600px) {
  .admin-profile-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .admin-tools-grid {
    grid-template-columns: 1fr;
  }
}

.activity-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
}

.activity-changes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.activity-change-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.activity-field {
  font-weight: 700;
  margin-bottom: 8px;
}

.activity-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.old-value {
  background: #fee2e2;
  color: #991b1b;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.new-value {
  background: #dcfce7;
  color: #166534;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.change-arrow {
  color: #6b7280;
  font-weight: 800;
}

.activity-meta {
  margin-top: 12px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.7;
}

.admin-plan-card .btn {
  margin-top: 18px;
}

.admin-plan-features {
  margin-bottom: 18px;
  line-height: 2;
}

.admin-plan-limits {
  margin-bottom: 14px;
}

.admin-plan-card button.btn {
  display: block;
  width: fit-content;
  min-width: 180px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .admin-plan-card button.btn {
    width: 100%;
  }
}

@font-face {
  font-family: 'TajawalInvoice';
  src: url('data:font/truetype;base64,${regularFontBase64}') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'TajawalInvoice';
  src: url('data:font/truetype;base64,${boldFontBase64}') format('truetype');
  font-weight: 700 900;
  font-style: normal;
}

html,
body,
div,
span,
p,
table,
thead,
tbody,
tr,
th,
td,
h1,
h2,
h3,
strong {
  font-family: 'TajawalInvoice', sans-serif !important;
}

.subscription-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.subscription-status.active {
  background: #dcfce7;
  color: #166534;
}

.subscription-status.trial,
.subscription-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.subscription-status.paused,
.subscription-status.expired,
.subscription-status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.hidden {
  display: none !important;
}

.main-branch-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.branch-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.branch-action-btn {
  min-width: 90px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.branch-delete-btn {
  background: #fee2e2;
  color: #b91c1c;
}

.branch-delete-btn:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

.branch-location-btn {
  background: #dbeafe;
  color: #1d4ed8;
}

.branch-location-btn:hover {
  background: #bfdbfe;
}

.main-branch-badge {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
  font-weight: 700;
}

.confirm-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 28px;
}

.confirm-actions button {
  min-width: 140px;
  height: 46px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.confirm-actions button:hover {
  transform: translateY(-2px);
}

.confirm-actions button:active {
  transform: translateY(0);
}

#confirmBranchDelete {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

#confirmBranchDelete:hover {
  background: #b91c1c;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.3);
}

#cancelBranchDelete {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

#cancelBranchDelete:hover {
  background: #e2e8f0;
}

#confirmBranchDelete:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 520px) {
  .confirm-actions {
    flex-direction: column;
  }

  .confirm-actions button {
    width: 100%;
  }
}

.branch-edit-btn {
  background: #dbeafe;
  color: #1d4ed8;
}

.branch-edit-btn:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 12px 22px;

  background: #ffffff;
  color: #475569;

  border: 1px solid #dbe3ef;
  border-radius: 12px;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  transition: .25s;
}

.secondary-btn:hover {
  background: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .10);
}

.secondary-btn:active {
  transform: translateY(0);
}

.selected-branch-title {
  margin: 12px 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 800;
  text-align: center;
}

#branchSelectGroup {
  margin-bottom: 20px;
}

#branchSelectGroup label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

#branchSelect {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  background-color: #fff;
  color: #1f2937;
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
  cursor: pointer;
  outline: none;
}

#branchSelect:focus {
  border-color: #ff9800;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

#branchSelect:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.qr-modal {
  max-width: 420px;
  text-align: center;
}

#qrContainer {
  width: 360px;
  height: 360px;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border-radius: 16px;
}

.qr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.qr-actions button {
  flex: 1;
}

.branch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.show-qr-btn i {
  font-size: 18px;
}

.hidden {
  display: none !important;
}

.restaurant-qr-container {
  width: 320px;
  min-height: 320px;
  margin: 25px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-radius: 16px;
}

@media (max-width: 480px) {
  .restaurant-qr-container {
    width: 100%;
    min-height: auto;
  }

  .restaurant-qr-container canvas,
  .restaurant-qr-container svg {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #menuToggle {
    position: absolute;
    right: 20px;
    left: auto;
  }

  .topbar .brand {
    position: absolute;
    left: 20px;
    right: auto;
  }
}

.hidden {
  display: none !important;
}

.otp-success {
  margin-top: 10px;
  color: #15803d;
  font-weight: 700;
}

.archived-branches-card {
  margin-top: 20px;
}

.archived-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 30px;
  height: 30px;
  padding: 0 9px;

  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;

  font-size: 14px;
  font-weight: 700;
}

.archived-branch-card {
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  opacity: 0.9;
}

.archived-branch-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.archived-branch-badge {
  display: inline-flex;
  align-items: center;

  padding: 4px 9px;
  border-radius: 999px;

  background: #e5e7eb;
  color: #4b5563;

  font-size: 12px;
  font-weight: 700;
}

.branch-reactivate-btn {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.branch-reactivate-btn:hover {
  background: #dcfce7;
}

.branch-reactivate-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.archived-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 130px;
  padding: 24px;

  color: var(--text-muted);
  text-align: center;
}

.archived-empty-state i {
  margin-bottom: 10px;
  font-size: 28px;
  color: #9ca3af;
}

.archived-empty-state p {
  margin: 0;
}

.subscription-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  width: 100%;
  padding: 7px 0;

  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.subscription-detail-row:last-child {
  border-bottom: none;
}

.subscription-detail-label {
  display: flex;
  align-items: center;
  gap: 7px;

  color: var(--text-color);
}

.subscription-detail-value {
  flex-shrink: 0;
  color: var(--primary-color);
}