:root {
    --aiesec-blue: #037ef3;
    --aiesec-blue-dark: #002a5c;
    --aiesec-orange: #f9a03f;
    --aiesec-navy: #041c3c;
    --green: #1aa260;
    --gray: #6b7280;
    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #1a2233;
    --text-muted: #64748b;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(4, 28, 60, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--aiesec-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--aiesec-navy);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.brand span { color: var(--aiesec-orange); }
.brand:hover { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.65rem 1.3rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--aiesec-blue); color: #fff; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(3, 126, 243, 0.35); }
.btn-ghost { background: transparent; color: var(--aiesec-blue); border: 1.5px solid var(--aiesec-blue); }
.btn-ghost:hover { background: rgba(3, 126, 243, 0.08); }
.btn-danger { background: transparent; color: #d9483c; border: 1.5px solid #d9483c; }
.btn-danger:hover { background: rgba(217, 72, 60, 0.08); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Public site ---------- */
.site-header, .admin-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header-inner, .admin-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero {
    background: linear-gradient(135deg, var(--aiesec-navy), var(--aiesec-blue));
    color: #fff;
    padding: 5rem 1.5rem 4.5rem;
    text-align: center;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.2rem;
}
.hero h1 { font-size: 3rem; margin: 0 0 1rem; font-weight: 800; }
.hero-lead { font-size: 1.1rem; opacity: 0.92; margin: 0; }

.section { padding: 4rem 1.5rem; }
.section-alt { background: #fff; }
.section-inner { max-width: 1000px; margin: 0 auto; }
.section h2 { font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--aiesec-navy); }
.section p { color: var(--text-muted); font-size: 1.05rem; max-width: 720px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem;
}
.feature-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--aiesec-blue);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}
.feature-card h3 { margin: 0 0 0.5rem; color: var(--aiesec-navy); }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

.site-footer { padding: 2rem 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Member status page ---------- */
.member-section {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}
.member-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border-top: 6px solid var(--gray);
}
.member-card.status-active { border-top-color: var(--green); }
.member-card.status-passive { border-top-color: var(--gray); }
.member-status-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    background: rgba(107, 114, 128, 0.12);
    color: var(--gray);
}
.status-active .member-status-badge { background: rgba(26, 162, 96, 0.12); color: var(--green); }
.member-card h1 { margin: 0 0 1.2rem; font-size: 1.6rem; color: var(--aiesec-navy); }
.member-meta { display: flex; flex-direction: column; gap: 0.8rem; margin: 0 0 1.2rem; }
.member-meta dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.member-meta dd { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 600; }
.member-note { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.member-card-notfound h1 { color: var(--text); }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 1.5rem; }
.admin-nav a { color: var(--text-muted); font-weight: 600; font-size: 0.95rem; }
.admin-nav a:hover { color: var(--aiesec-blue); text-decoration: none; }
.admin-user { display: flex; align-items: center; gap: 0.9rem; font-size: 0.88rem; color: var(--text-muted); }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.page-head { margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; font-size: 1.7rem; color: var(--aiesec-navy); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem;
    text-align: center;
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--aiesec-navy); }
.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.2rem; }
.stat-active .stat-value { color: var(--green); }
.stat-passive .stat-value { color: var(--gray); }

.panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.6rem;
    margin-bottom: 1.6rem;
}
.panel h2 { margin: 0 0 1.1rem; font-size: 1.15rem; color: var(--aiesec-navy); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}
.form-grid label, .login-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
input[type="text"], input[type="password"], select {
    padding: 0.6rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--aiesec-blue); }
.form-actions { display: flex; align-items: flex-end; }

.filter-bar { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { min-width: 160px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--border);
}
.data-table th { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; }
.empty-row { text-align: center; color: var(--text-muted); padding: 1.5rem; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-active { background: rgba(26, 162, 96, 0.12); color: var(--green); }
.badge-passive { background: rgba(107, 114, 128, 0.12); color: var(--gray); }

.row-actions { display: flex; gap: 0.5rem; }
.inline-form { display: inline; }

.alert { padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 1.2rem; font-size: 0.9rem; }
.alert-error { background: rgba(217, 72, 60, 0.1); color: #b8362b; }
.alert-success { background: rgba(26, 162, 96, 0.1); color: #157a4a; }

/* ---------- Login ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--aiesec-navy), var(--aiesec-blue));
}
.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    padding: 2.5rem;
    width: 100%;
    max-width: 360px;
}
.login-brand { font-size: 1.7rem; font-weight: 800; color: var(--aiesec-navy); }
.login-brand span { color: var(--aiesec-orange); }
.login-sub { color: var(--text-muted); margin: 0.2rem 0 1.5rem; font-size: 0.9rem; }
.login-form { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 640px) {
    .hero h1 { font-size: 2.2rem; }
    .admin-header-inner { flex-wrap: wrap; gap: 0.6rem; }
    .admin-nav { order: 3; width: 100%; justify-content: space-between; }
}
