/* Artico Accounts — Dark theme */
:root {
  --bg:           #0f172a;
  --surface:      #1e293b;
  --surface2:     #334155;
  --border:       #334155;
  --text:         #e2e8f0;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --accent:       #2563eb;
  --accent-light: #60a5fa;
  --green:        #16a34a;
  --green-light:  #4ade80;
  --amber:        #d97706;
  --amber-light:  #f59e0b;
  --red:          #dc2626;
  --red-light:    #f87171;
  --purple:       #7c3aed;
  --radius:       8px;
  --radius-sm:    6px;
  --sidebar-w:    240px;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.2s ease;
}

.sidebar__brand {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar__icon { font-size: 22px; }
.sidebar__title { font-weight: 700; font-size: 16px; color: var(--text); }

.sidebar__nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.sidebar__footer {
  padding: 8px;
  border-top: 1px solid var(--border);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-item--active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent-light);
}

.nav-item--logout { color: var(--red-light); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mobile-header {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.mobile-header__title {
  font-weight: 600;
  font-size: 16px;
}

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

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}

/* ── Bottom nav (mobile only) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 0 12px;
  z-index: 80;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.bottom-nav-item--active { color: var(--accent-light); }
.bottom-nav-icon { font-size: 20px; }
.bottom-nav-label { font-weight: 500; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card__value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.stat-card__sub {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card--pending .stat-card__value { color: var(--amber-light); }
.stat-card--ok .stat-card__value      { color: var(--green-light); }
.stat-card--bank .stat-card__value    { color: var(--accent-light); }
.stat-card--card .stat-card__value    { color: var(--purple); }

/* ── Section headers ── */
h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(51,65,85,0.5);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge--pending  { background: rgba(245,158,11,0.15); color: var(--amber-light); }
.badge--ok       { background: rgba(22,163,74,0.15);  color: var(--green-light); }
.badge--deposit  { background: rgba(37,99,235,0.15);  color: var(--accent-light); }
.badge--withdraw { background: rgba(124,58,237,0.15); color: #a78bfa; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s;
}

.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary  { background: var(--accent);  color: #fff; }
.btn--green    { background: var(--green);   color: #fff; }
.btn--amber    { background: var(--amber);   color: #fff; }
.btn--muted    { background: var(--surface2); color: var(--text); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-muted); }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}

/* ── Section layout ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* ── Empty + loading states ── */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Quick-action cards ── */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.action-card:hover {
  border-color: var(--accent);
  background: rgba(37,99,235,0.05);
}

.action-card__icon { font-size: 28px; }
.action-card__title { font-weight: 600; font-size: 16px; color: var(--text); }
.action-card__desc  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.action-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.action-card__badge--pending { color: var(--amber-light); }
.action-card__badge--ok      { color: var(--green-light); }

/* ── Recent activity list ── */
.activity-list { display: flex; flex-direction: column; gap: 8px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
}

.activity-item__icon { font-size: 18px; flex-shrink: 0; }
.activity-item__body { flex: 1; min-width: 0; }
.activity-item__title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-item__meta  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.activity-item__amount { font-size: 15px; font-weight: 700; color: var(--amber-light); flex-shrink: 0; }

/* ── Settings page ── */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay.is-open {
    display: block;
  }

  .main {
    margin-left: 0;
    padding-bottom: 70px;
  }

  .mobile-header {
    display: flex;
  }

  .bottom-nav {
    display: flex;
  }

  .page-content {
    padding: 16px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}
