/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; font-size: 14px; color: #0f172a; background: #f8fafc; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ── Shell ── */
.shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ── */
.sidebar { width: 220px; background: #1e2235; color: #94a3b8; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid #2d3452; }
.sidebar-logo { width: 32px; height: 32px; background: #343E7B; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sidebar-title { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.sidebar-tenant { font-size: 11px; color: #64748b; }
.sidebar-nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; font-size: 13px; color: #94a3b8; width: 100%; border: none; background: none; text-align: left; transition: background 0.15s, color 0.15s; }
.nav-item:hover { background: #2d3452; color: #f1f5f9; }
.nav-item.active { background: #2d3452; color: #fff; }
.nav-item-btn { cursor: pointer; }
.sidebar-footer { padding: 8px; border-top: 1px solid #2d3452; }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-top: 4px; }
.user-avatar { width: 28px; height: 28px; background: #343E7B; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 500; color: #f1f5f9; }
.user-tenant { font-size: 10px; color: #64748b; }

/* ── Main ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 52px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; padding: 0 24px; flex-shrink: 0; }
.topbar-breadcrumb { font-size: 13px; color: #64748b; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Page header ── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 20px; font-weight: 600; color: #0f172a; }
.page-header p { font-size: 13px; color: #64748b; margin-top: 2px; }

/* ── Stats grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; }
.stat-label { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 600; color: #0f172a; }

/* ── Section ── */
.section { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-bottom: 24px; }
.section h2 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ── Login ── */
.login-body { background: #fff; min-height: 100vh; }
.login-split { display: flex; min-height: 100vh; }
.login-brand { width: 50%; background: #1e2235; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-brand-logo { width: auto; height: 60px; display: flex; align-items: center;margin-bottom: auto; }
.login-brand-logo img {height: 60px;}
.login-brand-content h1 { font-size: 36px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.login-brand-content p { font-size: 14px; color: rgba(255,255,255,0.6); max-width: 340px; line-height: 1.6; }
.login-brand-footer { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 48px; }
.login-form-panel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: 100%; max-width: 360px; }
.login-card-header { margin-bottom: 24px; }
.login-card-header h2 { font-size: 22px; font-weight: 700; color: #0f172a; }
.login-card-header p { font-size: 13px; color: #64748b; margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: #374151; }
.form-label-row { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: 12px; color: #64748b; }
.form-group input { height: 38px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 12px; font-size: 14px; font-family: inherit; color: #0f172a; outline: none; transition: border-color 0.15s; }
.form-group input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.btn-primary { height: 38px; background: #0f172a; color: #fff; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: #1e293b; }
.btn-full { width: 100%; }
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.field-error { font-size: 12px; color: #dc2626; }
.login-footer { margin-top: 32px; font-size: 12px; color: #94a3b8; }
.tenant-list { display: flex; flex-direction: column; gap: 8px; }
.tenant-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; width: 100%; transition: background 0.15s; }
.tenant-item:hover { background: #f8fafc; }
.tenant-avatar { width: 36px; height: 36px; background: #343E7B; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.tenant-name { font-size: 13px; font-weight: 600; color: #0f172a; display: block; }
.tenant-slug { font-size: 11px; color: #64748b; display: block; }

@media (max-width: 768px) {
    .login-brand { display: none; }
    .sidebar { display: none; }
}
