/* Application pipeline: stage pills, case stage panel, role dashboards (pipeline.php).
   Mobile first: tap targets at least 44px high, form text at least 16px. */

/* ── Stage pill and days in stage ───────────────────────────────────────── */
.pl-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    background: #e0e7ff;
    color: #3730a3;
}
.pl-pill-hold { background: #fef3c7; color: #92400e; }
.pl-pill-done { background: #d1fae5; color: #065f46; }
.pl-pill-closed { background: #f3f4f6; color: #4b5563; }
/* Long stage labels ("Home visit skipped by admin") wrap inside the column instead of running into the next one. */
.pl-pill.pl-pill-long { white-space: normal; border-radius: 0.6rem; max-width: 11rem; line-height: 1.3; }
.pl-days { font-size: 0.78rem; color: var(--ink-light, #6b6b6b); white-space: nowrap; }
.pl-days.is-over { color: #b91c1c; font-weight: 700; }
.pl-warn { color: #b91c1c; font-weight: 600; }

/* ── Buttons and fields ─────────────────────────────────────────────────── */
.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #e0530e 0%, #f4761f 100%);
    color: #fff;
    font: 600 0.95rem 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
}
.pl-btn:hover { transform: none; box-shadow: 0 4px 12px rgba(224, 83, 14, 0.25); }
.pl-btn:disabled { opacity: 0.6; cursor: wait; }
.pl-btn-ghost { background: #fff; color: #c2410c; border: 1px solid #f0d5c2; }
.pl-btn-danger { color: #b91c1c; border-color: #fecaca; }
.pl-field { display: grid; gap: 0.3rem; font-size: 0.88rem; font-weight: 500; margin: 0; }
.pl-field select, .pl-field textarea, .pl-field input {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e5ded5;
    border-radius: 0.5rem;
    font: 400 16px 'Inter', sans-serif;
    background: #fff;
}
.pl-field small { color: var(--ink-light, #6b6b6b); font-weight: 400; }
.pl-msg { font-size: 0.88rem; color: #065f46; }
.pl-msg.is-error { color: #b91c1c; }

/* ── Case page: stage panel ─────────────────────────────────────────────── */
.pl-case {
    background: #fff;
    border: 1px solid var(--border, #f0e6da);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(58, 40, 20, 0.05);
}
.pl-case-top { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.pl-case-main { min-width: 0; flex: 1 1 280px; }
.pl-case-step { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #c2410c; }
.pl-case-stage { font-size: 1.35rem; margin: 0.15rem 0 0.3rem; color: #1f1f1f; }
.pl-case-facts { font-size: 0.9rem; color: var(--ink-light, #6b6b6b); }
.pl-case-note { margin-top: 0.5rem; font-size: 0.9rem; padding: 0.55rem 0.75rem; border-radius: 0.5rem; background: #faf8f5; }
.pl-case-note.is-due { background: #fef2f2; color: #991b1b; }
.pl-case-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; flex: 0 1 300px; }
.pl-more { width: 100%; }
.pl-more summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #c2410c;
    font-weight: 600;
    font-size: 0.9rem;
}
.pl-more-body { display: grid; gap: 0.6rem; padding: 0.75rem; border: 1px solid #f1ebe4; border-radius: 0.6rem; background: #fdfbf8; }
.pl-history { margin-top: 0.9rem; border-top: 1px solid #f1ebe4; padding-top: 0.6rem; }
.pl-history summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: 0.9rem; color: var(--ink, #3a3a3a); }
.pl-history ol { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.35rem; }
.pl-history li { display: grid; gap: 0.1rem; font-size: 0.88rem; padding-left: 0.85rem; border-left: 3px solid #f4d7c3; }
.pl-history-when { font-size: 0.76rem; color: var(--ink-light, #6b6b6b); }
.pl-history-note { color: var(--ink-light, #6b6b6b); }

/* ── Verification decision additions (index.php) ────────────────────────── */
.vdecide-date {
    display: block;
    width: 100%;
    max-width: 22rem;
    min-height: 44px;
    margin: 0.3rem 0 0.75rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e5ded5;
    border-radius: 0.5rem;
    font: 400 16px 'Inter', sans-serif;
    background: #fff;
}
.vdecide-hint { font-size: 0.85rem; color: var(--ink-light, #6b6b6b); margin: 0.25rem 0 0.75rem; }
.vdecide-reject { color: #b91c1c !important; }
.vdecide-reject-go { background: #b91c1c !important; }
/* Director and Checker read the case; they never verify or decide. */
.is-read-only .vcard, .is-read-only .vdecide-prompt, .is-read-only .vdecide-remarks, .is-read-only .v-all { display: none !important; }

/* ── All Applications ───────────────────────────────────────────────────── */
.filter-check { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 500; font-size: 0.9rem; margin: 0; align-self: end; }
.filter-check input { width: 20px; height: 20px; accent-color: #e0530e; }
.pl-filter-note { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-light, #6b6b6b); }
.pl-filter-note a { color: #c2410c; font-weight: 600; }

/* ── Settings ───────────────────────────────────────────────────────────── */
.pl-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.9rem 1.25rem; margin-bottom: 1rem; }
.hv-user-off td { color: #9ca3af; }

/* ── Dashboards ─────────────────────────────────────────────────────────── */
.pl-dash { max-width: 1440px; margin: 0 auto 1.5rem; }
.pl-dash-head { margin-bottom: 1.25rem; }
.pl-dash-date { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #c2410c; }
.pl-dash-head h1 { font-size: 1.7rem; line-height: 1.25; margin-top: 0.25rem; }
.pl-dash-sub { max-width: 1440px; margin: 1.75rem auto 1rem; font-size: 1.15rem; }
.pl-panel {
    background: #fff;
    border: 1px solid #f1ebe4;
    border-radius: 16px;
    padding: 1.2rem 1.35rem 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(58, 40, 20, 0.05);
}
.pl-panel h2 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 700; color: #1f1f1f; margin-bottom: 0.8rem; }
.pl-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-bottom: 0.8rem; }
.pl-panel-head h2 { margin: 0; }
.pl-lead { font-size: 0.86rem; color: var(--ink-light, #6b6b6b); margin: -0.4rem 0 0.8rem; }
.pl-empty { font-size: 0.9rem; color: var(--ink-light, #6b6b6b); padding: 0.4rem 0; }
.pl-empty a { color: #c2410c; }

/* To-do lines: every count opens the list behind it. */
.pl-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0.6rem; }
.pl-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    padding: 0.6rem 0.95rem;
    border-radius: 12px;
    background: #faf8f5;
    border: 1px solid #f1ebe4;
    color: #1f1f1f;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}
.pl-task strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; color: #c2410c; }
.pl-task:hover { border-color: #f4b98f; background: #fff5ec; }
.pl-task.is-zero { color: var(--ink-light, #6b6b6b); }
.pl-task.is-zero strong { color: #b8b0a6; }
.pl-task.is-urgent { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.pl-task.is-urgent strong { color: #b91c1c; }

.pl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.pl-stats div { display: grid; gap: 0.1rem; padding: 0.8rem 0.9rem; border-radius: 12px; background: #faf8f5; }
.pl-stats strong { font-size: 1.6rem; line-height: 1.1; color: #1f1f1f; font-variant-numeric: tabular-nums; }
.pl-stats span { font-size: 0.82rem; color: var(--ink-light, #6b6b6b); }

/* Case cards: name, college, stage, days in stage. */
.pl-cards { list-style: none; display: grid; gap: 0.5rem; }
.pl-cards a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 1rem;
    align-items: center;
    min-height: 52px;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #f1ebe4;
    background: #fff;
    color: inherit;
    text-decoration: none;
}
.pl-cards a:hover { border-color: #f4b98f; }
.pl-card-name { font-weight: 600; font-size: 0.93rem; color: #1f1f1f; overflow-wrap: anywhere; }
.pl-card-meta { grid-column: 1; font-size: 0.8rem; color: var(--ink-light, #6b6b6b); overflow-wrap: anywhere; }
.pl-card-stage { grid-column: 2; grid-row: 1 / span 2; text-align: right; }

/* Pipeline: the 11 stages in order. */
.pl-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pl-filters select {
    min-height: 44px;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e5ded5;
    border-radius: 0.5rem;
    font: 400 16px 'Inter', sans-serif;
    background: #fff;
    max-width: 14rem;
}
.pl-pipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: 0.6rem; }
.pl-pipe-stage {
    position: relative;
    display: grid;
    gap: 0.15rem;
    min-height: 92px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: #fff5ec;
    border: 1px solid #f8d9c0;
    color: #1f1f1f;
    text-decoration: none;
}
.pl-pipe-stage:hover { border-color: #e0530e; }
.pl-pipe-stage.is-zero { background: #faf8f5; border-color: #f1ebe4; }
.pl-pipe-num { font-size: 0.72rem; font-weight: 700; color: #c2410c; }
.pl-pipe-name { font-size: 0.82rem; font-weight: 600; line-height: 1.25; }
.pl-pipe-stage strong { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pl-pipe-stage.is-zero strong { color: #b8b0a6; }
.pl-pipe-over { font-size: 0.74rem; font-weight: 700; color: #b91c1c; }
.pl-pipe-closed { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.9rem; font-size: 0.88rem; }
.pl-pipe-closed a { color: var(--ink-light, #6b6b6b); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 0.35rem; }
.pl-pipe-closed a:hover { color: #c2410c; }

.pl-team { list-style: none; display: grid; gap: 0.5rem; }
.pl-team a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    min-height: 52px;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: #faf8f5;
    border: 1px solid #f1ebe4;
    color: inherit;
    text-decoration: none;
}
.pl-team a:hover { border-color: #f4b98f; }
.pl-team-name { font-weight: 600; }
.pl-team-nums { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.86rem; color: var(--ink-light, #6b6b6b); }
.pl-team-nums strong { color: #1f1f1f; }

@media (max-width: 700px) {
    .pl-case { padding: 1rem; }
    .pl-case-actions { align-items: stretch; flex-basis: 100%; }
    .pl-case-actions .pl-btn { width: 100%; }
    .pl-more summary { justify-content: flex-start; }
    .pl-panel { padding: 1rem; }
    .pl-dash-head h1 { font-size: 1.35rem; }
    .pl-stats { grid-template-columns: minmax(0, 1fr); }
    .pl-stats div { display: flex; justify-content: space-between; align-items: center; }
    .pl-filters, .pl-filters select { width: 100%; max-width: none; }
    .pl-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ═══ MIS/CRM modules (mis.php, colleges, documents, field, committee, payments, comms, scholar) ═══ */
.mis-page { max-width: 1100px; margin: 0 auto; }
.mis-back { display: inline-flex; align-items: center; min-height: 44px; color: #c2410c; font-weight: 600; text-decoration: none; }
.mis-title { font-size: 1.55rem; line-height: 1.25; margin: 0.25rem 0 0.35rem; overflow-wrap: anywhere; }
.mis-lead { color: var(--ink-light, #6b6b6b); font-size: 0.92rem; margin-bottom: 0.9rem; }
.mis-panel-title { font-family: 'Inter', sans-serif; font-size: 1.1rem; margin: 0.5rem 0 1rem; }
.mis-code { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; color: #9a3412; background: #fff1e6; padding: 0.05rem 0.4rem; border-radius: 4px; }
.mis-tag { display: inline-block; font-size: 0.75rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: #f3f4f6; color: #374151; }
.mis-link { background: none !important; border: 0; width: auto; padding: 0.4rem 0; min-height: 36px; color: #c2410c; font: 600 0.86rem 'Inter', sans-serif; cursor: pointer; text-decoration: underline; }
.mis-link:hover { transform: none !important; box-shadow: none !important; }
.mis-group { font-size: 0.9rem; margin: 0.9rem 0 0.4rem; font-family: 'Inter', sans-serif; }
.mis-gap { margin-top: 0.6rem; }
.mis-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.mis-two h3 { font-family: 'Inter', sans-serif; font-size: 0.9rem; margin-bottom: 0.4rem; }

/* Filters and forms */
.mis-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin-bottom: 1rem; }
.mis-filters input[type=search], .mis-filters select, .mis-filters input[type=date] {
    min-height: 44px; padding: 0.5rem 0.7rem; border: 1px solid #e5ded5; border-radius: 0.5rem; font: 400 16px 'Inter', sans-serif; background: #fff;
}
.mis-filters input[type=search] { flex: 1 1 14rem; }
.mis-filters .pl-field { margin: 0; }
.mis-form { margin: 0.75rem 0; }
.mis-form h3 { font-family: 'Inter', sans-serif; font-size: 0.95rem; margin-bottom: 0.6rem; }
.mis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; }
.mis-span-2 { grid-column: 1 / -1; }
.mis-form-foot { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: flex-end; margin-top: 0.8rem; }
.mis-form-foot .pl-msg { margin-right: auto; }
.mis-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.mis-inline .pl-field { flex: 0 1 14rem; }
.mis-checks { display: grid; gap: 0.35rem; border: 0; padding: 0; margin: 0; }
.mis-checks legend { font-size: 0.88rem; font-weight: 500; margin-bottom: 0.3rem; }
.mis-checks label { display: flex; align-items: center; gap: 0.5rem; min-height: 40px; font-weight: 400; font-size: 0.92rem; margin: 0; }
.mis-checks input { width: 20px; height: 20px; accent-color: #e0530e; flex: none; }
.mis-add { margin: 0.75rem 0; }
.mis-add > summary { list-style: none; cursor: pointer; display: inline-flex; }
.mis-add > summary::-webkit-details-marker { display: none; }
.mis-add[open] > summary { margin-bottom: 0.4rem; }
.mis-add[open] > .mis-form { padding: 1rem; border: 1px solid #f1ebe4; border-radius: 12px; background: #fdfbf8; }
.mis-primary { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1rem 0; }
.mis-primary small { color: var(--ink-light, #6b6b6b); flex-basis: 100%; }
.mis-copy { width: 100%; min-height: 40px; padding: 0.4rem 0.6rem; border: 1px dashed #e5ded5; border-radius: 0.4rem; font: 400 0.85rem ui-monospace, Consolas, monospace; background: #fdfbf8; }

/* Boxes, facts, rows */
.mis-box { background: #fff; border: 1px solid #f1ebe4; border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.mis-box h3 { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 0.5rem; }
.mis-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.mis-facts > div { display: grid; gap: 0.15rem; padding: 0.75rem 0.85rem; border-radius: 12px; background: #faf8f5; }
.mis-facts span { font-size: 0.78rem; color: var(--ink-light, #6b6b6b); }
.mis-facts small { font-size: 0.78rem; color: var(--ink-light, #6b6b6b); }
.mis-dl { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 0.35rem 1rem; font-size: 0.92rem; }
.mis-dl dt { color: var(--ink-light, #6b6b6b); }
.mis-dl dd { margin: 0; overflow-wrap: anywhere; }
.mis-rows { list-style: none; display: grid; gap: 0.5rem; margin: 0.5rem 0; }
.mis-rows > li { padding: 0.65rem 0.85rem; border: 1px solid #f1ebe4; border-radius: 12px; background: #fff; font-size: 0.92rem; display: grid; gap: 0.2rem; overflow-wrap: anywhere; }
.mis-rows > li.is-flag, .pl-history-list li.is-flag { border-color: #fecaca; background: #fef2f2; }
.mis-total td, .mis-total { font-weight: 700; background: #faf8f5; }
.mis-phone a { color: #c2410c; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.mis-wa { margin-left: 0.4rem; padding: 0 0.55rem; border-radius: 999px; background: #dcfce7; color: #166534 !important; font-size: 0.78rem; }
.mis-card-call { padding: 0 0.9rem 0.6rem; }
.mis-college-list li { border: 1px solid #f1ebe4; border-radius: 12px; background: #fff; }
.mis-college-list li a { border: 0; }
.pl-history-list { list-style: none; display: grid; gap: 0.55rem; }
.pl-history-list li { display: grid; gap: 0.1rem; font-size: 0.9rem; padding: 0.5rem 0.75rem; border-left: 3px solid #f4d7c3; background: #fdfbf8; border-radius: 0 8px 8px 0; }

/* Tabs (college page) */
.mis-tab-bar { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 1px solid #f1ebe4; margin: 1rem 0; scrollbar-width: thin; }
.mis-tab-bar button {
    width: auto; flex: none; min-height: 44px; padding: 0.5rem 0.9rem; border-radius: 0.5rem 0.5rem 0 0; background: none; color: var(--ink, #3a3a3a);
    font: 600 0.9rem 'Inter', sans-serif; border-bottom: 3px solid transparent;
}
.mis-tab-bar button:hover { transform: none; box-shadow: none; background: #fdf6ef; }
.mis-tab-bar button.is-active { color: #c2410c; border-bottom-color: #e0530e; }

/* Home visit skipped by the administrator (home-visit.php) */
.hv-skip { border-left: 4px solid #9ca3af; background: #f9fafb; line-height: 1.6; }
.hv-skip .hv-case-actions { margin-top: 0.6rem; }
.pl-pill-skip { margin-top: 0.3rem; font-size: 0.72rem; }

/* Overall (overall.php): the list, and one case in a single scroll */
.ov-search { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.ov-search input { flex: 1 1 16rem; min-height: 44px; font-size: 16px; }
/* Date boxes in the Search and filter card look like its text boxes. */
.app-filters .filter-field input[type="date"] { width: 100%; height: 46px; padding: 0 0.9rem; border: 1px solid var(--border); border-radius: 0.5rem; background: white; font: inherit; font-size: 0.92rem; color: var(--ink); }
/* The list: fixed widths for the short columns so View stays in sight; Name and College share the rest.
   Narrower than the table, it scrolls sideways instead of being cut off. Phones get cards (admin-theme.css). */
@media (min-width: 769px) {
    .app-results:has(.ov-list) { overflow-x: auto; }
    .ov-list { table-layout: fixed; width: 100%; min-width: 1120px; }
    .ov-list th, .ov-list td { padding-left: 0.6rem; padding-right: 0.6rem; }
    .ov-list th:nth-child(1) { width: 3.5rem; }    /* S.No */
    .ov-list th:nth-child(2) { width: 8.5rem; }    /* ID */
    .ov-list th:nth-child(5) { width: 9rem; }      /* Programme */
    .ov-list th:nth-child(6) { width: 8.5rem; }    /* Stage */
    .ov-list th:nth-child(7) { width: 7rem; }      /* Verification */
    .ov-list th:nth-child(8) { width: 6.5rem; }    /* Home visit */
    .ov-list th:nth-child(9) { width: 7.5rem; }    /* Owner */
    .ov-list th:nth-child(10) { width: 6.5rem; }   /* View */
    .ov-list td.rt-title { overflow-wrap: anywhere; }
    .ov-list .app-id { display: inline-block; max-width: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
    .ov-list .app-owner { white-space: normal; }
    .ov-list .app-prog { white-space: normal; }
    .ov-list .ov-progress { width: 100%; max-width: 5rem; }
}
.ov-progress { display: block; width: 5rem; height: 6px; border-radius: 999px; background: #f1ebe4; overflow: hidden; margin-bottom: 0.2rem; }
.ov-progress i { display: block; height: 100%; background: #e0530e; }
/* Case Tracker case page: why verification stopped */
.ov-why { border-radius: 1rem; padding: 1rem 1.25rem; margin-bottom: 1rem; border: 1px solid #f1ebe4; border-left-width: 5px; background: #fff; }
.ov-why.is-stopped { border-left-color: #dc2626; background: #fef2f2; }
.ov-why.is-progress { border-left-color: #2563eb; background: #eff6ff; }
.ov-why.is-fresh { border-left-color: #9ca3af; background: #f9fafb; }
.ov-why h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.ov-why h3 { font-size: 0.9rem; margin: 0.75rem 0 0.3rem; }
.ov-why-meta { margin: 0; font-size: 0.9rem; color: var(--ink-light, #6b6b6b); }
.ov-why-hold { margin-top: 0.6rem; padding: 0.6rem 0.8rem; background: #fff; border-radius: 0.6rem; font-size: 0.92rem; }
.ov-why-list { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.6; }
.ov-why small { color: var(--ink-light, #6b6b6b); }
.ov-why-reason { margin: 0; font-size: 0.95rem; }
.ov-why-fields { margin: 0; font-size: 0.88rem; color: var(--ink-light, #6b6b6b); }
.ov-stop { display: block; margin-top: 0.3rem; font-size: 0.78rem; font-weight: 600; color: #b91c1c; }
.ov-jump { position: sticky; top: 0; z-index: 5; display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.6rem 0; margin-bottom: 1rem; background: var(--bg, #f7f5f2); scrollbar-width: thin; }
.ov-jump a { flex: none; padding: 0.45rem 0.9rem; border-radius: 999px; background: #fff; border: 1px solid #f1ebe4; color: #c2410c; font-weight: 600; font-size: 0.86rem; text-decoration: none; }
.ov-jump a:hover { background: #fdf6ef; }
.ov-sec { background: #fff; border: 1px solid #f1ebe4; border-radius: 1rem; padding: 1.25rem; margin-bottom: 1.25rem; scroll-margin-top: 4rem; }
.ov-sec-title { display: flex; align-items: center; gap: 0.6rem; font-size: 1.2rem; margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #f1ebe4; }
.ov-sec-title span { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: #e0530e; color: #fff; font-size: 0.9rem; flex: none; }
/* One long column: each group under the last, label on the left and value on the right. */
.ov-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.ov-group h3 { font-size: 0.95rem; color: #c2410c; margin: 0 0 0.25rem; padding-bottom: 0.35rem; border-bottom: 2px solid #fde3d0; }
.ov-dl { display: grid; grid-template-columns: 14rem 1fr; margin: 0; font-size: 0.92rem; }
.ov-dl dt, .ov-dl dd { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f1ebe4; }
.ov-dl dt { color: var(--ink-light, #6b6b6b); background: #fdfaf7; }
.ov-dl dd { margin: 0; word-break: break-word; }
.ov-lead { margin: 0 0 0.75rem; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ov-table th, .ov-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid #f1ebe4; vertical-align: top; }
.ov-note { display: block; color: var(--ink-light, #6b6b6b); font-size: 0.78rem; margin-top: 0.2rem; }
.ov-case .mis-case-panel { display: block; }
/* These open the WhatsApp / email boxes of the case page, which this page does not have. */
.ov-case [data-open-wa], .ov-case [data-open-mail] { display: none; }
@media (max-width: 640px) { .ov-dl { grid-template-columns: 1fr; } .ov-dl dt { border-bottom: 0; padding-bottom: 0.15rem; } }

/* Case page: module tabs share the stage bar */
.mis-case-panel { display: none; }
body[data-stage="docs"] .mis-case-panel[data-panel-for="docs"],
body[data-stage="decision"] .mis-case-panel[data-panel-for="decision"],
body[data-stage="timeline"] .mis-case-panel[data-panel-for="timeline"],
body[data-stage="scholar"] .mis-case-panel[data-panel-for="scholar"] { display: block; }
body[data-stage="docs"] #appDetails, body[data-stage="decision"] #appDetails,
body[data-stage="timeline"] #appDetails, body[data-stage="scholar"] #appDetails { display: none; }
.stages { overflow-x: auto; scrollbar-width: thin; }

/* Documents */
.mis-docset { margin-bottom: 1.25rem; }
.mis-docset > h3 { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 0.4rem; }
.mis-stamp { font-size: 0.86rem; color: #065f46; margin-bottom: 0.5rem; }
.mis-exception { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; background: #fef3c7; color: #92400e; font-weight: 700; font-size: 0.78rem; }
.mis-doc { border: 1px solid #f1ebe4; border-radius: 12px; padding: 0.75rem 0.9rem; margin-bottom: 0.55rem; background: #fff; display: grid; gap: 0.35rem; }
.mis-doc-system { background: #faf8f5; }
.mis-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.mis-doc-head strong { font-size: 0.93rem; overflow-wrap: anywhere; }
.mis-doc-files { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.mis-file { display: inline-flex; align-items: center; min-height: 36px; color: #1d4ed8; font-weight: 600; font-size: 0.88rem; }
.mis-doc-meta { font-size: 0.8rem; color: var(--ink-light, #6b6b6b); }
.mis-doc-note { font-size: 0.86rem; background: #faf8f5; padding: 0.4rem 0.6rem; border-radius: 8px; }
.pl-pill.is-returned { background: #fee2e2; color: #991b1b; }
.mis-doc-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0; }
.mis-upload { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px dashed #e0530e; border-radius: 0.6rem; color: #c2410c; font-weight: 600; font-size: 0.9rem; cursor: pointer; margin: 0; }
.mis-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
/* Documents: several files at once, or dropped on the button. */
.mis-upload.is-drop { background: #ffedd5; border-style: solid; box-shadow: 0 0 0 3px rgba(224, 83, 14, 0.15); }
.mis-upload-hint { display: block; flex-basis: 100%; margin-top: 0.35rem; color: #6b6b6b; font-size: 0.8rem; }
.mis-doc-check { margin: 0.25rem 0 0; }
.mis-doc-check .mis-form-foot { justify-content: flex-start; margin-top: 0.3rem; }
.mis-doc-return { display: grid; gap: 0.5rem; }

/* Field work */
.mis-checkin { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.5rem 0; }
.mis-checkin small { flex-basis: 100%; color: var(--ink-light, #6b6b6b); font-size: 0.82rem; }
.mis-checkin form { flex-basis: 100%; }
.mis-today { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; }
.mis-today h2 { margin-bottom: 0.2rem !important; }
.mis-today .mis-lead { margin: 0; }
.mis-auto { display: grid; gap: 0.35rem; font-size: 0.92rem; }
.mis-auto ul { margin: 0 0 0.35rem 1.1rem; color: var(--ink-light, #6b6b6b); font-size: 0.86rem; }

/* Committee, case file, letters */
.mis-decision { border-top: 1px solid #f1ebe4; padding-top: 0.75rem; }
.mis-cf-sec { margin: 1rem 0; padding-bottom: 0.75rem; border-bottom: 1px solid #f1ebe4; }
.mis-cf-sec h2 { font-family: 'Inter', sans-serif; font-size: 1rem; margin-bottom: 0.4rem; }
.mis-edits mark { background: #fef3c7; padding: 0 0.2rem; }
.mis-cf-docs { margin-left: 1.1rem; font-size: 0.9rem; }
.mis-letter-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; max-width: 780px; margin: 1rem auto; }
.mis-letter { max-width: 780px; margin: 0 auto 2rem; background: #fff; padding: 2.5rem; border: 1px solid #eee; line-height: 1.65; font-family: Georgia, 'Times New Roman', serif; }
.mis-letter p { margin-bottom: 0.9rem; }
.mis-letterhead { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 2px solid #e0530e; font-family: 'Inter', sans-serif; font-size: 0.85rem; }
.mis-letterhead img { height: 56px; width: auto; }
.mis-letter-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; font-size: 0.92rem; }
.mis-letter-table th, .mis-letter-table td { border: 1px solid #ddd; padding: 0.4rem 0.6rem; text-align: left; }

/* Timeline */
.mis-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; margin-bottom: 1rem; }
.mis-quick .mis-add { margin: 0; }
.mis-quick .mis-add[open] { flex-basis: 100%; }
.mis-timeline { list-style: none; display: grid; gap: 0.5rem; }
.mis-timeline li { display: grid; gap: 0.15rem; padding: 0.6rem 0.85rem; border-left: 3px solid #e5e7eb; background: #fff; border-radius: 0 10px 10px 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.mis-timeline .mis-tl-whatsapp { border-left-color: #22c55e; }
.mis-timeline .mis-tl-email { border-left-color: #3b82f6; }
.mis-timeline .mis-tl-stage { border-left-color: #e0530e; background: #fffaf5; }
.mis-timeline .mis-tl-note { border-left-color: #a855f7; background: #faf5ff; }
.mis-timeline .mis-tl-call, .mis-timeline .mis-tl-meeting { border-left-color: #f59e0b; }
.mis-timeline .mis-tl-form { border-left-color: #64748b; }
.mis-tl-body { color: var(--ink-light, #6b6b6b); white-space: normal; }

/* Search box in the sidebar, bottom navigation on phones */
.mis-search { padding: 0 0.4rem; }
.mis-search input { width: 100%; min-height: 40px; padding: 0.45rem 0.7rem; border: 1px solid #e5ded5; border-radius: 0.6rem; font: 400 16px 'Inter', sans-serif; background: #fdfbf8; }
.mis-bottom { display: none; }

/* Letters and printouts: no menu */
body.mis-bare header.sidebar, body.mis-bare .mis-bottom { display: none !important; }
body.mis-bare header.sidebar + .container, body.mis-bare .container { margin-left: 0 !important; }
.mis-print .hvr-logo { max-height: 60px; }
.mis-onepage { page-break-after: always; padding: 1rem 0; }
@media print {
    header.sidebar, .mis-bottom, .mis-letter-bar, .pl-btn, .mis-back, .mis-filters { display: none !important; }
    .container { margin: 0 !important; padding: 0 !important; }
    .mis-letter { border: 0; padding: 0; }
    .pl-panel, .mis-box { box-shadow: none; break-inside: avoid; }
}

@media (max-width: 700px) {
    .mis-grid, .mis-two { grid-template-columns: minmax(0, 1fr); }
    .mis-dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
    .mis-dl dd { margin-bottom: 0.45rem; }
    .mis-filters > *, .mis-inline .pl-field { flex: 1 1 100%; }
    .mis-title { font-size: 1.3rem; }
    .mis-letter { padding: 1.25rem; }
    .mis-form-foot .pl-btn, .mis-primary .pl-btn { flex: 1 1 auto; }
    /* Four items at most: Home, Applications, Colleges, More. */
    .mis-bottom {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff; border-top: 1px solid #f0e6da;
        box-shadow: 0 -2px 10px rgba(58, 40, 20, 0.06); padding-bottom: env(safe-area-inset-bottom);
    }
    .mis-bottom a, .mis-bottom button {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; min-height: 56px;
        width: auto; padding: 0.3rem; border: 0; border-radius: 0; background: none; color: #6b6b6b; font: 600 0.72rem 'Inter', sans-serif; text-decoration: none;
    }
    .mis-bottom a:hover, .mis-bottom button:hover { transform: none; box-shadow: none; }
    .mis-bottom a.is-active { color: #c2410c; }
    .mis-bottom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    body:not(.mis-bare) .container { padding-bottom: 5.5rem !important; }
    body:has(.hv-app) .mis-bottom { display: none; }
}

/* Daily activity tracker (tracker-pages.php): fields shown only for the chosen activity, outcome, type of day or mode. */
.mis-form [hidden], .trk-hv [hidden] { display: none !important; }
.trk-people { border: 1px solid #e5e7eb; border-radius: 10px; padding: 0.75rem; margin: 0.75rem 0; }
.trk-person + .trk-person { border-top: 1px dashed #e5e7eb; padding-top: 0.75rem; margin-top: 0.75rem; }
.trk-cards li.is-flag, .mis-rows li.is-flag { border-left: 3px solid #b91c1c; padding-left: 0.6rem; }

/* Colleges A to Z (page_colleges). */
.col-az { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.75rem 0; }
.col-az a, .col-az span { min-width: 2rem; padding: 0.3rem 0.5rem; border-radius: 8px; text-align: center; font-weight: 600; font-size: 0.85rem; border: 1px solid #e5e7eb; }
.col-az a { color: #c2410c; background: #fff; text-decoration: none; }
.col-az a.is-active { background: #ea580c; border-color: #ea580c; color: #fff; }
.col-az span { color: #cbd5e1; }

/* Applications list: the college's location under its name. */
.app-college-place { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: #9a6b3f; }
.app-college-place::before { content: "📍 "; }
