/* =============================================
   Caderneta Fácil – Tema Fúcsia
   Baseado nos mockups do projeto
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary:       #C2185B;
  --primary-dark:  #880E4F;
  --primary-hover: #AD1457;
  --primary-light: #E91E63;
  --primary-bg:    #FCE4EC;
  --primary-soft:  #fdf0f5;

  --sidebar-bg:    #111827;
  --sidebar-w:     240px;
  --header-h:      60px;

  --success:       #059669;
  --success-bg:    #D1FAE5;
  --warning:       #D97706;
  --warning-bg:    #FEF3C7;
  --danger:        #DC2626;
  --danger-bg:     #FEE2E2;
  --info:          #2563EB;
  --info-bg:       #DBEAFE;

  --text:          #111827;
  --text-2:        #374151;
  --text-muted:    #6B7280;
  --border:        #E5E7EB;
  --bg:            #F9FAFB;
  --white:         #FFFFFF;

  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.06);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --transition:    all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ─── SCROLLBAR ────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }

/* ═══════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════ */
.login-split {
  display: flex;
  min-height: 100vh;
}

.login-hero {
  flex: 1;
  background: linear-gradient(135deg, #F5E6D3 0%, #E8D0B8 50%, #D4B898 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(194,24,91,.08) 0%, transparent 60%);
}

.login-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}

.login-hero-overlay {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
}

.login-hero-text {
  font-size: 28px;
  font-weight: 800;
  color: rgba(255,255,255,.95);
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.login-form-side {
  width: 460px;
  flex-shrink: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-shadow: -4px 0 20px rgba(0,0,0,.06);
}

.login-form-inner { width: 100%; max-width: 360px; }

.login-brand {
  margin-bottom: 32px;
}
.login-brand h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}
.login-brand .sub { font-size: 13.5px; color: var(--text-muted); }
.login-brand .welcome { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 4px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap i {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF; font-size: 15px; pointer-events: none;
}
.input-icon-wrap input { padding-left: 36px; }
.input-icon-wrap .eye-toggle {
  position: absolute; right: 11px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: #9CA3AF; cursor: pointer; font-size: 15px;
}

.forgot-link {
  font-size: 12px;
  color: var(--primary);
  float: right;
  margin-top: -12px;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  overflow-y: auto; z-index: 200;
  transition: transform .3s ease;
}

.sidebar-brand {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white; font-weight: 800;
  flex-shrink: 0;
}
.brand-text .name { font-size: 15px; font-weight: 800; color: #fff; }
.brand-text .sub  { font-size: 10px; color: rgba(255,255,255,.35); letter-spacing: .5px; }

.nav-group { padding: 8px 0; }
.nav-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,.22);
  padding: 10px 16px 4px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  color: rgba(255,255,255,.58);
  font-size: 13px; font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  border-left: 2px solid transparent;
  margin: 1px 0;
}
.nav-link i { font-size: 16px; width: 18px; text-align: center; color: rgba(255,255,255,.3); flex-shrink: 0; }
.nav-link:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); border-left-color: rgba(255,255,255,.2); }
.nav-link:hover i { color: rgba(255,255,255,.7); }
.nav-link.active {
  color: #fff; background: rgba(194,24,91,.2);
  border-left-color: var(--primary-light);
  font-weight: 600;
}
.nav-link.active i { color: var(--primary-light); }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .av {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.sidebar-user .info .name { font-size: 12.5px; font-weight: 600; color: #fff; }
.sidebar-user .info .role { font-size: 10px; color: rgba(255,255,255,.35); }
.sidebar-logout {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 8px;
  color: rgba(255,255,255,.4); font-size: 12px;
  border-radius: 6px; transition: var(--transition);
  cursor: pointer; text-decoration: none;
}
.sidebar-logout:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.07); }
.sidebar-logout i { font-size: 14px; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left .3s ease;
}

.top-bar {
  position: sticky; top: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); padding: 4px; }
.page-title { font-size: 16px; font-weight: 700; color: var(--text); }
.top-bar-right { display: flex; align-items: center; gap: 10px; }

.content { padding: 24px; flex: 1; }

/* ═══════════════════════════════════════════
   GREETING
═══════════════════════════════════════════ */
.greeting {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 12px;
}
.greeting-text h2 { font-size: 22px; font-weight: 800; color: var(--text); }
.greeting-text p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════
   METRIC CARDS
═══════════════════════════════════════════ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.metric-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.metric-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.metric-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px;
}
.metric-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.mi-pink   { background: var(--primary-bg); color: var(--primary); }
.mi-green  { background: var(--success-bg); color: var(--success); }
.mi-red    { background: var(--danger-bg);  color: var(--danger); }
.mi-orange { background: #FEF3C7; color: #D97706; }
.mi-blue   { background: var(--info-bg);   color: var(--info); }
.mi-purple { background: #EDE9FE; color: #7C3AED; }
.mi-teal   { background: #CCFBF1; color: #0D9488; }
.mi-gray   { background: #F3F4F6; color: #6B7280; }

.metric-value {
  font-size: 21px; font-weight: 800;
  color: var(--text); line-height: 1.2;
}
.metric-value.text-danger  { color: var(--danger) !important; }
.metric-value.text-success { color: var(--success) !important; }
.metric-value.text-warning { color: var(--warning) !important; }
.metric-sub {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; display: flex; align-items: center; gap: 4px;
}
.metric-change-up   { color: var(--success); font-size: 11px; font-weight: 600; }
.metric-change-down { color: var(--danger);  font-size: 11px; font-weight: 600; }

/* ═══════════════════════════════════════════
   CARD
═══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.card-body  { padding: 20px; }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit; line-height: 1.4;
  letter-spacing: .01em;
}
.btn:active { transform: scale(.98); }

.btn-xs  { padding: 4px  9px;  font-size: 11.5px; border-radius: 5px;  gap: 4px; }
.btn-sm  { padding: 5px 11px;  font-size: 12.5px; border-radius: 6px;  gap: 5px; }
.btn-lg  { padding: 11px 22px; font-size: 14.5px; border-radius: 10px; }
.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: 7px; justify-content: center; font-size: 13.5px; }
.btn-icon-sm { width: 26px; height: 26px; padding: 0; border-radius: 6px; justify-content: center; font-size: 12px; }

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

.btn-outline    { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); color: var(--primary-dark); }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

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

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #B45309; color: #fff; }

.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1BBE58; color: #fff; }

.btn-light { background: #F9FAFB; color: var(--text); border: 1px solid var(--border); }
.btn-light:hover { background: var(--border); }

/* Payment tabs buttons */
.pay-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.pay-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text-muted);
  transition: var(--transition); min-width: 72px;
}
.pay-tab i { font-size: 20px; }
.pay-tab:hover { border-color: var(--primary); color: var(--primary); }
.pay-tab.active {
  border-color: var(--primary); background: var(--primary-bg);
  color: var(--primary); font-weight: 700;
}

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: #FAFAFA;
  color: var(--text-muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid #F3F4F6; transition: background .12s; }
tbody tr:hover { background: #FAFAFA; }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 12px 14px; vertical-align: middle; }

/* Client row with avatar */
.client-row-name {
  display: flex; align-items: center; gap: 10px;
}

/* Avatar circles */
.av-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0; letter-spacing: .5px;
  text-transform: uppercase;
}
.av-sm { width: 28px; height: 28px; font-size: 10.5px; border-radius: 50%; }
.av-lg { width: 56px; height: 56px; font-size: 20px; border-radius: 50%; flex-shrink: 0; }
.av-xl { width: 72px; height: 72px; font-size: 26px; border-radius: 50%; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   BADGES / STATUS
═══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; white-space: nowrap;
}
.badge-success   { background: var(--success-bg); color: var(--success); }
.badge-danger    { background: var(--danger-bg);  color: var(--danger); }
.badge-warning   { background: var(--warning-bg); color: var(--warning); }
.badge-info      { background: var(--info-bg);    color: var(--info); }
.badge-secondary { background: #F3F4F6; color: #6B7280; }
.badge-primary   { background: var(--primary-bg); color: var(--primary-dark); }
.badge-purple    { background: #EDE9FE; color: #6D28D9; }

/* ═══════════════════════════════════════════
   FILTER CHIPS
═══════════════════════════════════════════ */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 5px 14px; border-radius: 99px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--border);
  background: var(--white); color: var(--text-muted);
  transition: var(--transition); white-space: nowrap;
}
.chip:hover  { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 5px;
}
.form-label.req::after { content: ' *'; color: var(--primary); }

.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text); background: var(--white);
  transition: var(--transition); outline: none; font-family: inherit;
  line-height: 1.5;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(194,24,91,.1); }
.form-control::placeholder { color: #C4C4C4; }
select.form-control { cursor: pointer; appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; gap: 14px; }
.col-2   { grid-template-columns: 1fr 1fr; }
.col-3   { grid-template-columns: 1fr 1fr 1fr; }
.col-auto { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 42px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 24px;
  background: #D1D5DB; cursor: pointer; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; left: 3px; bottom: 3px;
  transition: .2s; box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--text); }

/* Search field */
.search-field { position: relative; }
.search-field i {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%); color: #9CA3AF; font-size: 15px; pointer-events: none;
}
.search-field input { padding-left: 36px; }

/* ═══════════════════════════════════════════
   MODALS
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white); border-radius: 16px;
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  transform: translateY(16px) scale(.98); transition: transform .22s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: none; }
.modal-lg { max-width: 680px; }
.modal-sm { max-width: 400px; }

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white); z-index: 1;
  border-radius: 16px 16px 0 0;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body   { padding: 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  position: sticky; bottom: 0; background: var(--white);
}

/* Confirm sale modal */
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success-bg); color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 16px;
}
.confirm-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 16px;
}
.confirm-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.confirm-field span  { font-size: 14px; font-weight: 600; color: var(--text); display: block; margin-top: 2px; }
.confirm-total {
  background: var(--primary-bg);
  border-radius: 10px; padding: 14px;
  text-align: center; margin-bottom: 18px;
}
.confirm-total label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--primary-dark); }
.confirm-total .amount { font-size: 26px; font-weight: 800; color: var(--primary); }

/* ═══════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════ */
.alert {
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid #6EE7B7; }
.alert-danger  { background: var(--danger-bg);  color: #991B1B; border: 1px solid #FCA5A5; }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid #FCD34D; }
.alert-info    { background: var(--info-bg);    color: #1E40AF; border: 1px solid #93C5FD; }

/* ═══════════════════════════════════════════
   TABS
═══════════════════════════════════════════ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: var(--transition); white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ═══════════════════════════════════════════
   CLIENT DETAIL
═══════════════════════════════════════════ */
.client-hero {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.client-hero-info h2 { font-size: 20px; font-weight: 800; color: var(--text); }
.client-hero-info p  { font-size: 13px; color: var(--text-muted); }

.client-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px;
  margin-bottom: 20px;
}
.client-stat {
  border-radius: var(--radius); padding: 16px;
  border: 1px solid var(--border);
}
.client-stat.highlight {
  background: var(--primary);
  border-color: var(--primary);
}
.client-stat.highlight .stat-label { color: rgba(255,255,255,.75); }
.client-stat.highlight .stat-value { color: #fff; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--text); }
.stat-sub   { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Installment row */
.parcela-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--border);
  gap: 12px;
}
.parcela-row:last-child { border-bottom: none; }
.parcela-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.dot-pink   { background: var(--primary); }
.dot-green  { background: var(--success); }
.dot-red    { background: var(--danger); }
.dot-orange { background: var(--warning); }

/* ═══════════════════════════════════════════
   INSTALLMENT PREVIEW
═══════════════════════════════════════════ */
#parcelas-preview {
  background: #FAFAFA; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 14px; margin-top: 8px; font-size: 13px;
}
#parcelas-preview table { font-size: 12.5px; }
#parcelas-preview thead th { background: transparent; padding: 4px 10px; }
#parcelas-preview tbody td { padding: 5px 10px; }
.parcela-preview-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.parcela-preview-row:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; opacity: .35; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

/* ═══════════════════════════════════════════
   TOAST
═══════════════════════════════════════════ */
#toasts {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 11px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 8px;
  min-width: 220px; max-width: 340px;
  animation: toastIn .28s ease;
}
.toast-success { background: #059669; }
.toast-danger  { background: #DC2626; }
.toast-info    { background: var(--primary); }
.toast-warning { background: #D97706; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ═══════════════════════════════════════════
   MISC / UTILITIES
═══════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 18px; transition: color .2s;
}
.back-link:hover { color: var(--primary); }

.grid-2-1 { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 18px; }
.fw-bold  { font-weight: 700 !important; }
.fw-semi  { font-weight: 600 !important; }
.fw-medium { font-weight: 500 !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-right   { text-align: right  !important; }
.text-center  { text-align: center !important; }
.fs-xs { font-size: 11px !important; }
.fs-sm { font-size: 12.5px !important; }
.mt-1 { margin-top: 6px   !important; }
.mt-2 { margin-top: 14px  !important; }
.mt-3 { margin-top: 22px  !important; }
.mb-1 { margin-bottom: 6px   !important; }
.mb-2 { margin-bottom: 14px  !important; }
.mb-3 { margin-bottom: 22px  !important; }
.mb-4 { margin-bottom: 32px  !important; }
.p-0  { padding: 0 !important; }
.w-100 { width: 100% !important; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* Mobile overlay */
.mob-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 199;
}
.mob-overlay.open { display: block; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-wrapper { margin-left: 0; }
  .hamburger { display: flex; }
  .login-hero { display: none; }
  .login-form-side { width: 100%; box-shadow: none; }
}
@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .client-stats { grid-template-columns: 1fr; }
  .col-2, .col-3 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
  .top-bar { padding: 0 14px; }
  .hide-mobile { display: none !important; }
  .confirm-summary { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .pay-tabs { gap: 6px; }
  .pay-tab { min-width: 60px; padding: 8px 10px; font-size: 11px; }
}
