@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root {
    --font-sans: "Plus Jakarta Sans", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    --bg: #eef2ff;
    --bg-mesh: radial-gradient(circle at 18% 8%, rgba(99, 102, 241, 0.14), transparent 42%),
        radial-gradient(circle at 92% 4%, rgba(14, 165, 233, 0.12), transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.08), transparent 45%);
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-elevated: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-strong: #3730a3;
    --secondary: #0ea5e9;
    --accent-warm: #f59e0b;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --error-bg: #fef2f2;
    --error-text: #b91c1c;
    --shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.12);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --radius: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body,
body.app-body {
    font-family: var(--font-sans);
    margin: 0;
    background: var(--bg-mesh), var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

header,
header.site-header {
    background: linear-gradient(115deg, #1e1b4b 0%, #312e81 28%, #4338ca 55%, #0e7490 100%);
    color: #fff;
    padding: 18px 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
}

/* ===========================================================
   Brand system — KFSHRC logo + product name.
   Robust by design: the <img> ships with width/height attributes
   so it can never balloon to natural size even before CSS loads.
   =========================================================== */

.sidebar-shell {
    background: #ffffff;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.sidebar-shell .container-fluid {
    flex-wrap: nowrap;
    gap: 8px;
}

.sidebar-brand-wrap {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 1rem;
    line-height: 1.2;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.sidebar-brand:hover,
.sidebar-brand:focus {
    color: inherit;
    text-decoration: none;
}

.sidebar-brand-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex: 0 0 auto;
    display: block;
}

.sidebar-brand-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin: 0;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .sidebar-brand {
        flex-direction: column;
        text-align: center;
        padding: 20px 12px 16px;
        gap: 10px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        margin-bottom: 6px;
    }

    .sidebar-brand-img {
        width: 88px;
        height: 88px;
    }

    .sidebar-brand-title {
        font-size: 0.82rem;
        font-weight: 600;
        color: #475569;
        letter-spacing: 0.01em;
        max-width: 14rem;
    }
}

@media (max-width: 575.98px) {
    .sidebar-brand-img {
        width: 30px;
        height: 30px;
    }
    .sidebar-brand-title {
        font-size: 0.78rem;
    }
}

/* Auth pages (login / register / forgot / reset) */
.auth-brand {
    text-align: center;
    margin: 0 auto 28px;
    max-width: 100%;
}

.auth-brand-img {
    display: block;
    margin: 0 auto 14px;
    width: clamp(108px, 26vw, 132px);
    height: auto;
    object-fit: contain;
}

.auth-brand-title {
    font-size: clamp(1.05rem, 3.8vw, 1.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.3;
}

.brand-text h1 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-text .subtitle {
    margin-top: 2px;
    font-size: 0.85rem;
    opacity: 0.95;
}

main {
    max-width: 1240px;
    margin: 20px auto;
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

main.page-shell {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 20px 40px;
    max-width: 1120px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

nav.nav-card {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    gap: 8px 10px;
}

nav.nav-card--wrap {
    flex-wrap: wrap;
    align-items: center;
}

.today-section-intro {
    margin-top: 0;
    margin-bottom: 14px;
}

.today-section-date {
    display: block;
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.shift-slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.shift-slot-card {
    display: flex;
    flex-direction: column;
}

.shift-slot-card--current {
    border: 2px solid #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), var(--shadow-sm);
    background: linear-gradient(165deg, #ffffff 0%, #f5f3ff 100%);
    position: relative;
}

.shift-current-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: #4f46e5;
    padding: 3px 10px;
    border-radius: 999px;
    margin: 0 0 8px;
}

.shift-slot-card--current .shift-slot-occupancy--yes {
    background: #eef2ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.shift-slot-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shift-card > form,
.shift-slot-form {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.shift-card > form label:first-of-type,
.shift-slot-form label:first-of-type {
    margin-top: 0;
}

.badge-shift-morning {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}

.badge-shift-evening {
    background: #f5f3ff;
    color: #5b21b6;
    border-color: #ddd6fe;
}

.badge-shift-night {
    background: #ecfeff;
    color: #155e75;
    border-color: #a5f3fc;
}

.shift-slot-occupancy {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    line-height: 1.35;
}

.shift-slot-occupancy--no {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
}

.shift-slot-occupancy--yes {
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

.today-shift-assignees {
    margin-bottom: 10px;
}

.today-assignee-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.today-assignee-item {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.today-assignee-pair {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    font-size: 0.95rem;
}

.today-assignee-arrow {
    color: var(--muted);
    font-weight: 400;
}

.today-assignee-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
    font-size: 0.82rem;
}

.planner-shift-grid {
    margin-top: 12px;
    margin-bottom: 8px;
}

.planner-shift-card .planner-shift-fields {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .planner-shift-card .planner-shift-fields {
        grid-template-columns: 1fr 1fr;
    }
}

.planner-shift-card label:first-of-type {
    margin-top: 0;
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.section-card--flush {
    padding-bottom: 8px;
}

.section-card-head {
    margin-bottom: 16px;
}

.section-card-head h2 {
    margin-bottom: 6px;
}

.section-card-lead {
    margin: 0;
    max-width: 58ch;
}

.section-card > h2,
.section-card > h3:first-child {
    margin-top: 0;
}

.section-card > h2 {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.section-card .table-card-wrap {
    margin-top: 12px;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.section-card .table-card-wrap table {
    margin-top: 0;
    border-radius: 0;
    border: none;
}

.data-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    margin-top: 12px;
}

.info-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.06);
}

.info-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a;
}

.info-card.archived-record,
.assignment-card.archived-record {
    opacity: 0.95;
    border-style: dashed;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

nav a {
    text-decoration: none;
    color: var(--primary-strong);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

nav a:hover {
    transform: translateY(-1px);
    background: #e0e7ff;
    border-color: #c7d2fe;
}

h2, h3 {
    margin-top: 24px;
    margin-bottom: 10px;
    color: #0b1220;
}

form {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

th, td {
    border-bottom: 1px solid #edf2ff;
    padding: 10px;
    font-size: 14px;
    text-align: left;
    vertical-align: top;
}

tbody tr:hover {
    background: #f6faff;
}

th {
    background: #eff6ff;
    color: #0f172a;
    font-weight: 700;
}

label {
    display: block;
    font-weight: 600;
    margin-top: 10px;
    color: #1e293b;
}

input, select, textarea, button {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #c7d8ff;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

button {
    margin-top: 16px;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-sans);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #86efac;
}

.alert.reminder {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.alert.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #fca5a5;
}

/* Banner shown to admin-supervisors on director pages when they have
   pending shift evaluations of their own. */
.pending-admin-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
}

.pending-admin-alert-text {
    flex: 1 1 260px;
    min-width: 0;
}

.btn-evaluate-now {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: #b45309;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
}

.btn-evaluate-now:hover,
.btn-evaluate-now:focus {
    background: #92400e;
    color: #ffffff;
    transform: translateY(-1px);
}

.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.section-title {
    margin-top: 26px;
    margin-bottom: 8px;
    color: #0f172a;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.shift-card-grid,
.assignment-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    margin-top: 12px;
}

.shift-card,
.assignment-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
}

.shift-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.assignment-card-status {
    margin: -4px 0 10px;
}

.assignment-admin-edit {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.assignment-edit-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: var(--text);
}

.assignment-edit-form {
    margin-top: 0;
}

.badge {
    background: #e0f2fe;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
}

.shift-list {
    margin: 10px 0;
    display: grid;
    gap: 6px;
}

.shift-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    background: #f8fbff;
    border: 1px solid #e2ecff;
    border-radius: 8px;
    padding: 6px 8px;
}

.status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
}

.status.pending {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.status.done {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

footer {
    margin-top: 18px;
    padding: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 900px) {
    main {
        padding: 14px;
        margin: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* —— Modern UI: buttons, profile, director feedback —— */

a.profile-name-link {
    color: var(--primary-strong, #4338ca);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a.profile-name-link:hover {
    color: var(--primary, #4f46e5);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    margin-top: 0;
    width: auto;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32);
    transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    color: #fff;
}

.btn--block {
    width: 100%;
    margin-top: 16px;
}

.btn--secondary {
    background: var(--surface-soft);
    color: var(--primary-strong);
    border: 1px solid var(--border-strong);
    box-shadow: none;
}

.btn--secondary:hover {
    background: #eef2ff;
    filter: none;
}

.btn--ghost {
    background: transparent;
    color: var(--muted);
    border: 1px dashed var(--border-strong);
    box-shadow: none;
}

.btn--ghost:hover {
    color: var(--error-text);
    border-color: #fecaca;
    background: var(--error-bg);
    filter: none;
}

.btn--small {
    padding: 6px 12px;
    font-size: 0.82rem;
    margin-top: 0;
}

.card-elevated {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.profile-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
    border: 1px solid var(--border);
}

.profile-hero-main {
    flex: 1;
    min-width: 220px;
}

.profile-hero-label {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.profile-hero-title {
    margin: 0 0 10px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.profile-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.profile-hero-email {
    font-size: 0.92rem;
    color: var(--muted);
}

.profile-hero-actions {
    flex-shrink: 0;
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #eef2ff;
    color: var(--primary-strong);
    border: 1px solid #e0e7ff;
}

.profile-link-row {
    margin: 12px 0 0;
}

.empty-state {
    padding: 28px 20px;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong);
    background: var(--surface-soft);
    margin-top: 8px;
}

.empty-state-title {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 1.05rem;
}

.feedback-timeline {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback-post {
    position: relative;
    padding-left: 18px;
}

.feedback-post::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: -18px;
    width: 3px;
    border-radius: 999px;
    background: #e2e8f0;
}

.feedback-post:last-child::before {
    bottom: 0;
}

.feedback-post--award::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.feedback-post--note::before {
    background: linear-gradient(180deg, #818cf8, #6366f1);
}

.feedback-post--improvement::before {
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
}

.feedback-post-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.feedback-post-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.feedback-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}

.feedback-post--award .feedback-badge {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.feedback-post--note .feedback-badge {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #e0e7ff;
}

.feedback-post--improvement .feedback-badge {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.feedback-date {
    font-size: 0.82rem;
    color: var(--muted);
}

.feedback-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
}

.feedback-body {
    font-size: 0.95rem;
    color: #334155;
}

.feedback-delete-form {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.feedback-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.feedback-delete-form-inline {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.feedback-delete-form-inline button {
    margin-top: 0;
}

.feedback-thread {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.feedback-thread-label {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.feedback-comment-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-comment-item {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.feedback-comment-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.feedback-comment-author {
    font-weight: 600;
    color: var(--text);
}

.feedback-comment-meta time {
    color: var(--muted);
}

.feedback-comment-body {
    font-size: 0.92rem;
    color: #334155;
}

.feedback-comment-delete {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

.feedback-comment-delete button {
    margin-top: 0;
}

.feedback-comment-form {
    padding: 12px !important;
    margin-bottom: 0 !important;
}

.feedback-comment-form-label {
    margin-top: 0 !important;
    font-size: 0.88rem;
}

.feedback-comment-form textarea {
    margin-bottom: 8px;
}

.feedback-comment-submit {
    margin-top: 0 !important;
    width: auto;
    align-self: flex-start;
}

.feedback-thread-empty {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.eval-by-rotation {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rotation-eval-group {
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-soft);
}

.rotation-eval-heading {
    margin: 0;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(180deg, #eef2ff, #f8fafc);
    border-bottom: 1px solid var(--border);
    color: var(--primary-strong);
}

.rotation-eval-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rotation-eval-item {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.rotation-eval-item:last-child {
    border-bottom: none;
}

.rotation-eval-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.rotation-eval-shift {
    font-size: 0.95rem;
}

.rotation-eval-month {
    font-size: 0.88rem;
}

.rotation-eval-avg {
    flex-shrink: 0;
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

.rotation-eval-meta {
    margin: 0 0 8px;
    font-size: 0.88rem;
}

.rotation-eval-comments {
    font-size: 0.9rem;
    color: #334155;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.rotation-eval-admin {
    margin: 10px 0 0;
    font-size: 0.88rem;
}

.qb-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.qb-label {
    display: block;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

.qb-update-form {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.qb-row-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-top: 8px;
}

.qb-check {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qb-delete-form {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.eval-yesno,
.eval-mcq {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 10px 0;
    background: var(--surface-soft);
}

.eval-yesno legend,
.eval-mcq legend {
    font-weight: 600;
    padding: 0 6px;
}

.eval-yesno-opt,
.eval-mcq-opt {
    display: block;
    margin: 6px 0;
    font-weight: 500;
}

/* Program director reports dashboard */
.report-hero {
    margin-bottom: 20px;
}

.report-hero-kicker {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.report-hero-title {
    margin: 0 0 8px;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.report-hero-lead {
    margin: 0;
    max-width: 62ch;
}

/* Director report — KPI summary cards (Tabler .card + Bootstrap grid) */
.report-kpi-row.row-cards > .col-sm-6 {
    display: flex;
}

.report-kpi-row .report-kpi-card {
    flex: 1 1 auto;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}

.report-kpi-row .report-kpi-card .card-body {
    padding: 1.15rem 1.25rem;
}

.report-kpi-row .subheader {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Admin dashboard — KPI summary cards */
.admin-kpi-row.row-cards > [class*="col-"] {
    display: flex;
}

.admin-kpi-card {
    flex: 1 1 auto;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}

.admin-kpi-card .card-body {
    padding: 1.15rem 1.25rem;
}

.admin-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-top: 0.35rem;
}

.admin-kpi-hint {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

/* Director dashboard — tab navigation */
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1.25rem;
    padding: 0.4rem;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.admin-tabs .nav-item {
    margin-bottom: 0;
}

.admin-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 10px;
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-tabs .nav-link:hover,
.admin-tabs .nav-link:focus-visible {
    color: #1e293b;
    background: #f1f5f9;
    border-color: transparent;
}

.admin-tabs .nav-link.active {
    color: #ffffff;
    background: #4f46e5;
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.admin-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eef2ff;
    color: #4f46e5;
}

.admin-tabs .nav-link.active .admin-tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.admin-tab-content > .tab-pane {
    outline: none;
}

@media (max-width: 575.98px) {
    .admin-tabs {
        gap: 0.2rem;
        padding: 0.3rem;
    }

    .admin-tabs .nav-link {
        padding: 0.45rem 0.7rem;
        font-size: 0.84rem;
    }
}

/* WhatsApp reminder button (fellow shift cards) */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
    background: #1ebe5b;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-whatsapp svg {
    flex-shrink: 0;
}

.shift-wa-missing {
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

/* Pending-evaluation reminder actions (fellow page) */
.pending-reminder-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.pending-reminder-actions .btn-whatsapp {
    margin-top: 0;
}

.pending-reminder-email-form {
    margin: 0;
    display: inline-flex;
}

.btn-email-reminder {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-email-reminder:hover,
.btn-email-reminder:focus-visible {
    background: #4338ca;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Director report — chart cards (Tabler .card, three columns from lg) */
.report-chart-row.row-cards > [class*="col-"] {
    min-width: 0;
}

.report-chart-row .report-chart-card {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    background: linear-gradient(165deg, #ffffff 0%, #fafbfc 100%);
}

.report-chart-row .report-chart-card .card-header {
    padding-bottom: 0.35rem;
}

.report-chart-row .report-chart-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.report-chart-row .report-chart-card .card-body {
    min-height: 300px;
}

.report-chart-empty {
    margin: 0;
    padding: 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong);
    background: var(--surface-soft);
}

.report-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 260px;
    height: 280px;
}

.report-chart-canvas-wrap--tall {
    min-height: 280px;
    height: 300px;
}

.report-doughnut-wrap {
    position: relative;
    height: 260px;
    max-width: 280px;
    margin: 0 auto;
}

.form-modern {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-top: 8px;
}

.form-modern .form-row {
    margin-bottom: 4px;
}

.form-modern label:first-of-type {
    margin-top: 0;
}

.form-modern button[type="submit"] {
    margin-top: 8px;
}

.site-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

/* —— Tabler integration: avoid double “card” chrome inside Tabler page-body —— */
.page-body main.page-shell {
    margin: 0;
    padding: 0;
    max-width: none;
    background: transparent;
    border: none;
    box-shadow: none;
}

.navbar:not(.navbar-vertical) .nav-link {
    border-radius: var(--radius-sm);
}

.navbar:not(.navbar-vertical) .nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
}

.navbar-vertical .nav-link {
    border-radius: var(--radius-sm);
}

.navbar-vertical .nav-link:hover,
.navbar-vertical .nav-link:focus-visible {
    background: rgba(79, 70, 229, 0.1);
}

