/* Amasiko Assessment Centre Portal
   Themed to match the Amasiko CRM brand.
   Navy #1C3D52 and Gold #C9A84C, Playfair Display and Outfit. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --navy: #1C3D52;
    --navy-deep: #0f2333;
    --navy-mid: #254e6b;
    --navy-light: #3a6b8a;

    --gold: #C9A84C;
    --gold-light: #e0c06a;
    --gold-pale: #f5e9c8;
    --gold-dark: #a8862f;

    --white: #ffffff;
    --off-white: #F9F7F4;
    --gray-light: #EDECEA;
    --gray: #9AA5AD;

    --ink: #1e2d38;
    --text-light: #5a6e7a;
    --muted: #8a9ba6;

    --success: #1a8a4a;
    --danger: #b91c1c;
    --amber: #a8862f;

    --bg: var(--off-white);
    --panel: var(--white);
    --line: var(--gray-light);
    --brand: var(--navy);
    --brand-dark: var(--navy-deep);
    --accent: var(--gold);

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Outfit', sans-serif;

    --radius: 10px;
    --shadow: 0 4px 16px rgba(28, 61, 82, 0.08);
    --shadow-gold: 0 8px 28px rgba(201, 168, 76, 0.28);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
}

h1, h2, h3 { font-family: var(--font-display); }

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

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

.sidebar {
    width: 240px;
    background: var(--navy-deep);
    color: #cdd9e2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.brand { padding: 26px 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.brand-name {
    display: block;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}
.brand-sub {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 3px;
}
.sidebar nav { padding: 12px 0; flex: 1; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0 10px; }
.sidebar nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #b8c6d1;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background 0.25s, color 0.25s;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; text-decoration: none; }
.sidebar nav a.active {
    background: rgba(201, 168, 76, 0.12);
    border-left-color: var(--gold);
    color: #fff;
    font-weight: 600;
}
.nav-ref {
    font-size: 10px;
    font-weight: 700;
    background: rgba(201, 168, 76, 0.18);
    color: var(--gold-light);
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 16px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h1 { font-size: 20px; margin: 0; color: var(--navy); font-weight: 700; }
.user-box { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.user-name { font-weight: 600; color: var(--navy); }
.user-role { color: var(--muted); }
.logout { color: var(--gold-dark); font-weight: 600; }

.content { padding: 26px; flex: 1; }
.page-footer { padding: 16px 26px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* Panels */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 22px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.panel-head h2 { font-size: 18px; margin: 0; color: var(--navy); font-weight: 700; }
.sub { font-size: 14px; margin: 18px 0 8px; color: var(--text-light); font-family: var(--font-display); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .sidebar { width: 190px; } }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.25s, transform 0.25s;
}
.stat-card:hover { text-decoration: none; border-color: var(--gold); transform: translateY(-2px); }
.stat-num { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.table.compact th, .table.compact td { padding: 8px 10px; }
.muted { color: var(--muted); font-size: 12px; }

/* Forms */
form.stacked label, form label { display: block; font-size: 13px; margin-bottom: 13px; font-weight: 600; color: var(--text-light); }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], input[type=file], select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-body);
    color: var(--ink);
    background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.row { display: flex; gap: 15px; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 150px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
label.check input { width: auto; margin: 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form label { margin: 0; }
.movement-form { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 6px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s;
}
.btn:hover { border-color: var(--gold); color: var(--gold-dark); text-decoration: none; }
.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 12px;
    padding: 12px 24px;
}
.btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); box-shadow: var(--shadow-gold); transform: translateY(-2px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-small { padding: 6px 14px; font-size: 12px; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 11px; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; }
.badge-blue { background: rgba(28, 61, 82, 0.08); color: var(--navy); }
.badge-green { background: rgba(26, 138, 74, 0.12); color: var(--success); }
.badge-amber { background: rgba(201, 168, 76, 0.16); color: var(--gold-dark); }
.badge-red { background: rgba(185, 28, 28, 0.10); color: var(--danger); }
.badge-grey { background: var(--gray-light); color: var(--text-light); }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: rgba(26, 138, 74, 0.10); color: #15703c; border: 1px solid rgba(26, 138, 74, 0.25); }
.alert-error, .alert-red { background: rgba(185, 28, 28, 0.08); color: #8f1a1a; border: 1px solid rgba(185, 28, 28, 0.22); }
.alert-amber { background: rgba(201, 168, 76, 0.12); color: #7a5c17; border: 1px solid rgba(201, 168, 76, 0.3); }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; margin-bottom: 8px; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tabs a { padding: 6px 13px; border-radius: 40px; font-size: 12px; color: var(--text-light); background: var(--bg); border: 1px solid var(--line); }
.filter-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-tabs a:hover { text-decoration: none; border-color: var(--gold); }

/* Capacity bar and dimmed rows */
.capacity-bar { height: 8px; background: var(--gray-light); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.capacity-fill { height: 100%; background: var(--gold); }
.row-dim { opacity: 0.55; }

/* Auth */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--navy-deep);
    background-image: radial-gradient(circle at 30% 20%, rgba(201, 168, 76, 0.08), transparent 60%);
    font-family: var(--font-body);
}
.auth-card {
    background: #fff;
    padding: 38px 34px;
    border-radius: 16px;
    width: 360px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.auth-card h1 { font-size: 20px; margin: 0 0 20px; color: var(--navy); }
.auth-brand { text-align: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-brand .brand-name { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--navy); }
.auth-brand .brand-sub { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }
.auth-card label { color: var(--text-light); }
.auth-card .btn-primary { width: 100%; justify-content: center; margin-top: 8px; }

/* Accreditation banner on the dashboard */
.acc-banner {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
    background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 22px;
}
.acc-banner-warn { border-left-color: var(--danger); }
.acc-body { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 15px; }
.acc-num { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; margin-top: 2px; }
.acc-right { display: flex; align-items: center; gap: 12px; }
.acc-dates { font-size: 12px; color: var(--muted); }
