/* Portal unified styles (R1.9.2) */

/* ===================================================================
   Enterprise White Theme – Visual & Interaction Tokens (R1.10.0)
   =================================================================== */
:root {
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;

  /* Spacing scale (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  /* Borders */
  --border-light: #D0D7DE;
  --border-medium: #959DA5;

  /* Primary colors */
  --primary: #0052CC;
  --primary-hover: #0747A6;
  --primary-focus: #2188FF;

  /* Text colors */
  --text-heading: #1F2937;
  --text-body: #4B5563;
  --text-strong: #24292F;

  /* Surfaces */
  --surface-base: #FFFFFF;
  --surface-muted: #F6F8FA;
  --surface-soft: #F1F5F9;

  /* Shadows (elevation) */
  --shadow-level-1: 0 1px 3px rgba(27, 31, 35, 0.12);
  --shadow-level-3: 0 8px 24px rgba(149, 157, 165, 0.20);
}

/* Global body reset for portal */
body {
  background-color: #F6F8FA;
  color: var(--text-body);
  font-family: var(--font-sans);
}

/* Anchor defaults */
a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-hover);
}

/* Focus-visible state */
:focus-visible {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

/* Disabled state */
[disabled],
.is-disabled {
  opacity: 0.5;
  color: #959DA5 !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Buttons – base + variants */
button,
.btn-primary,
.btn-secondary,
.btn-link {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  min-height: 36px;
  border-radius: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background-color: var(--surface-base);
  color: var(--text-body);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-link:hover {
  background-color: #F6F8FA;
}

button:active,
.btn-primary:active,
.btn-secondary:active,
.btn-link:active {
  background-color: #EAEEF2;
}

/* Primary button */
.btn-primary,
.search-row button,
.table-actions .btn-primary,
button.primary {
  background-color: #0052CC;
  color: #FFFFFF;
  border-color: #0052CC;
  box-shadow: var(--shadow-level-1);
}

.btn-primary:hover,
.search-row button:hover,
.table-actions .btn-primary:hover,
button.primary:hover {
  background-color: #0747A6;
}

.btn-primary:active,
.search-row button:active,
.table-actions .btn-primary:active,
button.primary:active {
  background-color: #0747A6;
}

/* Secondary button */
.btn-secondary,
button.secondary {
  background-color: #FFFFFF;
  color: #24292F;
  border-color: var(--border-light);
  box-shadow: none;
}

.btn-secondary:hover,
button.secondary:hover {
  background-color: #F6F8FA;
}

/* Danger button */
button.danger,
.btn-danger {
  background-color: #DE350B;
  color: #FFFFFF;
  border-color: #DE350B;
}

/* Link-style buttons */
.btn-link {
  background-color: transparent;
  border-color: transparent;
  padding: 0;
  min-height: auto;
}

.btn-link:hover {
  background-color: transparent;
  text-decoration: underline;
}

/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 0.86rem;
  background-color: #FFFFFF;
  color: #000000;
  box-sizing: border-box;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
  background-color: #F6F8FA;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
  border-color: var(--primary-focus);
}

/* Validation states */
.is-invalid input,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: #FA4545;
}

.is-valid input,
input.is-valid,
textarea.is-valid,
select.is-valid {
  border-color: #34C759;
}

label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 4px;
  font-weight: 500;
  color: #24292F;
}

/* Cards & panels */
.panel,
.admin-card,
.section-card {
  background-color: var(--surface-base);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-level-1);
  padding: 16px;
  margin-bottom: 16px;
}

.panel h2,
.admin-card h2,
.section-card .section-title {
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.admin-content {
  background: #F6F8FA;
}

/* Design tokens (reuse root variables where possible) */
:root {
  --transition: all 0.25s ease;
}

/* Aggregated from portal pages */


body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"] {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

.search-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.search-row button {
  padding: .6rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

th,
td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

th {
  font-weight: 700;
  color: var(--dark);
  background: #f3f4f6;
}

tr:last-child td {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  background: #e5e7eb;
  color: #374151;
}

.tag.open {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.tag.in_progress {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.tag.closed {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.btn-link:hover {
  background: var(--primary-dark);
  color: #fff;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"],
select {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
  margin-bottom: .5rem;
}

input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

button {
  padding: .7rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

.msg {
  font-size: .85rem;
  margin-bottom: .5rem;
  padding: .55rem .7rem;
  border-radius: .7rem;
}

.msg.err {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #b91c1c;
}

.embed-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: .8rem;
  font-size: .8rem;
  border: 1px dashed #d1d5db;
  direction: ltr;
  text-align: left;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .75rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .4rem .6rem;
  border-radius: .6rem;
  font-size: .8rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .15rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 1.5rem 1.75rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .8rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.card h3 {
  font-size: .9rem;
  margin: 0 0 .25rem;
  color: var(--dark);
}

.card p {
  margin: 0;
  font-size: .8rem;
  color: var(--gray);
}

.card .stat {
  display: flex;
  justify-content: space-between;
  margin-top: .4rem;
  font-size: .8rem;
}

.card .stat span strong {
  color: var(--primary-dark);
}

.card .demo-links {
  font-size: .75rem;
  margin-top: .5rem;
}

.card .demo-links a {
  color: var(--primary);
  text-decoration: none;
}

.card .demo-links a:hover {
  text-decoration: underline;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.section-card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
}

.section-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
  margin-top: .3rem;
}

th,
td {
  padding: .35rem .4rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

th {
  color: var(--gray);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

.empty {
  font-size: .75rem;
  color: #9ca3af;
  margin-top: .25rem;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .7rem;
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"] {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

.search-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.search-row button {
  padding: .6rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

th,
td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

th {
  font-weight: 700;
  color: var(--dark);
  background: #f3f4f6;
}

tr:last-child td {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  background: #e5e7eb;
  color: #374151;
}

.tag.pending {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.tag.confirmed {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.tag.canceled {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.95rem;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"] {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

.search-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.search-row button {
  padding: .6rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

th,
td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

th {
  font-weight: 700;
  color: var(--dark);
  background: #f3f4f6;
}

tr:last-child td {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  background: #e5e7eb;
  color: #374151;
}

.tag.active {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.tag.suspended {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.tag.trial {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.tag.pending {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.actions a {
  font-size: .78rem;
  margin-left: .25rem;
  text-decoration: none;
  color: var(--primary);
}

.actions a:hover {
  text-decoration: underline;
}

.btn-small {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: none;
  background: #10b981;
  color: #fff;
  font-size: .8rem;
  cursor: pointer;
}

.btn-small:hover {
  background: #059669;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
  margin-bottom: .5rem;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

button {
  padding: .7rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

.msg {
  font-size: .85rem;
  margin-bottom: .5rem;
  padding: .55rem .7rem;
  border-radius: .7rem;
}

.msg.ok {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.5);
  color: #15803d;
}

.msg.err {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #b91c1c;
}

.embed-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: .8rem;
  font-size: .8rem;
  border: 1px dashed #d1d5db;
  direction: ltr;
  text-align: left;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.settings-tabs {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid #e5e7eb;
}

.settings-tab-link {
  padding: .6rem 1.4rem;
  font-size: .9rem;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  margin-bottom: -1px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}

.settings-tab-link:hover {
  background: #f3f4f6;
}

.settings-tab-link.active {
  background: #ffffff;
  color: #111827;
  font-weight: 600;
}

.settings-tab-pane {
  display: none;
  padding: 1.1rem 1.1rem .4rem;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 12px 12px;
  border-top: none;
  background: #ffffff;
}

.settings-tab-pane.active {
  display: block;
}

.field-group {
  margin-bottom: .75rem;
}

.field-group label {
  margin-bottom: .2rem;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  font-size: .9rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

label {
  display: block;
  font-size: .85rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"] {
  width: 100%;
  padding: .6rem .7rem;
  border-radius: .6rem;
  border: 1px solid #d1d5db;
  font-size: .85rem;
  background: #f9fafb;
  box-sizing: border-box;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

.search-row {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.search-row button {
  padding: .6rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--primary-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

th,
td {
  padding: .5rem .6rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

th {
  font-weight: 700;
  color: var(--dark);
  background: #f3f4f6;
}

tr:last-child td {
  border-bottom: none;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .75rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .4rem .6rem;
  border-radius: .6rem;
  font-size: .8rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .15rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 1.5rem 1.75rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .8rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .9rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

label {
  display: block;
  font-size: .8rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input,
select,
textarea {
  width: 100%;
  padding: .55rem .65rem;
  border-radius: .7rem;
  border: 1px solid #e5e7eb;
  margin-bottom: .5rem;
  font-size: .8rem;
  background: #f9fafb;
  box-sizing: border-box;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

button {
  padding: .6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: var(--secondary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .25rem;
}

button:hover {
  background: #059669;
}

.msg {
  font-size: .78rem;
  margin-bottom: .5rem;
  padding: .45rem .6rem;
  border-radius: .7rem;
}

.msg.ok {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.5);
  color: #15803d;
}

.msg.err {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #b91c1c;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.small {
  font-size: .75rem;
  color: var(--gray);
}



body {
  background: var(--light);
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
}

.auth-card {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.8rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--primary);
  font-weight: 700;
}

.auth-logo i {
  font-size: 1.4rem;
}

.auth-title {
  margin-bottom: .25rem;
  font-size: 1.2rem;
}

.auth-sub {
  font-size: .85rem;
  color: var(--gray);
  margin-bottom: 1.2rem;
}

.auth-back a {
  font-size: .8rem;
  color: var(--primary);
  text-decoration: none;
}

.auth-back a i {
  margin-left: .25rem;
}

label {
  display: block;
  font-size: .8rem;
  margin-bottom: .25rem;
  font-weight: 600;
  color: var(--dark);
}

input,
select {
  width: 100%;
  padding: .55rem .65rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  margin-bottom: .6rem;
  font-size: .8rem;
  background: #f9fafb;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

button {
  width: 100%;
  padding: .65rem 0;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .25rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.errors {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #b91c1c;
  border-radius: 12px;
  padding: .5rem .6rem;
  font-size: .8rem;
  margin-bottom: .6rem;
}

.hint {
  font-size: .75rem;
  color: var(--gray);
  margin-top: .75rem;
  line-height: 1.6;
}

.hint code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: .7rem;
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.page {
  max-width: 1080px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.page-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.page-subtitle {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .85rem;
}

.rules-table th,
.rules-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: .45rem .4rem;
  text-align: right;
}

.rules-table th {
  background: #f9fafb;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0 .4rem;
  border-radius: 999px;
  font-size: .7rem;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-muted {
  background: #e5e7eb;
  color: #374151;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: .7rem;
}

.form-row>div {
  flex: 1 1 140px;
}

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: .35rem .4rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: .8rem;
}

textarea {
  min-height: 70px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .8rem;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #374151;
}

.btn-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.flash {
  padding: .4rem .6rem;
  border-radius: 8px;
  margin-bottom: .5rem;
  font-size: .8rem;
}

.flash-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.flash-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: linear-gradient(to top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1.3rem 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .75rem;
  font-size: .85rem;
}

.field {
  min-width: 180px;
}

.field-label {
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: .15rem;
  font-size: .8rem;
}

.field-value {
  color: var(--dark);
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: .6rem .7rem;
  border-radius: .7rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: .85rem;
  box-sizing: border-box;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

select {
  padding: .4rem .6rem;
  border-radius: .7rem;
  border: 1px solid #d1d5db;
  font-size: .84rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

.btn-primary {
  padding: .55rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  background: #e5e7eb;
  color: #374151;
}

.tag.open {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}

.tag.in_progress {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.tag.closed {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.alert {
  padding: .5rem .8rem;
  border-radius: .75rem;
  font-size: .82rem;
  margin-bottom: .75rem;
}

.alert.success {
  background: rgba(22, 163, 74, 0.06);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.btn-link:hover {
  background: var(--primary-dark);
  color: #fff;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  background: var(--light);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 240px;
  background: var(--dark);
  color: #e5e7eb;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: .8rem;
  color: #9ca3af;
  margin: .5rem 0 .25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: .5rem .7rem;
  border-radius: .6rem;
  color: #e5e7eb;
  text-decoration: none;
  margin-bottom: .2rem;
}

.admin-sidebar .nav-link:hover {
  background: #111827;
}

.admin-sidebar .nav-link.active {
  background: #111827;
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2.25rem 1.9rem 2rem;
  background: linear-gradient(to top, rgba(37, 99, 235, 0.08), #f9fafb 55%);
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: .85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-topbar-right a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-topbar-right a:hover {
  text-decoration: underline;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 1.3rem 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: .95rem;
  margin: 0 0 .5rem;
  color: var(--dark);
}

.panel .small {
  font-size: .82rem;
  color: var(--gray);
  margin-bottom: .75rem;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .75rem;
  font-size: .85rem;
}

.field {
  min-width: 180px;
}

.field-label {
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: .15rem;
  font-size: .8rem;
}

.field-value {
  color: var(--dark);
}

textarea {
  width: 100%;
  min-height: 90px;
  padding: .6rem .7rem;
  border-radius: .7rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: .85rem;
  box-sizing: border-box;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
  background: #fff;
}

select {
  padding: .4rem .6rem;
  border-radius: .7rem;
  border: 1px solid #d1d5db;
  font-size: .84rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

.btn-primary {
  padding: .55rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  background: #e5e7eb;
  color: #374151;
}

.tag.pending {
  background: rgba(245, 158, 11, 0.08);
  color: #b45309;
}

.tag.confirmed {
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.tag.canceled {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

.alert {
  padding: .5rem .8rem;
  border-radius: .75rem;
  font-size: .82rem;
  margin-bottom: .75rem;
}

.alert.success {
  background: rgba(22, 163, 74, 0.06);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.btn-link:hover {
  background: var(--primary-dark);
  color: #fff;
}

@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .admin-content {
    padding: 1.75rem 1.2rem 1.8rem;
  }
}



body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafb;
}

.guide-container {
  max-width: 1080px;
  margin: 1.5rem auto;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.guide-container h1,
.guide-container h2,
.guide-container h3 {
  color: #111827;
}

.guide-container p,
.guide-container li {
  color: #374151;
  line-height: 1.7;
}

.guide-error {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}



body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafb;
}

.guide-container {
  max-width: 1080px;
  margin: 1.5rem auto;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.guide-container h1,
.guide-container h2,
.guide-container h3 {
  color: #111827;
}

.guide-container p,
.guide-container li {
  color: #374151;
  line-height: 1.7;
}

.guide-error {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}


/* Settings layout helpers (R1.9.2) */
.settings-panel {
  display: block;
  max-width: 960px;
  margin: 0 auto;
}

.settings-section {
  background: #ffffff;
  border-radius: 14px;
  padding: .9rem .95rem .95rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.settings-subtitle {
  font-size: .9rem;
  font-weight: 700;
  margin: -.9rem -.95rem .75rem;
  padding: .55rem .95rem;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

.settings-section .field-group {
  margin-bottom: .55rem;
}


/* Ensure login submit button visible on all themes */
.auth-card button[type=submit] {
  background: #2563eb;
  color: #fff;
}

.auth-card button[type=submit]:hover {
  background: #1d4ed8;
}


/* ===================================================================
   Enterprise White Theme Overrides (Portal) – R1.10.0
   =================================================================== */

/* Design tokens */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --accent: #2563EB;
  --dark: #1F2937;
  --light: #FFFFFF;
  --gray: #4B5563;
  --bg-soft: #F8F9FA;
  --bg-softer: #F1F5F9;
  --border-subtle: #E5E7EB;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06);
  --radius-lg: 12px;
  --spacing-1: 4px;
  --spacing-2: 8px;
  --spacing-3: 12px;
  --spacing-4: 16px;
  --spacing-5: 24px;
}

/* Base layout */
body {
  background-color: #F8F9FA;
  color: var(--gray);
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  display: flex;
  flex: 1;
}

/* Sidebar: light, clean */
.admin-sidebar {
  width: 240px;
  background-color: #FFFFFF;
  color: var(--gray);
  padding: 16px 12px;
  box-sizing: border-box;
  border-inline-end: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dark);
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-title {
  font-size: 0.78rem;
  color: #9CA3AF;
  margin: 8px 0 4px;
}

.admin-sidebar .nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #4B5563;
  text-decoration: none;
  margin-bottom: 4px;
  font-size: 0.86rem;
}

.admin-sidebar .nav-link:hover {
  background-color: #EFF6FF;
  color: var(--primary);
}

.admin-sidebar .nav-link.active {
  background-color: #EFF6FF;
  color: var(--primary);
}

/* Main content area */
.admin-content {
  flex: 1;
  padding: 24px 24px 24px;
  background: #F8F9FA;
  box-sizing: border-box;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.admin-topbar-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.admin-topbar-right {
  font-size: 0.85rem;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background-color: #FFFFFF;
  font-size: 0.75rem;
  color: #6B7280;
}

/* Cards / panels */
.panel,
.admin-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 12px;
  margin-bottom: 16px;
}

.panel h2,
.admin-card h2 {
  font-size: 0.98rem;
  margin: 0 0 8px;
  color: var(--dark);
}

.panel .small,
.admin-card .small {
  font-size: 0.82rem;
  color: #6B7280;
  margin-bottom: 8px;
}

/* Forms */
label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  background-color: #F9FAFB;
  box-sizing: border-box;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
  background-color: #FFFFFF;
}

/* Buttons */
button,
.btn-primary,
.btn-secondary,
.btn-link {
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary,
.search-row button,
.table-actions .btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.search-row button:hover,
.table-actions .btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--primary);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: #EFF6FF;
}

.btn-link {
  background-color: transparent;
  color: var(--primary);
  border-radius: 8px;
  padding: 0;
  box-shadow: none;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Tables */
.table-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
}

th {
  font-weight: 600;
  color: var(--dark);
  background-color: #F9FAFB;
}

/* Tags / statuses */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  background-color: #E5E7EB;
  color: #374151;
}

.tag.open {
  background-color: #EFF6FF;
  color: #1D4ED8;
}

.tag.in_progress {
  background-color: #FEF3C7;
  color: #B45309;
}

.tag.closed {
  background-color: #DCFCE7;
  color: #166534;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }

  .admin-content {
    padding: 16px 16px 20px;
  }
}


/* -------------------------------------------------------------------
   Client Settings Tabs – Enterprise Look
   ------------------------------------------------------------------- */

.settings-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background-color: #F3F4F6;
  /* subtle grey band */
  border: 1px solid var(--border-subtle);
  margin: 8px 0 16px;
}

.settings-tabs .settings-tab-link {
  border: none;
  background: transparent;
  color: #6B7280;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.settings-tabs .settings-tab-link:hover {
  background-color: #E5E7EB;
  color: #374151;
}

.settings-tabs .settings-tab-link.active {
  background-color: #FFFFFF;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary);
  transform: translateY(-1px);
}

/* Tab panes as clean cards */
.settings-tab-pane {
  background-color: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 20px;
  margin-bottom: 16px;
}

.settings-tab-pane h3.settings-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.settings-tab-pane .field-group {
  margin-bottom: 12px;
}

.settings-tab-pane .two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

/* On small screens stack columns */
@media (max-width: 900px) {
  .settings-tab-pane .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Client Settings Tabs – Enterprise pill style */
.settings-tabs {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px;
  border-radius: 999px;
  background-color: #F0F2F5;
  border: 1px solid var(--border-light);
  margin: 8px 0 16px;
}

.settings-tabs .settings-tab-link {
  border: none;
  background: transparent;
  color: #6B7280;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.settings-tabs .settings-tab-link:hover {
  background-color: #F6F8FA;
  color: #374151;
}

.settings-tabs .settings-tab-link.active {
  background-color: #FFFFFF;
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-level-1);
}

.settings-tab-pane {
  background-color: var(--surface-base);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-level-1);
  padding: 16px 16px 20px;
  margin-bottom: 16px;
}

.settings-tab-pane h3.settings-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.settings-tab-pane .field-group {
  margin-bottom: 12px;
}

.settings-tab-pane .two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .settings-tab-pane .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Admin sidebar – enterprise light override */
.admin-sidebar {
  width: 240px;
  background-color: #FFFFFF;
  color: #111827;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
  border-inline-end: 1px solid var(--border-light);
  box-shadow: var(--shadow-level-1);
}

.admin-sidebar .nav-title {
  font-size: 0.8rem;
  color: #6B7280;
  margin: 0.5rem 0 0.25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  color: #111827;
  text-decoration: none;
  margin-bottom: 0.2rem;
  font-size: 0.86rem;
  font-weight: 500;
}

.admin-sidebar .nav-link:hover {
  background-color: #F3F4F6;
  color: #111827;
}

.admin-sidebar .nav-link.active {
  background-color: #EFF6FF;
  color: var(--primary);
}


/* Client Settings Tabs – flat enterprise style */
.settings-tabs {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  border-bottom: 1px solid var(--border-light);
  margin: 8px 0 16px;
}

.settings-tabs .settings-tab-link {
  border: none;
  background: transparent;
  color: #6B7280;
  padding: 8px 0;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.settings-tabs .settings-tab-link:hover {
  background-color: transparent;
  color: #374151;
}

.settings-tabs .settings-tab-link.active {
  background-color: transparent;
  color: var(--primary);
  border-bottom-color: var(--primary);
  box-shadow: none;
}

.settings-tab-pane {
  background-color: var(--surface-base);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  box-shadow: none;
  padding: 16px 16px 20px;
  margin-bottom: 16px;
}


/* Clients page – cleaner actions */
.admin-filters button[type="submit"] {
  background-color: #0052CC;
  color: #FFFFFF;
  border-radius: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #0052CC;
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-filters .btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 0 10px;
  min-height: 32px;
  border: 1px solid var(--border-light);
  background-color: #FFFFFF;
  color: #24292F;
}

.admin-filters .btn-small:hover {
  background-color: #F6F8FA;
}

/* Clients table action links */
td.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  margin-inline: 2px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
  border: 1px solid transparent;
}

td.actions a:hover {
  background-color: #F3F4F6;
}

td.actions a:nth-child(1) {
  /* Settings */
  border-color: var(--border-light);
}

td.actions a:nth-child(5) {
  /* Toggle status */
  border-color: #D97706;
  color: #B45309;
}


/* Client Settings Tabs – ultra flat */
.settings-tabs {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  border-bottom: 1px solid var(--border-light);
  margin: 8px 0 16px;
}

.settings-tabs .settings-tab-link {
  border: none;
  background: transparent;
  color: #6B7280;
  padding: 6px 0;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  box-shadow: none;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.settings-tabs .settings-tab-link:hover {
  color: #374151;
}

.settings-tabs .settings-tab-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.settings-tab-pane {
  background-color: var(--surface-base);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  box-shadow: none;
  padding: 16px 16px 20px;
  margin-bottom: 16px;
}


/* ===================================================================
   Enterprise internal layout – header & content refinements (Build 65)
   Inspired by reference design (dense topbar, light grey workspace).
   =================================================================== */

.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #F3F4F6;
}

.admin-main {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 248px;
  background-color: #FFFFFF;
  color: #111827;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
  border-inline-end: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #111827;
}

.admin-sidebar .nav-title {
  font-size: 0.78rem;
  color: #9CA3AF;
  margin: 0.5rem 0 0.25rem;
}

.admin-sidebar .nav-link {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  color: #111827;
  text-decoration: none;
  margin-bottom: 0.2rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-sidebar .nav-link:hover {
  background-color: #F3F4F6;
  color: #111827;
}

.admin-sidebar .nav-link.active {
  background-color: #EFF6FF;
  color: #1D4ED8;
}

.admin-content {
  flex: 1;
  padding: 1.5rem 1.9rem 2rem;
  background: #F3F4F6;
  box-sizing: border-box;
}

/* Top bar similar to attached design: white bar, subtle shadow */
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background-color: #FFFFFF;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.admin-topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.admin-topbar-right {
  font-size: 0.85rem;
  color: #4B5563;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-topbar-right a {
  color: #0052CC;
  font-weight: 500;
}

/* Generic card / banner style inside pages */
.section-card,
.panel,
.cards>.card {
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  background-color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Page titles inside content */
.section-title,
.page-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.section-title .small,
.page-section-title .small {
  font-size: 0.8rem;
  color: #6B7280;
}


/* R1.10.0_B71 auth form refresh */
.auth-card {
  padding: 1.75rem 1.75rem 1.5rem;
}

.auth-form .form-group {
  margin-bottom: 0.9rem;
}

.auth-form label {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--dark);
}

.auth-form input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.85rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-inline-end: 2.5rem;
}

.toggle-password {
  position: absolute;
  left: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password i {
  font-size: 0.9rem;
}

.auth-submit {
  margin-top: 0.5rem;
}


.portal-footer-version {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

/* ===================================================================
   R1.10.7-UX1 – Portal Mobile Polish
   -------------------------------------------------------------------
   - Refine sidebar and content spacing on small screens
   - Ensure tables scroll horizontally inside .table-wrapper
   - Stack dashboard/insights cards in a single column on phones
   - Tweak chatbot widget message fonts and spacing on mobile
   =================================================================== */

@media (max-width: 900px) {
  .admin-layout {
    min-height: 100vh;
  }

  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 40;
  }

  .admin-sidebar .brand {
    margin-bottom: 0;
  }

  /* Make nav scroll horizontally instead of wrapping into two lines */
  .admin-sidebar .nav-title {
    display: none;
  }

  .admin-sidebar .nav-link {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    margin: 0 0.25rem 0 0.25rem;
    white-space: nowrap;
    border-radius: 999px;
    font-size: 0.78rem;
  }

  .admin-content {
    padding: 1.25rem 1rem 1.5rem;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .admin-topbar-right {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .panel,
  .admin-card,
  .section-card {
    padding: 0.85rem 0.9rem;
  }

  .search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-row>div {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 600px) {
  .admin-content {
    padding: 1rem 0.85rem 1.25rem;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .admin-topbar-title {
    font-size: 0.95rem;
  }

  .panel h2,
  .admin-card-header h2 {
    font-size: 0.9rem;
  }
}

/* Tables – always wrapped in .table-wrapper for horizontal scroll on mobile */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  min-width: 640px;
}

/* Chatbot widget messages on mobile (channels/web) */
@media (max-width: 600px) {

  .srm-chat-widget,
  .srm-chat-widget * {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .srm-chat-widget-message {
    padding: 0.55rem 0.75rem;
  }
}


/* -------------------------------------------------------------------
   R1.10.9 – Sidebar navigation groups & mobile behaviour
   ------------------------------------------------------------------- */

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-sidebar .brand {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-sidebar .brand i {
  color: var(--primary);
}

.admin-sidebar .nav-group+.nav-group {
  margin-top: 0.3rem;
}

.admin-sidebar .nav-title {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: #9ca3af;
  margin: 0.35rem 0 0.2rem;
}

.admin-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  font-size: 0.86rem;
}

.admin-sidebar .nav-link i {
  width: 1.2rem;
  text-align: center;
  font-size: 0.9rem;
}

.admin-sidebar .nav-link span {
  flex: 1;
}

/* Mobile: keep sidebar usable as full-width band above content */
@media (max-width: 900px) {
  .admin-layout {
    min-height: 100vh;
  }

  .admin-main {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    margin-bottom: 0.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
  }

  .admin-sidebar .nav-group {
    border-bottom: 1px solid rgba(31, 41, 55, 0.4);
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
  }

  .admin-sidebar .nav-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
  }
}

/* Extra-small phones */
@media (max-width: 600px) {
  .admin-sidebar {
    padding: 0.75rem 0.9rem;
  }

  .admin-sidebar .nav-link {
    padding: 0.4rem 0.55rem;
  }
}

/* ===================================================================
   Sidebar Collapse Tokens (R1.10.14)
   =================================================================== */

/* Toggle Button */
.sidebar-toggle {
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: all 0.2s;
  margin-right: auto;
  /* For RTL layout, pushes button to left */
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Collapsed State (Desktop Only) */
@media (min-width: 901px) {
  body.sidebar-collapsed .admin-sidebar {
    width: 70px;
    padding: 1.25rem 0.6rem;
  }

  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .role-chip-container,
  body.sidebar-collapsed .nav-title,
  body.sidebar-collapsed .nav-link span {
    display: none !important;
  }

  body.sidebar-collapsed .admin-sidebar .brand {
    justify-content: center;
    gap: 0 !important;
    margin-bottom: 1rem;
  }

  body.sidebar-collapsed .admin-sidebar .brand div {
    display: none !important;
    /* Hide the logo/text wrapper completely to save space */
  }

  body.sidebar-collapsed .sidebar-toggle {
    margin: 0 auto;
    /* Center the toggle button */
  }

  body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem 0;
    text-align: center;
  }

  body.sidebar-collapsed .nav-link i {
    margin: 0;
    font-size: 1.15rem;
    /* Slightly larger icons when collapsed */
  }
}

/* Collapsed State (Mobile) */
@media (max-width: 900px) {
  /* When collapsed on mobile, standard behavior is often to hide the nav links 
     leaving just the header/brand. 
     Currently the non-collapsed state shows a horizontal scroll. 
     We can make 'collapsed' hide the scrollbar rows. */

  body.sidebar-collapsed .admin-sidebar .nav-group,
  body.sidebar-collapsed .admin-sidebar .role-chip-container {
    display: none !important;
  }

  /* Ensure toggle button stays visible */
  .sidebar-toggle {
    display: block !important;
  }
}
/* Forceful Overlay for Sidebar Toggle (Fixes duplication issues) */
.sidebar-toggle {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #9ca3af !important;
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  transition: all 0.2s;
  margin-right: auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}
.sidebar-toggle:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.3) !important;
}
.sidebar-toggle i {
  font-size: 1rem;
}

