:root {
    --primary: #10a37f;
    --primary-dark: #0d8a6b;
    --primary-light: #1bc396;
    --text-dark: #ececf1;
    --text-medium: #c5c5d2;
    --text-light: #8e8ea0;
    --text-muted: #6e6e80;
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --border-light: #2f2f2f;
    --border-medium: #404040;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* ── Layout ── */
.portal-wrap {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    top: 0; left: 0; bottom: 0;
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0.5rem 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
}

.sidebar-logo span { color: var(--primary); }

.sidebar-nav { flex: 1; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg-tertiary);
    color: var(--text-dark);
}

.sidebar-nav a.active { color: var(--primary); }

.sidebar-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.sidebar-footer a:hover { color: #ef4444; background: rgba(239,68,68,0.08); }

.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.page-header p {
    color: var(--text-light);
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* ── Cards ── */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ── Status badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-planning   { background: rgba(99,102,241,0.15); color: #818cf8; }
.badge-inprogress { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.badge-review     { background: rgba(249,115,22,0.15);  color: #fb923c; }
.badge-live       { background: rgba(16,163,127,0.15);  color: #10a37f; }

/* ── Progress bar ── */
.progress-wrap {
    background: var(--bg-tertiary);
    border-radius: 100px;
    height: 6px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 100px;
    background: var(--primary);
    transition: width 0.4s ease;
}

/* ── Timeline ── */
.timeline { list-style: none; position: relative; padding-left: 1.5rem; }

.timeline::before {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 0.5rem;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline li {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -1.175rem;
    top: 0.45rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.timeline-msg { color: var(--text-medium); font-size: 0.9rem; }

/* ── Stats row ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ── Table ── */
.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.portal-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
}

.portal-table td {
    padding: 0.85rem 1rem;
    color: var(--text-medium);
    border-bottom: 1px solid var(--border-light);
}

.portal-table tr:last-child td { border-bottom: none; }
.portal-table tr:hover td { background: var(--bg-tertiary); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.875rem;
    color: var(--text-dark);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,163,127,0.15);
}

.form-group textarea { resize: vertical; min-height: 90px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-medium);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

/* ── Login page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
}

.login-logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-logo span { color: var(--primary); }

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Alert ── */
.alert-success {
    background: rgba(16,163,127,0.1);
    border: 1px solid rgba(16,163,127,0.25);
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 1rem; }
}
