/* =========================================
   LearnLytics / University Portal Brand CSS
   ========================================= */

/* ── Root Brand Variables ───────────────── */

:root {
    --brand-primary:   #1a2e4a;
    --brand-accent:    #c8922a;
    --brand-light:     #f4f6f9;
    --brand-text:      #1c1f26;
    --brand-muted:     #6c7585;
    --brand-border:    #dde1e9;
    --brand-radius:    0.5rem;
    --brand-shadow:    0 4px 24px rgba(26,46,74,.10);
}

/* ── Global Layout ──────────────────────── */

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--brand-text);
    background-color: var(--brand-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, .display-font {
    font-family: 'Playfair Display', serif;
}

main {
    flex: 1;
}

/* ── Navbar ─────────────────────────────── */

.navbar {
    background: var(--brand-primary);
    border-bottom: 3px solid var(--brand-accent);
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.navbar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: white;
    padding: 3px;
}

.navbar-logo-placeholder {
    width: 40px;
    height: 40px;
    background: var(--brand-accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0;
}

.nav-link {
    color: rgba(255,255,255,.75) !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color .15s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
}

.nav-link-accent {
    color: var(--brand-accent) !important;
    font-weight: 600;
}

/* ── Theme Toggle Button ────────────────── */

.theme-toggle {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.3);
}

.theme-icon {
    font-size: 1.1rem;
}

/* ── Cards ──────────────────────────────── */

.card {
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    background-color: var(--bs-body-bg);
    transition: background-color 0.3s ease;
}

.card-header-brand {
    background: var(--brand-primary);
    color: white;
    border-radius: calc(var(--brand-radius) - 1px)
                   calc(var(--brand-radius) - 1px) 0 0 !important;
    padding: 1.25rem 1.5rem;
    border-bottom: 3px solid var(--brand-accent);
}

/* ── Buttons ────────────────────────────── */

.btn-brand {
    background: var(--brand-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--brand-radius);
    transition: background .2s, transform .1s, box-shadow .2s;
    letter-spacing: 0.02em;
}

.btn-brand:hover {
    background: #243d61;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,46,74,.25);
    transform: translateY(-1px);
}

.btn-brand:active {
    transform: translateY(0);
}

.btn-accent {
    background: var(--brand-accent);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--brand-radius);
    transition: background .2s, transform .1s;
}

.btn-accent:hover {
    background: #b07d20;
    color: #fff;
    transform: translateY(-1px);
}

/* ── Forms ──────────────────────────────── */

.form-control,
.form-select {
    border-radius: var(--brand-radius);
    border: 1px solid var(--brand-border);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(26,46,74,.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--brand-text);
    margin-bottom: 0.4rem;
}

/* ── Alerts ─────────────────────────────── */

.alert {
    border-radius: var(--brand-radius);
    border: none;
    font-size: 0.9rem;
}

/* ── Footer ─────────────────────────────── */

footer {
    background: var(--brand-primary);
    color: rgba(255,255,255,.6);
    font-size: 0.82rem;
    padding: 1.25rem 0;
    border-top: 3px solid var(--brand-accent);
    margin-top: auto;
}

footer a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}

footer a:hover {
    color: white;
}

/* ── Auth Layout ────────────────────────── */

.auth-wrapper {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

/* ── Accent Rule ────────────────────────── */

.accent-rule {
    height: 3px;
    background: var(--brand-accent);
    border: none;
    border-radius: 2px;
    width: 48px;
    margin: 0.75rem 0 1.25rem;
}
