/* =========================================================================
   CampusPulse — Capricorn TVET College Captive Portal
   Custom branding on top of Bootstrap 5
   Colours: gold #C8A961 · red #B91C2E · blue #0492C2 · bg #F8F9FA · text #2C3E50
   ========================================================================= */

:root {
    --brand-gold:   #C8A961;
    --brand-gold-d: #a98c45;
    --brand-red:    #B91C2E;
    --brand-red-d:  #971622;
    --brand-blue:   #0492C2;
    --brand-blue-d: #037299;
    --brand-bg:     #F8F9FA;
    --brand-text:   #2C3E50;
    --radius:       14px;
    --shadow:       0 10px 30px rgba(44, 62, 80, 0.12);
}

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--brand-text);
    background: var(--brand-bg);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Decorative top gradient bar ---------------------------------------- */
.brand-bar {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg,
        var(--brand-gold) 0%,
        var(--brand-red) 50%,
        var(--brand-blue) 100%);
}

/* ---- Header ------------------------------------------------------------- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.06);
    padding: .75rem 0;
}
.site-header .logo {
    height: 56px;
    width: auto;
}
.site-header .brand-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--brand-text);
    line-height: 1.1;
    margin: 0;
}
.site-header .brand-sub {
    font-size: .78rem;
    color: var(--brand-red);
    font-style: italic;
    margin: 0;
}

/* ---- Hero / landing ----------------------------------------------------- */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    background:
        radial-gradient(1200px 400px at 100% -10%, rgba(4,146,194,.10), transparent),
        radial-gradient(1000px 400px at -10% 110%, rgba(200,169,97,.14), transparent);
}
.hero .hero-logo {
    max-width: 220px;
    width: 60%;
    filter: drop-shadow(0 8px 18px rgba(44,62,80,.18));
}
.hero h1 {
    font-weight: 800;
    color: var(--brand-text);
}
.hero .lead {
    color: #55606b;
}

/* ---- Cards -------------------------------------------------------------- */
.card-portal {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: #fff;
}
.card-portal .card-header {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-d));
    color: #fff;
    border: none;
    padding: 1.1rem 1.25rem;
}
.card-portal .card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.card-portal .card-body { padding: 1.5rem; }

/* ---- Buttons ------------------------------------------------------------ */
.btn-brand {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    font-weight: 600;
    padding: .65rem 1.25rem;
    border-radius: 10px;
    transition: background .15s ease, transform .05s ease;
}
.btn-brand:hover, .btn-brand:focus {
    background: var(--brand-red-d);
    border-color: var(--brand-red-d);
    color: #fff;
}
.btn-brand:active { transform: translateY(1px); }

.btn-gold {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: #3a2f10;
    font-weight: 700;
    padding: .65rem 1.25rem;
    border-radius: 10px;
}
.btn-gold:hover, .btn-gold:focus {
    background: var(--brand-gold-d);
    border-color: var(--brand-gold-d);
    color: #3a2f10;
}

.btn-outline-brand {
    border: 2px solid var(--brand-blue);
    color: var(--brand-blue);
    font-weight: 600;
    border-radius: 10px;
    padding: .6rem 1.2rem;
    background: #fff;
}
.btn-outline-brand:hover {
    background: var(--brand-blue);
    color: #fff;
}

/* ---- Forms -------------------------------------------------------------- */
.form-label { font-weight: 600; color: var(--brand-text); }
.form-control, .form-select {
    border-radius: 10px;
    padding: .65rem .85rem;
    border: 1.5px solid #dfe3e8;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 .2rem rgba(4,146,194,.18);
}
.input-hint { font-size: .8rem; color: #7a838c; }

/* ---- Alerts / feedback -------------------------------------------------- */
.alert { border-radius: 10px; border: none; }

/* ---- Success page ------------------------------------------------------- */
.success-icon {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: #e8f8ee;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    color: #1e9e54;
    font-size: 2.6rem;
}
.session-detail {
    display: flex; justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px dashed #e3e7eb;
}
.session-detail:last-child { border-bottom: none; }
.session-detail .k { color: #7a838c; }
.session-detail .v { font-weight: 600; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
    background: var(--brand-text);
    color: #cfd6dd;
    padding: 1.25rem 0;
    font-size: .85rem;
    text-align: center;
    margin-top: auto;
}
.site-footer a { color: var(--brand-gold); text-decoration: none; }

/* ---- Admin -------------------------------------------------------------- */
.admin-navbar { background: var(--brand-text) !important; }
.stat-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    background: #fff;
}
.stat-card .num { font-size: 2rem; font-weight: 800; }
.stat-card.gold .num { color: var(--brand-gold-d); }
.stat-card.red  .num { color: var(--brand-red); }
.stat-card.blue .num { color: var(--brand-blue); }
.badge-event { font-size: .72rem; font-weight: 600; }

/* ---- Utilities ---------------------------------------------------------- */
.text-brand-red  { color: var(--brand-red) !important; }
.text-brand-blue { color: var(--brand-blue) !important; }
.spinner-inline { width: 1rem; height: 1rem; border-width: .15em; }

@media (max-width: 576px) {
    .hero .hero-logo { max-width: 160px; }
    .site-header .brand-name { font-size: 1rem; }
}
