/* ── AcelleMail UI ── */
:root {
  --brand: #3b5bf4;
  --brand-2: #7c3aed;
  --bg: #f6f8fb;
  --sidebar-w: 240px;
  --radius: 12px;
  --text: #0f172a;
  --muted: #6b7280;
  --border: #e8eaf0;
  --shadow: 0 1px 3px rgba(15, 23, 42, .05);
}

body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }

.brand { font-weight: 800; background: linear-gradient(90deg, #0f172a, #312e81); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* shell */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w); background: #fff;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 10;
}
.app-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
@media (max-width: 768px) {
  .app-sidebar { display: none; }
  .app-sidebar.open { display: flex; }
  .app-main { margin-left: 0; }
}
.sidebar-brand { padding: 18px 20px; font-weight: 800; border-bottom: 1px solid var(--border); }
.sidebar-brand a { color: inherit; text-decoration: none; font-size: 18px; }
.sidebar-nav { padding: 12px 10px; flex: 1 1 auto; overflow-y: auto; }
.nav-group { padding: 14px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none;
  font-weight: 500; font-size: 14px;
}
.nav-item:hover { background: #f1f3f9; color: var(--text); }
.nav-item .material-icons-outlined { font-size: 20px; color: var(--muted); }

.sidebar-user { padding: 14px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.sidebar-user-name { font-weight: 600; }
.sidebar-user-email { color: var(--muted); font-size: 12px; word-break: break-all; }

/* topbar */
.app-topbar {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.search-box {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 8px;
  background: #f5f7fc; border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 10px;
}
.search-input { flex: 1; border: 0; background: transparent; outline: none; font-size: 14px; }
.kbd { font-size: 11px; background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* cards */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-stat { padding: 18px; background: #fff; }
.card-action-link {
  display: flex; gap: 12px; align-items: center;
  padding: 16px 18px; text-decoration: none; color: var(--text);
  background: #fff;
}
.card-action-link:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .06); }
.card-action-link .material-icons-outlined { font-size: 28px; }
.card-metric { padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }

.stat-label { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; font-weight: 600; }
.stat-value { font-size: 1.6rem; font-weight: 800; }
.stat-progress { margin-top: 10px; font-size: 12px; color: var(--muted); }
.icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #eef2ff; color: var(--brand);
  flex-shrink: 0;
}

/* badges */
.badge-soft { background: #eef2ff; color: var(--brand); font-weight: 500; }

/* forms */
.auth-card {
  background: #fff; padding: 2rem; border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.btn-primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border: 0;
}
.btn-primary:hover { opacity: .92; }
.btn-outline-secondary:hover { background: #f1f3f9; }

/* tables */
.table > :not(caption) > * > * { padding: 0.85rem 1rem; vertical-align: middle; }
.table thead th { font-size: 0.78rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; font-weight: 600; }
.table-sm > :not(caption) > * > * { padding: 0.55rem 0.75rem; }

/* misc */
.text-muted { color: var(--muted) !important; }
.font-monospace { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
