/* ─── Reset & Base ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    line-height: 1.6;
    font-size: 15px;
}

a { color: #4361ee; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Sidebar + Layout ─────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    min-width: 220px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}
.sidebar-logo {
    padding: 20px 20px 12px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.5px;
}
.sidebar-tenant {
    padding: 0 20px 16px;
    font-size: 13px;
    color: #818cf8;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: #a0aec0;
    transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: rgba(67,97,238,.2); color: #fff; }
.sidebar-nav a .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 12px 0;
}
.sidebar-bottom a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: #a0aec0;
    transition: background .15s, color .15s;
}
.sidebar-bottom a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }

.main-content {
    flex: 1;
    margin-left: 220px;
}
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px; }

/* ─── Trial Banner ─────────────────────────── */
.trial-banner {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #fcd34d;
}

/* ─── Mobile sidebar toggle ────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
}

/* Legacy nav (unused but keep for compat) */
.nav {
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.nav .brand { font-weight: 700; font-size: 18px; color: #fff; }
.nav a { color: #a0aec0; font-size: 14px; }
.nav a:hover, .nav a.active { color: #fff; text-decoration: none; }
.nav .spacer { flex: 1; }

/* ─── Cards ─────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ─── Stats row ─────────────────────────────── */
.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
}
.stat-card .value { font-size: 28px; font-weight: 700; color: #4361ee; }
.stat-card .label { font-size: 12px; color: #666; margin-top: 4px; }

/* ─── Tables ────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
th { font-size: 12px; text-transform: uppercase; color: #888; font-weight: 600; }
tr:hover { background: #f9fafb; }

/* ─── Badges ────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-broadcast { background: #dbeafe; color: #1e40af; }
.badge-taken { background: #fef3c7; color: #92400e; }
.badge-sold { background: #d1fae5; color: #065f46; }
.badge-refused { background: #fee2e2; color: #991b1b; }
.badge-expired { background: #e5e7eb; color: #4b5563; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* ─── Forms ─────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="tel"], select, textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 2px rgba(67,97,238,0.15); }
textarea { resize: vertical; min-height: 80px; }

/* ─── Buttons ───────────────────────────────── */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.btn-primary { background: #4361ee; color: #fff; }
.btn-primary:hover { background: #3651d4; text-decoration: none; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-link { background: none; color: #4361ee; padding: 4px 8px; }

/* ─── Alerts ────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ─── Filters ───────────────────────────────── */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    background: #e5e7eb;
    color: #374151;
}
.filters a:hover, .filters a.active { background: #4361ee; color: #fff; text-decoration: none; }

/* ─── Inline form ───────────────────────────── */
.inline-form { display: inline; }

/* ─── Invite box ────────────────────────────── */
.invite-box {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 20px;
    word-break: break-all;
}

/* ─── Landing ───────────────────────────────── */
.hero {
    text-align: center;
    padding: 80px 16px 60px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}
.hero h1 { font-size: 42px; margin-bottom: 16px; }
.hero p { font-size: 18px; color: #a0aec0; max-width: 600px; margin: 0 auto 32px; }

.steps { display: flex; gap: 24px; margin: 40px 0; flex-wrap: wrap; }
.step {
    flex: 1;
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.step .num { font-size: 32px; font-weight: 700; color: #4361ee; }
.step h3 { margin: 8px 0; }

.lead-form { max-width: 480px; margin: 0 auto; }

/* ─── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .sidebar-toggle { display: block; }
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .container { padding: 60px 12px 24px; }
}
@media (max-width: 640px) {
    .stats-row { flex-direction: column; }
    .steps { flex-direction: column; }
    .hero h1 { font-size: 28px; }
    table { font-size: 13px; }
    th, td { padding: 8px 6px; }
}
