/* ================================================================
   RentalOS — Complete Custom CSS Design System
   Brutalism Theme: High-contrast, thick borders, crisp shadows
   Mobile-first responsive layout
   ================================================================ */

/* ── Google Fonts fallback: system-ui stack (no external dependency) */
:root {
  /* ── Color Palette ── */
  --bg:           #FAFAF7;
  --bg-alt:       #F2F2EE;
  --surface:      #FFFFFF;
  --surface-alt:  #F7F7F4;
  --border:       #0A0A0A;
  --border-soft:  #D0CFC8;
  --text:         #0A0A0A;
  --text-muted:   #6B7060;
  --text-light:   #9B9B8E;

  --primary:      #E63946;
  --primary-dark: #C1121F;
  --primary-bg:   #FFF0F0;

  --accent:       #F4A417;
  --accent-dark:  #D48B0A;
  --accent-bg:    #FFF8E6;

  --success:      #2DC653;
  --success-dark: #1A9E3F;
  --success-bg:   #EDFBF2;

  --info:         #3B82F6;
  --info-bg:      #EFF6FF;

  --danger:       #E63946;
  --danger-bg:    #FFF0F0;

  --warning:      #F4A417;
  --warning-bg:   #FFF8E6;

  --suspended:    #9CA3AF;
  --suspended-bg: #F3F4F6;

  /* ── Typography ── */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;

  /* ── Brutalism Shadows ── */
  --shadow-sm:  3px 3px 0px var(--border);
  --shadow-md:  4px 4px 0px var(--border);
  --shadow-lg:  6px 6px 0px var(--border);
  --shadow-xl:  8px 8px 0px var(--border);

  /* ── Layout ── */
  --sidebar-w:  260px;
  --header-h:   60px;
  --nav-h:      64px;
  --radius:     0px;
  --radius-sm:  2px;

  /* ── Transitions ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 160ms var(--ease);
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

img { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ================================================================
   LAYOUT
   ================================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform var(--transition);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 190;
}
.sidebar-overlay.open { display: block; }

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-mark {
  width: 38px; height: 38px;
  background: var(--text);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 var(--primary);
  flex-shrink: 0;
}
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.5px; }
.logo-version { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section-label {
  padding: 12px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.nav-item:hover { background: var(--bg-alt); color: var(--text); }
.nav-item.active {
  color: var(--text);
  background: var(--surface-alt);
  border-left-color: var(--primary);
  font-weight: 700;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border: 1.5px solid var(--border);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  border-top: 2px solid var(--border);
  padding: 12px 0;
}

/* ── Main content ── */
.main-content {
  flex: 1;
  min-width: 0;
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ── Top header ── */
.top-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-menu-btn {
  width: 40px; height: 40px;
  background: none;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.header-menu-btn:active { transform: translate(2px,2px); box-shadow: none; }
.header-menu-btn svg { width: 18px; height: 18px; }

.header-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.3px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.header-icon-btn {
  width: 38px; height: 38px;
  background: none;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 2px 2px 0 var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}
.header-icon-btn:active { transform: translate(2px,2px); box-shadow: none; }
.header-icon-btn svg { width: 18px; height: 18px; }
.header-icon-btn .badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--primary);
  border: 1.5px solid var(--surface);
  border-radius: 50%;
}

/* ── Page content ── */
.page-content { padding: 20px 16px; max-width: 900px; margin: 0 auto; }
.page-content.full-width { max-width: none; }

.page-header { margin-bottom: 24px; }
.page-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ── Bottom Navigation (mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-top: 3px solid var(--border);
  display: flex;
  z-index: 150;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  text-decoration: none;
  position: relative;
  padding: 6px 4px;
}
.bottom-nav-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { stroke-width: 2.5; }
.bottom-nav-item .nav-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  width: 6px; height: 6px;
  background: var(--primary);
  border: 1.5px solid var(--surface);
  border-radius: 50%;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--surface);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 20px;
  position: relative;
}

.card-sm { padding: 14px 16px; }
.card-lg { padding: 28px 24px; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:active { transform: translate(3px,3px); box-shadow: none; }
.stat-card-accent { border-left: 5px solid var(--primary); }
.stat-card-success { border-left: 5px solid var(--success); }
.stat-card-warning { border-left: 5px solid var(--accent); }
.stat-card-info    { border-left: 5px solid var(--info); }

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}
.stat-value-sm { font-size: 20px; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-icon {
  position: absolute;
  top: 12px; right: 12px;
  opacity: 0.08;
  font-size: 40px;
  line-height: 1;
}

/* ── Client Cards ── */
.client-card {
  background: var(--surface);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 18px;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.client-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }
.client-card.suspended { opacity: 0.6; background: var(--suspended-bg); }

.client-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.client-avatar {
  width: 44px; height: 44px;
  background: var(--text);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border);
  flex-shrink: 0;
  box-shadow: 2px 2px 0 var(--border);
}
.client-avatar.avatar-red    { background: var(--primary); }
.client-avatar.avatar-green  { background: var(--success); }
.client-avatar.avatar-yellow { background: var(--accent); color: var(--text); }
.client-avatar.avatar-blue   { background: var(--info); }

.client-name { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.client-meta { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

.client-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--border-soft);
}
.client-stat-item { }
.client-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); }
.client-stat-value { font-size: 15px; font-weight: 800; margin-top: 1px; }

.client-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--border-soft);
}

/* ── Overdue Cards ── */
.overdue-card {
  background: var(--surface);
  border: 3px solid var(--border);
  border-left: 5px solid var(--primary);
  box-shadow: var(--shadow-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.overdue-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary) 0, var(--primary) 8px,
    transparent 8px, transparent 16px
  );
}
.overdue-days {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border: 1.5px solid var(--border);
  box-shadow: 1px 1px 0 var(--border);
  margin-bottom: 10px;
}
.overdue-client-name { font-size: 17px; font-weight: 900; letter-spacing: -0.4px; }
.overdue-service { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }
.overdue-amount {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.8px;
  margin: 10px 0;
}
.overdue-due-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.overdue-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: 2.5px solid var(--border);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
  text-decoration: none;
  background: var(--surface);
  color: var(--text);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translate(3px,3px); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--border);
}
.btn-success:hover { background: var(--success-dark); }

.btn-warning {
  background: var(--accent);
  color: var(--text);
  border-color: var(--border);
}
.btn-warning:hover { background: var(--accent-dark); }

.btn-danger {
  background: var(--primary);
  color: #fff;
  border-color: var(--border);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: var(--border-soft);
}
.btn-ghost:active { transform: none; }

.btn-outline-primary {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 3px 3px 0 var(--primary);
}
.btn-outline-primary:active { box-shadow: none; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-lg svg { width: 18px; height: 18px; }
.btn-full { width: 100%; }
.btn-icon { padding: 9px; }

/* ── Sticky CTA ── */
.sticky-save {
  position: sticky;
  bottom: calc(var(--nav-h) + 12px);
  z-index: 50;
  padding: 12px 16px;
  background: var(--bg);
  border-top: 2px solid var(--border-soft);
  display: flex;
  gap: 8px;
  margin: 0 -16px;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.form-label .required { color: var(--primary); margin-left: 3px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  background: var(--surface);
  border: 2.5px solid var(--border);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 4px 4px 0 var(--primary);
}
.form-input.has-error, .form-select.has-error { border-color: var(--primary); }
.form-input::placeholder { color: var(--text-light); }

.form-textarea { resize: vertical; min-height: 100px; }

.form-select-wrapper { position: relative; }
.form-select-wrapper::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--text);
  pointer-events: none;
}

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; font-weight: 500; }
.form-error { font-size: 12px; color: var(--primary); margin-top: 5px; font-weight: 600; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-divider {
  border: none;
  border-top: 2px dashed var(--border-soft);
  margin: 24px 0;
}
.form-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.input-prefix {
  display: flex;
  align-items: stretch;
}
.input-prefix-symbol {
  background: var(--bg-alt);
  border: 2.5px solid var(--border);
  border-right: none;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}
.input-prefix .form-input { box-shadow: none; border-left: none; }
.input-prefix .form-input:focus { box-shadow: 4px 4px 0 var(--primary); }

/* ── Toggle ── */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.toggle-label { font-size: 14px; font-weight: 600; }
.toggle-description { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  cursor: pointer;
  background: var(--border-soft);
  border: 2px solid var(--border);
  transition: .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: white;
  border: 1.5px solid var(--border);
  transition: .3s;
}
input:checked + .toggle-slider { background: var(--success); }
input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Billing Day Selector ── */
.day-selector {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
}
.day-btn:hover { border-color: var(--border); background: var(--bg-alt); }
.day-btn.selected {
  background: var(--text);
  color: #fff;
  border-color: var(--border);
  box-shadow: 2px 2px 0 var(--border);
}

/* ================================================================
   BADGES & CHIPS
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 2px solid var(--border);
  text-transform: uppercase;
}
.badge-success { background: var(--success-bg); color: var(--success-dark); border-color: var(--success); }
.badge-warning  { background: var(--warning-bg); color: var(--accent-dark);  border-color: var(--accent); }
.badge-danger   { background: var(--danger-bg);  color: var(--primary);      border-color: var(--primary); }
.badge-muted    { background: var(--suspended-bg); color: var(--suspended);  border-color: var(--suspended); }
.badge-info     { background: var(--info-bg);    color: var(--info);         border-color: var(--info); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Service type chips ── */
.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  border: 2px solid var(--border);
  letter-spacing: 0.3px;
}

/* ================================================================
   ALERTS / FLASH
   ================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success-dark); }
.alert-error   { background: var(--danger-bg);  border-color: var(--primary); color: var(--primary-dark); }
.alert-warning { background: var(--warning-bg); border-color: var(--accent);  color: var(--accent-dark); }
.alert-info    { background: var(--info-bg);    border-color: var(--info);    color: var(--info); }
.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 0 0 8px;
  font-size: 18px;
  line-height: 1;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100vw - 32px);
  max-width: 400px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  pointer-events: all;
  animation: toastIn 200ms var(--ease) forwards;
}
.toast.toast-out { animation: toastOut 200ms var(--ease) forwards; }
.toast-success { background: var(--success); color: #fff; }
.toast-error   { background: var(--primary); color: #fff; }
.toast-warning { background: var(--accent);  color: var(--text); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(16px); }
}

/* ================================================================
   ACTION REQUIRED SECTION
   ================================================================ */
.action-required-header {
  background: var(--primary);
  color: #fff;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.2px;
  position: relative;
  overflow: hidden;
}
.action-required-header::before {
  content: '';
  font-size: 20px;
}
.action-required-count {
  margin-left: auto;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  padding: 3px 10px;
  border: 2px solid var(--border);
}
.action-required-body {
  border: 3px solid var(--border);
  border-top: none;
  box-shadow: var(--shadow-md);
}
.action-required-body .overdue-card {
  border: none;
  border-bottom: 2px dashed var(--border-soft);
  box-shadow: none;
}
.action-required-body .overdue-card:last-child { border-bottom: none; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper {
  overflow-x: auto;
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
thead tr { border-bottom: 3px solid var(--border); }
th {
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-alt);
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1.5px solid var(--bg-alt);
  vertical-align: middle;
}
tbody tr:hover { background: var(--surface-alt); }
tbody tr:last-child td { border-bottom: none; }
.td-bold { font-weight: 700; }
.td-muted { color: var(--text-muted); font-size: 12px; }
.td-mono { font-family: var(--font-mono); }
.td-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* ================================================================
   SEARCH & FILTERS
   ================================================================ */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-input-wrapper { position: relative; flex: 1; }
.search-input-wrapper svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input-wrapper .form-input { padding-left: 38px; }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-muted);
}
.filter-chip:hover   { border-color: var(--border); color: var(--text); }
.filter-chip.active  { background: var(--text); color: #fff; border-color: var(--border); }

/* ================================================================
   TIMELINE
   ================================================================ */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border-soft);
}
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -21px; top: 4px;
  width: 14px; height: 14px;
  background: var(--surface);
  border: 2.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
}
.timeline-dot.dot-success { border-color: var(--success); background: var(--success-bg); }
.timeline-dot.dot-danger  { border-color: var(--primary); background: var(--primary-bg); }
.timeline-dot.dot-warning { border-color: var(--accent);  background: var(--accent-bg); }

.timeline-content { }
.timeline-action { font-size: 14px; font-weight: 600; line-height: 1.3; }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ================================================================
   BILLING CYCLE GRID
   ================================================================ */
.billing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.billing-month-card {
  padding: 12px;
  border: 2px solid var(--border-soft);
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}
.billing-month-card.bc-paid    { background: var(--success-bg); border-color: var(--success); }
.billing-month-card.bc-overdue { background: var(--danger-bg);  border-color: var(--primary); }
.billing-month-card.bc-pending { background: var(--surface);    border-color: var(--border-soft); }
.bc-month-name { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.bc-amount { font-size: 16px; font-weight: 900; margin: 4px 0; letter-spacing: -0.5px; }
.bc-status-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-bottom: 2px solid var(--bg-alt);
  position: relative;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--surface-alt); }
.notif-item.unread { background: var(--info-bg); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--info);
}
.notif-icon-wrap {
  width: 40px; height: 40px;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--border);
}
.notif-warning .notif-icon-wrap  { border-color: var(--accent);   background: var(--accent-bg); }
.notif-danger  .notif-icon-wrap  { border-color: var(--primary);  background: var(--primary-bg); }
.notif-success .notif-icon-wrap  { border-color: var(--success);  background: var(--success-bg); }
.notif-info    .notif-icon-wrap  { border-color: var(--info);     background: var(--info-bg); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; }
.notif-message { font-size: 13px; color: var(--text-muted); margin-top: 2px; font-weight: 500; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; font-weight: 500; }
.notif-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ================================================================
   MODALS / DIALOGS
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 800;
  display: flex;
  align-items: flex-end;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--surface);
  border: 3px solid var(--border);
  border-bottom: none;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 100%;
  padding: 24px 20px;
  padding-bottom: calc(var(--nav-h) + 20px);
  transform: translateY(100%);
  transition: transform 250ms var(--ease);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; flex: 1; }
.modal-close {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 2px 2px 0 var(--border);
  flex-shrink: 0;
}
.modal-close:active { transform: translate(2px,2px); box-shadow: none; }
.modal-body { }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; }

/* Confirm dialog */
.confirm-icon { font-size: 40px; margin-bottom: 12px; }
.confirm-title { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 8px; }
.confirm-message { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  flex-wrap: wrap;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border-soft);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}
.page-link:hover { border-color: var(--border); background: var(--bg-alt); }
.page-link.active { background: var(--text); color: #fff; border-color: var(--border); box-shadow: 2px 2px 0 var(--border); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ================================================================
   PROFILE PAGE
   ================================================================ */
.profile-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fb 58%, #eef2ff 100%);
  color: var(--text);
  border: 2px solid var(--border-soft);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(24,32,43,.08);
  padding: 26px 22px;
  position: relative;
  overflow: hidden;
}
.profile-hero::after {
  content: '';
  position: absolute;
  top: -56px; right: -36px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80,120,250,.14), rgba(80,120,250,0) 68%);
  pointer-events: none;
}
.profile-avatar-large {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary), #315de0);
  border: 3px solid #fff;
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 20px rgba(80,120,250,.24);
  margin-bottom: 14px;
}
.profile-hero-name { font-size: 24px; font-weight: 900; letter-spacing: -0.8px; color: var(--text); }
.profile-hero-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }
.profile-hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
}
.profile-hero-stat-value { font-size: 22px; font-weight: 900; color: var(--text); }
.profile-hero-stat-label { font-size: 10px; color: var(--text-light); font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 3px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tab-btn {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--text); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ================================================================
   EMPTY STATES
   ================================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  border: 2.5px dashed var(--border-soft);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-title { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }
.empty-state-text { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.auth-card {
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-xl);
  padding: 32px 28px;
  width: 100%;
  max-width: 400px;
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary) 0, var(--primary) 12px,
    var(--text) 12px, var(--text) 24px
  );
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.auth-logo-mark {
  width: 48px; height: 48px;
  background: var(--text);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--border);
  box-shadow: 3px 3px 0 var(--primary);
}
.auth-logo-title { font-size: 22px; font-weight: 900; letter-spacing: -0.8px; }
.auth-logo-sub { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.auth-heading { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-subtext { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; font-weight: 500; }

/* ================================================================
   SETTINGS
   ================================================================ */
.settings-section {
  background: var(--surface);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}
.settings-section-header {
  padding: 16px 20px;
  border-bottom: 2px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-section-header svg { width: 16px; height: 16px; }
.settings-section-body { padding: 20px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border-soft);
  gap: 16px;
}
.settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.settings-row-label { font-size: 14px; font-weight: 600; }
.settings-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.settings-row-value { font-size: 14px; font-weight: 600; color: var(--text-muted); }

/* ================================================================
   UTILITY
   ================================================================ */
.text-primary  { color: var(--primary) !important; }
.text-success  { color: var(--success) !important; }
.text-warning  { color: var(--accent) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-light    { color: var(--text-light) !important; }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.fw-900 { font-weight: 900; }
.fw-700 { font-weight: 700; }
.fw-500 { font-weight: 500; }

.d-flex     { display: flex; }
.d-grid     { display: grid; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0   { padding: 0; }

.divider { border: none; border-top: 2px solid var(--border-soft); margin: 16px 0; }
.divider-bold { border-top-width: 3px; border-color: var(--border); }

.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border-soft);
}

/* ── Marquee Banner ── */
.marquee-banner {
  background: var(--text);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.marquee-inner {
  display: inline-block;
  animation: marquee 25s linear infinite;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Cards grid ── */
.cards-grid { display: flex; flex-direction: column; gap: 12px; }

/* ── Floating FAB ── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  right: 16px;
  width: 52px; height: 52px;
  background: var(--primary);
  border: 2.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 120;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fab:active { transform: translate(4px,4px); box-shadow: none; }
.fab svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.5; }

/* ── Amount display ── */
.amount-display {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}
.amount-display.amount-lg { font-size: 36px; }
.amount-currency { font-size: 16px; font-weight: 700; opacity: 0.6; vertical-align: super; margin-right: 1px; }

/* ── Progress bar ── */
.progress-bar {
  height: 8px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-soft);
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: var(--success);
  transition: width 600ms var(--ease);
}
.progress-fill.progress-warning { background: var(--accent); }
.progress-fill.progress-danger  { background: var(--primary); }

/* ================================================================
   RESPONSIVE — DESKTOP (≥ 768px)
   ================================================================ */
@media (min-width: 768px) {
  .main-content { padding-bottom: 0; }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: translateX(0) !important;
    flex-shrink: 0;
  }
  .sidebar-overlay { display: none !important; }

  .bottom-nav { display: none; }

  .header-menu-btn { display: none; }

  .page-content { padding: 28px 32px; }
  .page-title { font-size: 30px; }

  .stat-grid { grid-template-columns: repeat(3, 1fr); }

  .modal-overlay { align-items: center; }
  .modal {
    max-width: 520px;
    border-bottom: 3px solid var(--border);
    padding-bottom: 24px;
    margin: 0 auto;
  }
  .modal-overlay.open .modal { transform: translateY(0); }

  .cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); }

  .form-row { gap: 20px; }

  .sticky-save { position: static; background: transparent; border-top: none; margin: 0; padding: 24px 0 0; }

  .toast-container { bottom: 24px; }
  .fab { bottom: 24px; right: 32px; }

  .app-wrapper { overflow: hidden; height: 100vh; }
  .main-content { overflow-y: auto; height: 100vh; }
}

@media (min-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .page-content { padding: 32px 40px; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  .sidebar, .bottom-nav, .top-header, .fab, .sticky-save, .btn { display: none !important; }
  .main-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}


/* Premium unified service form */
.ui-icon{width:22px;height:22px;display:inline-block;vertical-align:middle}.activity-svg{width:20px;height:20px;color:var(--text-muted)}
.stat-icon .ui-icon{width:30px;height:30px}.empty-state-icon .ui-icon,.clear-state-icon .ui-icon{width:34px;height:34px}.clear-state-icon{width:58px;height:58px;margin:0 auto 10px;border-radius:18px;display:grid;place-items:center;background:var(--success-bg);color:var(--success)}.notif-icon-wrap .ui-icon{width:22px;height:22px}.modal-title .ui-icon{width:20px;height:20px;margin-right:7px}.confirm-icon .ui-icon{width:36px;height:36px}
.back-link{font-size:13px;font-weight:700;color:var(--text-muted);text-decoration:none;display:inline-flex;align-items:center;gap:6px;margin-bottom:10px}.premium-form{max-width:980px;margin:0 auto}.form-progress{position:relative;display:grid;grid-template-columns:repeat(4,1fr);margin:0 0 22px;padding:0 4px}.progress-line{position:absolute;left:12.5%;right:12.5%;top:17px;height:3px;background:var(--border);overflow:hidden}.progress-line span{display:block;height:100%;width:0;background:var(--primary);transition:width .3s ease}.progress-step{position:relative;z-index:1;text-align:center;color:var(--text-light);font-size:11px;font-weight:700}.progress-step b{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;margin:0 auto 7px;background:var(--bg-alt);border:2px solid var(--border);color:var(--text-muted);transition:.25s}.progress-step.active b{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 0 0 5px rgba(80,120,250,.12)}.progress-step.done b{background:var(--success);border-color:var(--success);color:#fff}.progress-step.active span,.progress-step.done span{color:var(--text)}
.form-stage{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:22px;margin-bottom:16px;box-shadow:var(--shadow-sm)}.stage-head{display:flex;align-items:center;gap:13px;margin-bottom:18px}.stage-head>span{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:var(--bg-alt);color:var(--primary);font-size:12px;font-weight:900}.stage-head h2,.toggle-section h2{margin:0;font-size:18px}.stage-head p,.toggle-section p{margin:4px 0 0;color:var(--text-muted);font-size:12px}.stage-kicker{font-size:10px;letter-spacing:.13em;font-weight:900;color:var(--text-light);margin-bottom:5px}.toggle-section{display:flex;align-items:center;justify-content:space-between;gap:20px}.premium-switch input{display:none}.premium-switch span{display:block;width:52px;height:30px;border-radius:999px;background:var(--border);position:relative;transition:.25s}.premium-switch span:after{content:"";position:absolute;width:24px;height:24px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:.25s}.premium-switch input:checked+span{background:var(--primary)}.premium-switch input:checked+span:after{transform:translateX(22px)}.monthly-fields{margin-top:18px;transition:.2s}.monthly-fields.disabled{opacity:.35;filter:grayscale(.2)}.date-control{display:grid;grid-template-columns:1fr auto;gap:8px}.date-today{border:1px solid var(--border);background:var(--bg-alt);border-radius:var(--radius-md);padding:0 15px;font-weight:800;color:var(--text)}.balance-card{margin-top:2px;padding:18px;border-radius:18px;background:linear-gradient(135deg,var(--bg-alt),var(--surface));border:1px solid var(--border)}.balance-card>span{display:block;color:var(--text-muted);font-size:12px;font-weight:700}.balance-card>strong{display:block;font-size:25px;margin:7px 0 12px}.balance-progress{height:7px;background:var(--border);border-radius:999px;overflow:hidden}.balance-progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--primary),var(--success));border-radius:999px;transition:width .25s}
@media(max-width:700px){.form-progress{margin-top:2px}.progress-step span{font-size:10px}.form-stage{padding:17px;border-radius:19px}.stage-head p,.toggle-section p{display:none}.toggle-section{align-items:center}.date-control{grid-template-columns:1fr auto}.premium-form .form-row{grid-template-columns:1fr}.balance-card>strong{font-size:22px}}

/* RentalOS v3 managed SMM panels */
.managed-panel-grid{display:grid;grid-template-columns:1fr;gap:14px}.managed-panel-card{border-left:5px solid var(--border)}.managed-panel-card.status-active{border-left-color:var(--success)}.managed-panel-card.status-suspended{border-left-color:var(--primary)}.managed-panel-card.status-offline{border-left-color:var(--accent)}.panel-card-title{display:block;font-size:17px;font-weight:900;color:var(--text);text-decoration:none}.panel-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}.panel-kpis div{background:var(--bg-alt);border:1px solid var(--border-soft);padding:10px}.panel-kpis span,.panel-renewal span,.setup-row span,.connection-list span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-weight:800}.panel-kpis strong{display:block;font-size:15px;margin-top:4px;word-break:break-word}.panel-renewal{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:11px 12px;border:1px solid var(--border-soft);background:var(--bg-alt)}.panel-renewal small{grid-column:1/-1;color:var(--text-muted)}.panel-renewal.due-warning,.renewal-pill.due-warning{background:#fff7df}.panel-renewal.due-today,.panel-renewal.due-expired,.renewal-pill.due-today,.renewal-pill.due-expired{background:var(--danger-bg);color:var(--danger)}.panel-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.panel-actions form{display:inline-flex}.panel-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;border-left:6px solid var(--border)}.panel-hero.status-active{border-left-color:var(--success)}.panel-hero.status-suspended{border-left-color:var(--primary)}.panel-hero h2{margin:0 0 5px;font-size:25px}.panel-hero-actions{display:flex;gap:8px;flex-wrap:wrap}.panel-two-col{display:grid;grid-template-columns:1fr;gap:16px}.renewal-pill{padding:7px 10px;background:var(--bg-alt);font-size:11px;font-weight:900}.renewal-date-big{font-size:29px;font-weight:900;margin:14px 0}.renew-form{border-top:1px solid var(--border-soft);padding-top:16px}.setup-row{padding:12px;background:var(--bg-alt);border:1px solid var(--border-soft);margin:12px 0}.setup-row code{display:block;margin-top:5px;word-break:break-all}.setup-sql{width:100%;min-height:170px;padding:12px;border:1px solid var(--border);background:#111827;color:#e5e7eb;font-family:monospace;font-size:11px;line-height:1.5;resize:vertical;margin-bottom:10px}.connection-list{margin-top:14px}.connection-list>div{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--border-soft)}.connection-list strong{text-align:right;font-size:12px}.form-help{display:block;color:var(--text-muted);font-size:11px;margin-top:5px}
@media(min-width:768px){.managed-panel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.panel-two-col{grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr)}.panel-stat-grid{grid-template-columns:repeat(4,1fr)!important}}
@media(min-width:1180px){.managed-panel-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.panel-hero{align-items:flex-start;flex-direction:column}.panel-hero-actions{width:100%}.panel-hero-actions form,.panel-hero-actions .btn{flex:1}.panel-kpis{grid-template-columns:1fr}.panel-renewal{grid-template-columns:1fr}.panel-renewal small{grid-column:auto}}
