/* ============================================================
   SSAcc Web - Main Stylesheet
   Font: Plus Jakarta Sans + JetBrains Mono
   Theme: Clean Ledger — hijau tua profesional
   ============================================================ */

:root {
  --sidebar-w: 250px;
  --topbar-h: 56px;

  /* Brand colors */
  --primary:      #1a6b4a;
  --primary-light:#e8f5ee;
  --primary-mid:  #2d8c61;
  --accent:       #f0a500;
  --accent-light: #fff8e6;

  /* Neutrals */
  --bg:        #f4f6f8;
  --surface:   #ffffff;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --text-muted:#64748b;
  --text-light:#94a3b8;

  /* Status */
  --success: #16a34a;
  --danger:  #dc2626;
  --warning: #d97706;
  --info:    #0284c7;

  /* Typography */
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-logo {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  flex-shrink: 0;
}

.brand-name {
  display: block;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: .5px;
}

.brand-company {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

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

.nav-section {
  padding: 14px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all .15s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-left-color: rgba(255,255,255,.4);
}

.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-left-color: var(--accent);
  font-weight: 600;
}

.nav-item i { font-size: 16px; width: 20px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.user-info { display: flex; align-items: center; gap: 10px; }

.user-avatar {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; color: #fff; }

.logout-link {
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  transition: color .15s;
}
.logout-link:hover { color: #ff8a8a; }

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

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-toggle {
  background: none; border: none;
  font-size: 20px; color: var(--text-muted);
  cursor: pointer; padding: 4px;
  display: none;
}

.topbar-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  flex: 1;
}

.topbar-right {
  display: flex; align-items: center; gap: 16px;
}

.topbar-date {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

/* ── CARDS ──────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

.card-header-custom {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header-custom h6 {
  font-weight: 700;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.card-body-custom { padding: 20px; }

/* Stat cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.stat-icon.green  { background: var(--primary-light); color: var(--primary); }
.stat-icon.yellow { background: var(--accent-light);  color: var(--accent); }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }
.stat-icon.blue   { background: #eff6ff; color: var(--info); }

.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; font-family: var(--font-mono); }
.stat-sub   { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ── TABLE ──────────────────────────────── */
.table-ssacc {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table-ssacc thead th {
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

.table-ssacc tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}

.table-ssacc tbody tr:hover { background: #f8fafc; }

.table-ssacc tbody td {
  padding: 10px 14px;
  vertical-align: middle;
}

.table-ssacc tbody tr:last-child td { border-bottom: none; }

.nominal { font-family: var(--font-mono); font-size: 13px; }
.debet   { color: var(--info); }
.kredit  { color: var(--danger); }

/* ── BADGES ─────────────────────────────── */
.badge-d { background: #eff6ff; color: var(--info);    padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.badge-k { background: #fef2f2; color: var(--danger);  padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }

/* ── FORMS ──────────────────────────────── */
.form-label { font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,74,.12);
  outline: none;
}

/* ── BUTTONS ─────────────────────────────── */
.btn-primary-ssacc {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, transform .1s;
}
.btn-primary-ssacc:hover { background: var(--primary-mid); transform: translateY(-1px); }

.btn-secondary-ssacc {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.btn-secondary-ssacc:hover { background: #e2e8f0; }

.btn-danger-ssacc {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger-ssacc:hover { background: #fee2e2; }

/* ── ALERTS ─────────────────────────────── */
.alert-ssacc {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }
.alert-danger   { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }
.alert-warning  { background: #fffbeb; border: 1px solid #fde68a; color: var(--warning); }

/* ── PAGE HEADER ────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h5 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.page-header .breadcrumb-custom {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
  .page-content {
    padding: 16px;
  }
}

/* ── OVERLAY (mobile) ───────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }
