/* MyBilling — Mobile-First CSS */
:root {
  --primary:       #4f46e5;
  --primary-dark:  #4338ca;
  --primary-light: #eef2ff;
  --secondary:     #0ea5e9;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --info:          #6366f1;
  --dark:          #1e293b;
  --gray-900: #0f172a; --gray-800: #1e293b; --gray-700: #334155;
  --gray-600: #475569; --gray-500: #64748b; --gray-400: #94a3b8;
  --gray-300: #cbd5e1; --gray-200: #e2e8f0; --gray-100: #f1f5f9;
  --gray-50:  #f8fafc; --white:    #ffffff;
  --sidebar-w: 260px;
  --header-h:  60px;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --transition: all .2s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { color: var(--gray-900); font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
@media (min-width: 768px) {
  h1 { font-size: 1.75rem; }
}

/* ── Layout ── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}
.sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar { transform: translateX(0); }
}

.sidebar-logo {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: .875rem;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { font-weight: 700; font-size: 1rem; color: var(--gray-900); }

.sidebar-nav { flex: 1; padding: .75rem .625rem; }
.nav-section-title {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--gray-400);
  padding: .875rem .75rem .375rem;
  margin-top: .25rem;
  display: block;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1px;
  line-height: 1.4;
  min-height: 40px;
}
.nav-item:hover  { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item svg    { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar-footer {
  padding: .875rem .625rem;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
}

/* Overlay */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  margin-left: 0;
  transition: margin-left .28s cubic-bezier(.4,0,.2,1);
}
@media (min-width: 1024px) {
  .main-content { margin-left: var(--sidebar-w); }
}

/* ── Topbar ── */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: .75rem;
}
@media (min-width: 640px) { .topbar { padding: 0 1.5rem; } }

.topbar-left  { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.menu-toggle {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-600);
  padding: .375rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle:hover { background: var(--gray-100); }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.page-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Avatar & Dropdown ── */
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 300;
  display: none;
  overflow: hidden;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .625rem 1rem;
  font-size: .875rem; color: var(--gray-700);
  cursor: pointer; transition: var(--transition);
}
.dropdown-item:hover    { background: var(--gray-50); color: var(--gray-900); }
.dropdown-item.danger   { color: var(--danger); }
.dropdown-divider       { height: 1px; background: var(--gray-200); margin: .25rem 0; }

/* ── Page Content ── */
.page-content { padding: 1rem; flex: 1; }
@media (min-width: 640px) { .page-content { padding: 1.25rem; } }
@media (min-width: 1024px) { .page-content { padding: 1.5rem; } }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
@media (min-width: 640px) { .card-header { padding: 1.125rem 1.5rem; } }
.card-title  { font-size: .9375rem; font-weight: 600; color: var(--gray-900); }
.card-body   { padding: 1rem 1.25rem; }
@media (min-width: 640px) { .card-body { padding: 1.5rem; } }
.card-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 640px)  { .stats-grid { gap: 1rem; } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .stats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: .75rem;
}
@media (min-width: 640px) { .stat-card { padding: 1.25rem; gap: 1rem; } }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 640px) { .stat-icon { width: 48px; height: 48px; } }
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.danger  { background: #fee2e2; color: var(--danger); }
.stat-icon.info    { background: #e0e7ff; color: var(--info); }

.stat-value { font-size: 1.375rem; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--gray-500); margin-top: .125rem; }
@media (min-width: 640px) { .stat-value { font-size: 1.625rem; } .stat-label { font-size: .8125rem; } }

/* ── Tables ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: .625rem .875rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  white-space: nowrap;
}
@media (min-width: 640px) { thead th { padding: .75rem 1rem; font-size: .75rem; } }
tbody td {
  padding: .75rem .875rem;
  font-size: .875rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
@media (min-width: 640px) { tbody td { padding: .875rem 1rem; } }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* Mobile table card view */
@media (max-width: 639px) {
  .table-mobile-card table,
  .table-mobile-card thead,
  .table-mobile-card tbody,
  .table-mobile-card tr,
  .table-mobile-card td { display: block; width: 100%; }
  .table-mobile-card thead { display: none; }
  .table-mobile-card tbody tr {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: .75rem;
    padding: .875rem;
    background: var(--white);
  }
  .table-mobile-card tbody tr:hover { background: var(--gray-50); }
  .table-mobile-card tbody td {
    border: none;
    padding: .25rem 0;
    display: flex;
    gap: .5rem;
    font-size: .875rem;
  }
  .table-mobile-card tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-500);
    font-size: .8125rem;
    min-width: 90px;
    flex-shrink: 0;
  }
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .6875rem;
  font-weight: 600; line-height: 1.4;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #e0e7ff; color: #3730a3; }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.4;
  white-space: nowrap;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary   { background: var(--primary);   color: #fff; border-color: var(--primary); }
.btn-primary:hover   { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); color: var(--gray-900); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover  { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-sm  { padding: .3125rem .625rem; font-size: .8125rem; }
.btn-lg  { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 1.125rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; color: var(--gray-700); margin-bottom: .375rem; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: .5625rem .875rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px prevents zoom on iOS */
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  transition: var(--transition);
  line-height: 1.5;
  -webkit-appearance: none;
  appearance: none;
}
@media (min-width: 640px) { .form-control { font-size: .9375rem; } }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.form-control::placeholder { color: var(--gray-400); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px;
  padding-right: 2.5rem; cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-text { font-size: .8125rem; color: var(--gray-500); margin-top: .25rem; }
.invalid-feedback { font-size: .8125rem; color: var(--danger); margin-top: .25rem; display: block; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; flex-shrink: 0; }
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; cursor: pointer; }
.form-check input[type="checkbox"],
.form-check input[type="radio"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

/* ── Alerts ── */
.alert {
  padding: .875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .875rem;
  display: flex; align-items: flex-start; gap: .625rem;
  margin-bottom: 1rem;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.alert-info    { background: #e0e7ff; border-color: #a5b4fc; color: #3730a3; }

/* ── Auth Pages ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #f0fdf4 100%);
  padding: 1rem;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-header  { padding: 1.75rem 1.5rem 1.25rem; text-align: center; border-bottom: 1px solid var(--gray-100); }
.auth-logo    { display: inline-flex; align-items: center; gap: .625rem; margin-bottom: 1rem; }
.auth-logo-icon {
  width: 42px; height: 42px;
  background: var(--primary); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.1rem;
}
.auth-logo-text { font-size: 1.375rem; font-weight: 800; color: var(--gray-900); }
.auth-title    { font-size: 1.2rem; font-weight: 600; color: var(--gray-900); }
.auth-subtitle { font-size: .875rem; color: var(--gray-500); margin-top: .25rem; }
.auth-body     { padding: 1.5rem; }
.auth-footer   { padding: 1rem 1.5rem; background: var(--gray-50); text-align: center; font-size: .875rem; color: var(--gray-500); }

/* Login Tabs */
.login-tabs { display: flex; background: var(--gray-100); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 1.25rem; }
.login-tab  { flex: 1; text-align: center; padding: .5rem; border-radius: 6px; font-size: .875rem; font-weight: 500; color: var(--gray-500); cursor: pointer; transition: var(--transition); }
.login-tab.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow); }

/* ── Grids ── */
.grid   { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ── Utilities ── */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.flex-row-reverse { flex-direction: row-reverse; }
.flex-col      { flex-direction: column; }
.gap-1  { gap: .25rem; }
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.gap-4  { gap: 1rem; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.flex-wrap     { flex-wrap: wrap; }
.flex-row-reverse { flex-direction: row-reverse; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ms-1 { margin-left: .25rem; }
.ms-auto { margin-left: auto; }
.me-1 { margin-right: .25rem; }
.me-2 { margin-right: .5rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .75rem; }
.text-muted   { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-none { display: none; }
.w-100  { width: 100%; }
.rounded { border-radius: var(--radius-sm); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.page-item {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: .875rem; color: var(--gray-600);
  border: 1px solid var(--gray-200);
  cursor: pointer; transition: var(--transition); padding: 0 .5rem;
}
.page-item:hover   { background: var(--gray-100); color: var(--gray-900); }
.page-item.active  { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-item.disabled { opacity: .5; cursor: not-allowed; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 400;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open .modal { transform: translateY(0); }

/* Drag handle */
.modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: var(--gray-300);
  border-radius: 2px;
  margin: .875rem auto .25rem;
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
  .modal { border-radius: var(--radius-lg); max-width: 520px; transform: scale(.95); }
  .modal-overlay.open .modal { transform: scale(1); }
  .modal::before { display: none; }
}

.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-size: .9375rem; font-weight: 600; }
.modal-close  { background: none; border: none; cursor: pointer; color: var(--gray-400); padding: .375rem; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body   { padding: 1.25rem; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--gray-200); display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Lang Switcher ── */
.lang-switcher { display: flex; align-items: center; gap: .25rem; }
.lang-btn {
  padding: .25rem .5rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: .6875rem; font-weight: 700; color: var(--gray-600);
  background: var(--white); cursor: pointer; transition: var(--transition);
  text-transform: uppercase;
}
.lang-btn:hover, .lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Service Card (client) ── */
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.service-price { font-size: 1.625rem; font-weight: 700; color: var(--primary); }
.service-cycle { font-size: .875rem; color: var(--gray-500); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 2.5rem 1.5rem; color: var(--gray-400); }
.empty-state svg { width: 52px; height: 52px; margin: 0 auto 1rem; opacity: .4; display: block; }
.empty-state p   { font-size: .9375rem; }

/* ── Wizard ── */
.wizard-steps { display: flex; align-items: center; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: .5rem; gap: 0; }
.wizard-step  { display: flex; align-items: center; gap: .375rem; white-space: nowrap; }
.wizard-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
  border: 2px solid var(--gray-300); color: var(--gray-400);
}
.wizard-step.active .wizard-step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.wizard-step.done   .wizard-step-num { border-color: var(--success); background: var(--success); color: #fff; }
.wizard-step-label  { font-size: .75rem; font-weight: 500; color: var(--gray-400); }
.wizard-step.active .wizard-step-label { color: var(--primary); }
.wizard-step.done   .wizard-step-label { color: var(--success); }
.wizard-divider { flex: 1; height: 2px; background: var(--gray-200); margin: 0 .5rem; min-width: 16px; }
.wizard-step.done + .wizard-divider { background: var(--success); }

/* ── Bottom nav (mobile admin) ── */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}
.mobile-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  padding: .625rem .25rem;
  font-size: .625rem;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  transition: var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mobile-bottom-nav a.active { color: var(--primary); }
.mobile-bottom-nav a svg { width: 22px; height: 22px; }
.mobile-bottom-nav .badge-dot {
  position: absolute; top: .5rem; right: calc(50% - 16px);
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}
@media (min-width: 1024px) { .mobile-bottom-nav { display: none; } }

/* Add bottom padding to page content when bottom nav visible */
@media (max-width: 1023px) {
  .page-content { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}

/* ── Misc Responsive Fixes ── */
@media (max-width: 639px) {
  .flex-between { gap: .5rem; }
  .flex-between h1 { font-size: 1.25rem; }
  /* Stack action buttons on small screens */
  .flex-between > .flex { flex-wrap: wrap; }
}

/* Grid col span */
.grid-col-full { grid-column: 1 / -1; }

/* Code */
code { font-family: 'Fira Code', 'Fira Mono', monospace; font-size: .875em; background: var(--gray-100); padding: .125rem .375rem; border-radius: 4px; }

/* Spin */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; display: inline-block; }

/* Sticky table header */
.table-sticky thead th { position: sticky; top: 0; z-index: 1; }
