/* Shared UI tokens and readability rules. Loaded after each layout's CDN and inline styles. */
:root {
    --ui-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --ui-text: #1f2937;
    --ui-text-secondary: #4b5563;
    --nav-h: 72px;
}

body {
    font-family: var(--ui-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ui-text);
}

.text-muted,
.text-light-custom {
    color: var(--ui-text-secondary) !important;
}

small,
.small,
.form-text,
.form-label {
    font-size: 0.875rem;
}

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* Public navbar */
.site-nav {
    min-height: var(--nav-h);
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.site-nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: #004080;
}

.site-nav .navbar-brand img {
    height: 44px;
    width: auto;
}

.site-nav .nav-link {
    color: var(--ui-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
    color: #004080;
    border-bottom-color: #004080;
}

.site-nav .nav-link.nav-cta {
    margin-left: 0.5rem;
    border: 0;
    border-radius: 0.5rem;
    background: #004080;
    color: #fff;
}

.site-nav .nav-link.nav-cta:hover {
    background: #0066cc;
}

@media (max-width: 991.98px) {
    :root { --nav-h: 64px; }
    .site-nav .navbar-brand img { height: 38px; }
    .site-nav .nav-link.nav-cta { margin: 0.5rem 0 0; text-align: center; }
}

/* Auth / public page logo block */
.page-logo {
    display: block;
    height: 64px;
    width: auto;
    margin: 0 auto 1.5rem;
}

/* Dashboard home */
.dash-section { margin-bottom: 1.5rem; }
.dash-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.dash-card, .stat-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.dash-card { padding: 1.5rem; }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dash-empty { color: var(--ui-text-secondary); margin: 0; }
.dash-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 0; border-top: 1px solid #e5e7eb; }
.dash-row:first-child { border-top: 0; padding-top: 0; }
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; height: 100%; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 0.875rem; color: var(--ui-text-secondary); }
.tone-blue { background: #dbeafe; color: #1d4ed8; }
.tone-purple { background: #ede9fe; color: #6d28d9; }
.tone-green { background: #dcfce7; color: #15803d; }
.tone-amber { background: #fef3c7; color: #b45309; }
.folder-list { max-height: 22rem; overflow-y: auto; }
.folder-list thead th { position: sticky; top: 0; z-index: 2; background: #fff; font-weight: 600; font-size: 0.8125rem; color: var(--ui-text-secondary); }
.folder-link { color: inherit; text-decoration: none; }
.folder-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; font-size: 0.8125rem; margin-right: 0.625rem; }

/* Sticky footer: footer sits at the bottom of short pages */
body.page-sticky { display: flex; flex-direction: column; min-height: 100vh; }
body.page-sticky > footer { margin-top: auto; }
.content { display: flex; flex-direction: column; }
.content > .fade-in { flex: 1 0 auto; }

/* Public pages: shared background, footer and buttons */
body.site-bg { background: #f8fafc; }

.site-footer { background: #002856; color: #fff; padding: 1.5rem 0; }
.site-footer .footer-content { max-width: 800px; margin: 0 auto; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.75rem; }
.site-footer .footer-link { color: #fff; text-decoration: none; }
.site-footer .footer-link:hover { color: #FFC107; text-decoration: underline; }
.site-footer .copyright { opacity: 0.8; font-size: 0.875rem; }
@media (max-width: 768px) {
    .site-footer .footer-links { flex-direction: column; align-items: center; gap: 0.5rem; }
}

.btn-apply, .btn-view {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.25rem; border: 0; border-radius: 50px;
    font-weight: 600; font-size: 0.9rem; text-decoration: none; cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-apply { background: #004080; color: #fff; }
.btn-apply:hover { background: #0066cc; color: #fff; }
.btn-view { background: #FFD700; color: #004080; }
.btn-view:hover { background: #ffcc00; color: #004080; box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4); }

.status-badge {
    display: inline-flex; align-items: center; padding: 0.25rem 0.75rem;
    border-radius: 50px; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.status-open { background: #dcfce7; color: #15803d; }
.status-closed { background: #fee2e2; color: #b91c1c; }

/* Application statuses, same colours as the admin applications list */
.status-approved { background: #dcfce7; color: #16a34a; }
.status-shortlisted { background: #dbeafe; color: #2563eb; }
.status-pending { background: #ffedd5; color: #ea580c; }
.status-rejected { background: #fee2e2; color: #dc2626; }

/* Openings page */
.openings-head { background: linear-gradient(135deg, #004080 0%, #0066cc 100%); color: #fff; padding: 1.75rem 0; text-align: center; }
.openings-head h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 0.25rem; }
.openings-head p { margin: 0; opacity: 0.9; }

.job-card { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); overflow: hidden; transition: box-shadow 0.2s; }
.job-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12); }
.job-card-head { background: #004080; color: #fff; padding: 0.75rem 1rem; }
.job-card-head h2 { font-size: 1.05rem; font-weight: 600; margin: 0; line-height: 1.3; }
.job-card-body { display: flex; flex-direction: column; flex: 1; padding: 1rem; }
.job-info { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; font-size: 0.9rem; }
.job-info li { display: flex; gap: 0.5rem; }
.job-info i { width: 1.1rem; margin-top: 0.2rem; color: #004080; text-align: center; }
.job-info small { display: block; color: var(--ui-text-secondary); font-size: 0.75rem; line-height: 1.2; }
.job-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: auto; }

/* Vacancy details (page and modal) */
.vd { font-size: 0.95rem; }
.vd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e5e7eb; }
.vd-ref { font-size: 0.8rem; color: var(--ui-text-secondary); letter-spacing: 0.04em; }
.vd-title { font-size: 1.5rem; font-weight: 700; color: #004080; margin: 0.1rem 0 0.5rem; line-height: 1.25; }
.vd-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; color: var(--ui-text-secondary); font-size: 0.875rem; }
.vd-meta i { color: #0066cc; margin-right: 0.35rem; }
.vd-section { margin-bottom: 0.75rem; padding: 0.75rem 1rem; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; }
.vd-section h3 { font-size: 1rem; font-weight: 600; color: #004080; margin: 0 0 0.5rem; }
.vd-section h3 i { color: #0066cc; margin-right: 0.5rem; }
.vd-block { line-height: 1.55; }
.vd-block > :last-child { margin-bottom: 0; }
.vd-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.25rem; }
.vd-deadline { color: var(--ui-text-secondary); font-size: 0.875rem; }
.vd-deadline i { color: #0066cc; margin-right: 0.35rem; }
.vd-page { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); padding: 1.25rem; }
.vd-back { display: inline-block; margin-bottom: 0.75rem; color: #004080; text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.vd-back i { margin-right: 0.4rem; }
.vd-back:hover { color: #0066cc; }
.vd-modal .modal-content { border: 0; border-radius: 12px; }
.vd-modal .modal-body { padding: 1.25rem; }
.vd-modal .btn-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }
.vd-modal .vd-head { padding-right: 1.5rem; }
@media (max-width: 576px) {
    .vd-head { flex-direction: column; }
    .vd-title { font-size: 1.25rem; }
}
