:root {
    --navy: #102a43;
    --teal: #0f766e;
    --teal-dark: #115e59;
    --gold: #d97706;
    --ink: #1f2937;
    --muted: #64748b;
    --line: #dbe4ee;
    --soft: #f4f8fb;
    --white: #ffffff;
    --danger: #b42318;
    --shadow: 0 18px 45px rgba(16, 42, 67, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--soft);
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    flex: 1 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 5vw;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

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

.brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--white);
    font-weight: 800;
    background: var(--navy);
    border-radius: 8px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.header-context {
    flex: 1 1 auto;
    min-width: 260px;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.header-context strong {
    display: block;
    margin-top: 4px;
    color: var(--navy);
    font-size: 22px;
    line-height: 1.15;
}

.header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.header-tools .session-form {
    margin: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 10px 12px;
    color: var(--muted);
    border-radius: 8px;
    font-weight: 650;
    font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--teal-dark);
    background: #e7f6f3;
}

.settings-menu {
    position: relative;
}

.settings-menu summary {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--teal-dark);
    background: linear-gradient(145deg, #f4fffd, #dff5f1);
    border: 1px solid #b9e4dc;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    list-style: none;
    transition: 0.18s ease;
}

.settings-menu summary > span {
    font-size: 23px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.account-settings summary {
    font-size: 0;
}

.account-settings summary::before {
    content: "\2699";
    font-size: 23px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.account-settings summary > span {
    display: none;
}

.settings-menu summary:hover,
.settings-menu summary:focus-visible,
.settings-menu[open] summary {
    color: #ffffff;
    background: linear-gradient(145deg, #159487, #087369);
    border-color: #087369;
    box-shadow: 0 10px 24px rgba(8, 115, 105, 0.24);
    outline: none;
    transform: translateY(-1px);
}

.settings-menu[open] summary > span,
.settings-menu[open] summary::before {
    transform: rotate(45deg);
}

.settings-menu summary::-webkit-details-marker {
    display: none;
}

.settings-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: grid;
    min-width: 240px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #cfdae6;
    border-radius: 12px;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.2);
}

.settings-menu-panel::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 17px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-top: 1px solid #cfdae6;
    border-left: 1px solid #cfdae6;
    transform: rotate(45deg);
}

.settings-menu-title {
    display: block;
    padding: 8px 10px 10px;
    color: #738296;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-menu-panel a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 2px 0;
    padding: 10px;
    color: var(--navy);
    border-radius: 9px;
    white-space: nowrap;
}

.settings-menu-panel a:hover {
    color: var(--teal-dark);
    background: #eaf7f5;
}

.settings-item-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--teal-dark);
    background: #dff4f0;
    border-radius: 8px;
    font-size: 15px;
}

.settings-menu-panel a.settings-logout {
    color: #a62626;
    border-top: 1px solid #edf1f5;
    border-radius: 0 0 9px 9px;
    margin-top: 6px;
    padding-top: 12px;
}

.settings-menu-panel a.settings-logout:hover {
    color: #8f1d1d;
    background: #fff0f0;
}

.settings-logout .settings-item-icon {
    color: #a62626;
    background: #ffe4e4;
}

.hero,
.detail-hero,
.form-page,
.auth-layout,
.admin-page {
    width: min(1180px, calc(100vw - 24px));
    margin: 24px auto;
}

.hero {
    display: block;
    padding: 36px;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), #164e63 58%, var(--teal));
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero h1,
.detail-hero h1,
.form-intro h1,
.auth-copy h1,
.dashboard-head h1 {
    margin: 10px 0;
    line-height: 1.08;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 780px;
    font-size: clamp(34px, 5vw, 58px);
}

.hero-copy {
    max-width: 820px;
}

.hero p,
.detail-hero p,
.form-intro p,
.auth-copy p {
    color: inherit;
    opacity: 0.86;
    line-height: 1.65;
}

.eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-actions,
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn.primary {
    color: var(--white);
    background: var(--teal);
}

.btn.primary:hover {
    background: var(--teal-dark);
}

.btn.ghost {
    color: var(--teal-dark);
    background: var(--white);
    border-color: var(--line);
}

.btn.danger {
    color: var(--danger);
    background: #fff1f0;
    border-color: #ffd0cc;
}

.btn.small {
    min-height: 36px;
    padding: 0 14px;
    color: var(--teal-dark);
    background: #e7f6f3;
}

.btn.full {
    width: 100%;
}

.hero-panel,
.info-card,
.admin-panel,
.panel-form,
.module-grid article,
.action-grid article,
.metrics article {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel {
    padding: 24px;
    color: var(--ink);
}

.stats-grid,
.metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.stats-grid span,
.metrics article {
    padding: 16px;
    background: var(--soft);
    border-radius: 8px;
}

.stats-grid b,
.metrics b {
    display: block;
    color: var(--navy);
    font-size: 28px;
}

.section-heading {
    width: min(1180px, 90vw);
    margin: 42px auto 18px;
}

.section-heading h1,
.section-heading h2 {
    margin: 6px 0 0;
    color: var(--navy);
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
}

.dashboard-subheading {
    width: 100%;
    margin: 18px 0 10px;
}

.dashboard-subheading h2 {
    font-size: 26px;
}

.carousel-shell {
    overflow: hidden;
    width: min(1180px, 90vw);
    margin: 0 auto 34px;
    padding: 8px 0 34px;
}

.hostel-track {
    display: flex;
    width: 100%;
    transition: transform 0.65s ease;
}

.hostel-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 100%;
    width: 100%;
    min-height: 430px;
    padding: 48px;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), #164e63 58%, var(--teal));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(16, 42, 67, 0.08);
}

.hostel-card:hover {
    border-color: var(--teal);
    transform: translateY(-3px);
}

.hostel-card span {
    color: var(--teal-dark);
    font-weight: 800;
    font-size: 13px;
}

.hostel-card h3 {
    margin: 12px 0;
    max-width: 760px;
    color: var(--white);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
}

.hostel-card p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.65;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.84);
}

.card-meta b {
    color: var(--white);
    font-size: 24px;
}

.module-grid,
.two-column,
.admin-grid,
.auth-panels,
.action-grid {
    display: grid;
    gap: 18px;
}

.module-grid {
    grid-template-columns: repeat(3, 1fr);
    width: min(1180px, 90vw);
    margin: 0 auto 48px;
}

.module-grid article,
.action-grid article {
    padding: 22px;
}

.module-grid h3,
.action-grid h3,
.admin-panel h2,
.panel-form h2 {
    margin: 0 0 10px;
    color: var(--navy);
}

.module-grid p,
.action-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.detail-hero h1,
.form-intro h1,
.auth-copy h1,
.dashboard-head h1 {
    color: var(--navy);
    font-size: clamp(30px, 4vw, 48px);
}

.info-card,
.admin-panel {
    padding: 24px;
}

dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
}

dt {
    color: var(--muted);
    font-weight: 700;
}

dd {
    margin: 0;
    color: var(--navy);
    font-weight: 800;
}

.two-column {
    grid-template-columns: 1fr 1fr;
    width: min(1180px, 90vw);
    margin: 0 auto 48px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-list span,
.status {
    display: inline-flex;
    padding: 8px 11px;
    color: var(--teal-dark);
    background: #e7f6f3;
    border-radius: 999px;
    font-weight: 750;
}

.alert,
.login-hint,
.subtle {
    grid-column: 1 / -1;
}

.alert {
    margin: 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 750;
}

.alert.error {
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #ffd0cc;
}

.alert.success {
    color: var(--teal-dark);
    background: #e7f6f3;
    border: 1px solid #bfe8df;
}

.login-hint {
    display: grid;
    gap: 8px;
    padding: 14px;
    color: var(--muted);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}

.login-hint strong {
    color: var(--navy);
}

.login-hint b {
    color: var(--teal-dark);
}

.subtle {
    margin: 6px 0 0;
    color: var(--muted);
}

.check-list {
    padding-left: 0;
    list-style: none;
}

.check-list li {
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--white);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
}

.form-page,
.auth-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.form-page {
    display: block;
}

.form-page .panel-form {
    position: relative;
    overflow: hidden;
    gap: 18px 20px;
    padding: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.98)),
        var(--white);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 24px 60px rgba(16, 42, 67, 0.14);
}

.form-page .panel-form::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--teal), #0ea5e9, var(--gold));
}

.auth-layout.single {
    grid-template-columns: 1fr 420px;
}

.auth-layout.login-only {
    display: block;
    width: min(460px, 90vw);
}

.auth-panels {
    grid-template-columns: repeat(2, 1fr);
}

.panel-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
}

.panel-form.compact,
.inline-form {
    grid-template-columns: 1fr;
}

.panel-form h2,
.panel-form .full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    color: var(--navy);
    font-weight: 750;
    font-size: 14px;
}

.form-page .panel-form label {
    align-content: start;
    gap: 9px;
    min-width: 0;
    letter-spacing: 0;
}

label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.photo-upload {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
}

.photo-upload input[type="file"] {
    min-height: 112px;
    padding: 40px 12px;
}

.form-page .photo-upload {
    padding: 0;
}

.form-page .photo-upload input[type="file"] {
    display: flex;
    align-items: center;
    min-height: 112px;
    padding: 34px 16px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        repeating-linear-gradient(135deg, #cbd5e1 0 10px, #e2e8f0 10px 20px) border-box;
    border: 1px dashed #94a3b8;
}

.mobile-field {
    width: 100%;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fbfdff;
    border: 1px solid #cfdbe8;
    border-radius: 8px;
    font: inherit;
}

.form-page .panel-form input,
.form-page .panel-form select,
.form-page .panel-form textarea {
    min-height: 48px;
    padding: 12px 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #c9d7e6;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(16, 42, 67, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-page .panel-form input::placeholder,
.form-page .panel-form textarea::placeholder {
    color: #7b8794;
    font-weight: 650;
}

.form-page .panel-form select {
    appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--teal-dark) 50%),
        linear-gradient(135deg, var(--teal-dark) 50%, transparent 50%),
        linear-gradient(to right, #e2e8f0, #e2e8f0);
    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 14px) 21px,
        calc(100% - 38px) 12px;
    background-size: 6px 6px, 6px 6px, 1px 24px;
    background-repeat: no-repeat;
}

.form-page .panel-form input[type="file"] {
    color: var(--muted);
}

.form-page .panel-form input[type="file"]::file-selector-button {
    min-height: 34px;
    margin-right: 12px;
    padding: 0 14px;
    color: var(--white);
    background: var(--navy);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.form-page .panel-form input[type="file"]::file-selector-button:hover {
    background: var(--teal-dark);
}

textarea {
    min-height: 98px;
    resize: vertical;
}

.password-input-wrap {
    position: relative;
    display: block;
}

.password-input-wrap input {
    width: 100%;
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--teal-dark);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #e7f6f3;
    outline: 2px solid rgba(15, 118, 110, 0.2);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(15, 118, 110, 0.18);
    border-color: var(--teal);
}

.form-page .panel-form input:hover,
.form-page .panel-form select:hover,
.form-page .panel-form textarea:hover {
    border-color: #8fb3c9;
    background-color: #fcfeff;
}

.form-page .panel-form input:focus,
.form-page .panel-form select:focus,
.form-page .panel-form textarea:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14), 0 8px 18px rgba(16, 42, 67, 0.08);
}

select:disabled {
    color: var(--navy);
    background: #eef4f8;
    cursor: not-allowed;
    opacity: 1;
}

.dashboard {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    width: min(1280px, calc(100vw - 24px));
    margin: 18px auto 32px;
    gap: 16px;
}

.sidebar {
    min-height: calc(100vh - 160px);
    padding: 18px;
    color: var(--white);
    background: var(--navy);
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.sidebar h2 {
    margin: 0 0 8px;
}

.sidebar p {
    margin: 0 0 24px;
    color: #bdd6ea;
}

.sidebar a {
    display: block;
    margin-bottom: 8px;
    padding: 12px;
    color: #dcecf8;
    border-radius: 8px;
}

.sidebar a.active,
.sidebar a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
}

.sidebar-pills {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar .sidebar-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 0;
    padding: 8px 12px;
    color: #dffcf7;
    background: rgba(15, 118, 110, 0.46);
    border: 1px solid rgba(191, 232, 223, 0.28);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.sidebar .sidebar-pill:hover {
    color: var(--navy);
    background: #dff7f2;
}

.sidebar a.is-selected,
.sidebar .sidebar-pill.is-selected {
    color: var(--navy);
    background: #dff7f2;
}

.switch-panel.is-hidden {
    display: none;
}

.dashboard-main {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.dashboard-panel {
    min-width: 0;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.dashboard-panel h2 {
    margin: 0 0 16px;
    color: var(--navy);
}

.dashboard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.dashboard-head.compact-head {
    margin-bottom: 14px;
}

.dashboard-head.compact-head h2 {
    margin: 0;
}

.dashboard-tools,
.session-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-form label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.session-form select {
    min-width: 130px;
}

.metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
}

.metrics article {
    box-shadow: none;
}

.metrics span {
    color: var(--muted);
    font-weight: 700;
}

.action-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-grid.two-actions,
.fee-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.application-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 16px;
}

.application-group {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.application-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.application-group-head h3,
.application-group-head p {
    margin: 0;
}

.application-group-head h3 {
    color: var(--navy);
}

.application-group-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.application-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.application-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.application-card h3,
.application-card p {
    margin: 0;
}

.application-card h3 {
    color: var(--navy);
}

.application-card dl {
    grid-template-columns: 104px 1fr;
    gap: 8px 12px;
    margin: 0;
}

.application-card dt,
.application-card dd {
    font-size: 13px;
}

.application-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.application-actions form {
    display: inline-flex;
}

.room-allot-form {
    gap: 8px;
}

.room-allot-form input,
.room-allot-form select {
    width: 210px;
    min-height: 36px;
    padding: 8px 10px;
}

.room-availability-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.room-availability-metrics small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.room-config-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 16px;
    margin: 18px 0;
}

.room-config-form {
    align-content: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.room-config-form textarea {
    min-height: 112px;
}

.room-config-table td small {
    display: block;
    margin-top: 4px;
}

.room-config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.room-config-actions form {
    margin: 0;
}

.inline-config-panel {
    margin-top: 18px;
    box-shadow: none;
}

.reason-note {
    padding: 10px 12px;
    color: var(--danger);
    background: #fff1f0;
    border: 1px solid #ffd0cc;
    border-radius: 8px;
    font-size: 13px;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--navy);
    background: var(--soft);
}

.row-actions {
    display: grid;
    grid-template-columns: auto 92px auto;
    gap: 8px;
    align-items: center;
    min-width: 290px;
}

.row-actions input {
    min-height: 36px;
    padding: 8px 10px;
}

.row-actions .full-row {
    grid-column: 1 / -1;
}

.button-row.tight {
    align-items: center;
    gap: 8px;
    margin: 0;
}

.button-row.tight form {
    display: inline-flex;
    gap: 8px;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tabs a {
    padding: 11px 16px;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
}

.tabs a.active {
    color: var(--white);
    background: var(--teal);
    border-color: var(--teal);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(16, 42, 67, 0.58);
}

.modal.open {
    display: flex;
}

.modal-panel {
    position: relative;
    width: min(620px, 94vw);
    max-height: 90vh;
    overflow: auto;
    padding: 26px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.document-modal {
    width: min(920px, 96vw);
}

.document-modal iframe {
    width: 100%;
    height: min(72vh, 780px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

.print-form-view {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.print-form-view h2 {
    margin-bottom: 16px;
}

.modal-panel h2 {
    margin: 0 0 18px;
    color: var(--navy);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    color: var(--navy);
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-form {
    padding: 0;
    border: 0;
    box-shadow: none;
}

.report-modal-panel {
    width: min(560px, 94vw);
    padding: 0;
    overflow: hidden;
}

.report-modal-head {
    padding: 24px 28px 18px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

.report-modal-head h2 {
    margin: 4px 0 0;
    font-size: 24px;
}

.report-options-form {
    padding: 22px 28px 26px;
}

.report-select-field {
    display: grid;
    gap: 8px;
    margin: 0;
    color: var(--navy);
    font-weight: 800;
}

.report-select-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 44px 0 14px;
    color: var(--navy);
    background:
        linear-gradient(45deg, transparent 50%, var(--teal-dark) 50%),
        linear-gradient(135deg, var(--teal-dark) 50%, transparent 50%),
        linear-gradient(to right, #d8e7ef, #d8e7ef);
    background-position:
        calc(100% - 22px) 20px,
        calc(100% - 15px) 20px,
        calc(100% - 42px) 11px;
    background-size:
        7px 7px,
        7px 7px,
        1px 26px;
    background-repeat: no-repeat;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    appearance: none;
}

.report-select-field select:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.report-select-field small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.report-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.report-option {
    position: relative;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px 12px;
    align-items: start;
    min-height: 84px;
    padding: 16px;
    color: var(--navy);
    background: #fbfdff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.report-option:hover {
    border-color: rgba(15, 118, 110, 0.38);
    background: #f7fcfb;
    box-shadow: 0 8px 18px rgba(16, 42, 67, 0.08);
}

.report-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.report-option span {
    grid-row: 1 / span 2;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid #9bb4c7;
    border-radius: 6px;
    background: var(--white);
}

.report-option input:checked + span {
    border-color: var(--teal);
    background: var(--teal);
}

.report-option input:checked + span::after {
    content: "";
    display: block;
    width: 6px;
    height: 11px;
    margin: 2px 0 0 6px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.report-option strong {
    font-size: 14px;
    line-height: 1.25;
}

.report-option small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.report-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

.report-modal-actions .btn.primary {
    flex: 1;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-shrink: 0;
    padding: 18px 5vw;
    color: var(--muted);
    background: var(--white);
    border-top: 1px solid var(--line);
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-weight: 750;
}

@media (max-width: 980px) {
    .site-header,
    .dashboard-head,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .detail-hero,
    .form-page,
    .auth-layout,
    .auth-layout.single,
    .dashboard,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .dashboard,
    .admin-page {
        width: min(100% - 16px, 1000px);
        margin-top: 12px;
    }

    .module-grid,
    .two-column,
    .auth-panels,
    .action-grid,
    .action-grid.two-actions,
    .fee-card-grid,
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .application-card-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: auto;
        gap: 8px;
    }

    .sidebar h2,
    .sidebar p {
        grid-column: 1 / -1;
    }

    .sidebar p {
        margin-bottom: 8px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .modal.open,
    .modal.open * {
        visibility: visible;
    }

    .modal.open {
        position: static;
        display: block;
        padding: 0;
        background: transparent;
    }

    .modal.open .modal-panel {
        width: 100%;
        max-height: none;
        overflow: visible;
        box-shadow: none;
        border: 0;
    }

    .modal-close,
    .modal.open .btn {
        display: none;
    }
}

@media (max-width: 640px) {
    .dashboard,
    .admin-page {
        width: calc(100% - 12px);
        margin: 8px auto 20px;
    }

    .dashboard-panel,
    .admin-panel {
        padding: 14px;
    }

    .dashboard-head h1 {
        font-size: 28px;
    }

    .sidebar {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .hero,
    .panel-form,
    .info-card,
    .admin-panel {
        padding: 20px;
    }

    .main-nav {
        width: 100%;
    }

    .header-context {
        width: 100%;
        padding-left: 0;
        border-left: 0;
    }

    .header-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .settings-menu-panel {
        left: 0;
        right: auto;
    }

    .main-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .module-grid,
    .two-column,
    .auth-panels,
    .action-grid,
    .action-grid.two-actions,
    .fee-card-grid,
    .metrics,
    .stats-grid,
    .panel-form {
        grid-template-columns: 1fr;
    }

    .report-option-grid {
        grid-template-columns: 1fr;
    }

    .report-modal-head,
    .report-options-form {
        padding-left: 18px;
        padding-right: 18px;
    }

    .photo-upload {
        grid-column: auto;
        grid-row: auto;
    }

    .form-page .panel-form {
        gap: 15px;
        padding: 22px 16px;
    }

    .mobile-field {
        width: auto;
    }

    .hostel-card {
        min-height: 330px;
        padding: 24px;
    }

    .hero-actions,
    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* IET DAVV visual theme — adapted from the supplied reference without changing behavior. */
:root {
    --navy: #071937;
    --teal: #007b73;
    --teal-dark: #005c57;
    --gold: #f4ad1c;
    --ink: #13233e;
    --muted: #62718a;
    --line: #dce8e7;
    --soft: #f5fbfa;
    --white: #ffffff;
    --shadow: 0 20px 55px rgba(7, 25, 55, 0.10);
}

body {
    background:
        radial-gradient(circle at 2px 2px, rgba(0, 123, 115, 0.12) 1.4px, transparent 1.5px) 0 190px / 22px 22px no-repeat,
        linear-gradient(180deg, #fbfefd 0, #f4faf9 54%, #ffffff 100%);
}

.site-header {
    top: 14px;
    width: calc(100% - 32px);
    max-width: 1640px;
    margin: 14px auto 0;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(220, 232, 231, 0.9);
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(7, 25, 55, 0.11);
}

.brand {
    gap: 16px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
}

.brand strong {
    color: var(--navy);
    font-size: 21px;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.brand small {
    margin-top: 5px;
    font-size: 14px;
}

.main-nav {
    gap: 10px;
}

.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 12px 18px;
    color: var(--navy);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
}

.main-nav a::before {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    font-size: 20px;
    font-weight: 500;
}

.main-nav a[href="index"]::before { content: "\2302"; }
.main-nav a[href="apply"]::before { content: "\25A4"; }
.main-nav a[href="student-login"]::before { content: "\25EF"; }
.main-nav a[href^="admin-warden-login"]::before { content: "\25C7"; }

.main-nav a:hover,
.main-nav a.active {
    color: var(--navy);
    background: #edf7f5;
    box-shadow: inset 0 -3px 0 var(--teal);
}

.section-heading {
    width: min(1380px, calc(100vw - 48px));
    margin: 68px auto 28px;
    text-align: left;
}

.section-heading .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--teal-dark);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading .eyebrow::before {
    content: "";
    width: 42px;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    border-radius: 99px;
}

.section-heading h1 {
    max-width: 1000px;
    margin: 16px 0 8px;
    color: var(--navy);
    font-size: clamp(38px, 4.2vw, 68px);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.section-heading > p {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

.carousel-shell {
    width: min(1380px, calc(100vw - 48px));
    margin: 24px auto 70px;
    border-radius: 24px;
    box-shadow: 0 24px 58px rgba(7, 25, 55, 0.18);
}

.hostel-track {
    min-height: 500px;
}

.hostel-card {
    --hostel-image: url("../images/iet-davv-building.jpg");
    position: relative;
    display: flex;
    flex: 0 0 100%;
    min-height: 500px;
    padding: 70px 55% 64px 56px;
    color: #ffffff;
    background-color: #004d49;
    background-image:
        linear-gradient(108deg, rgba(0, 61, 58, 1) 0%, rgba(0, 73, 69, 0.98) 42%, rgba(0, 73, 69, 0.48) 57%, rgba(0, 0, 0, 0.02) 72%),
        linear-gradient(0deg, rgba(7, 25, 55, 0.2), rgba(7, 25, 55, 0.02)),
        var(--hostel-image);
    background-position: center, center, right center;
    background-size: 100% 100%, 100% 100%, auto 100%;
    background-repeat: no-repeat;
    border: 1px solid rgba(0, 92, 87, 0.55);
    border-radius: 24px;
    box-shadow: none;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
}

.hostel-card[data-hostel-code="a"],
.hostel-card[href*="hostel-a"] {
    --hostel-image: url("../images/hostel-a.png");
}

.hostel-card[data-hostel-code="b"],
.hostel-card[href*="hostel-b"] {
    --hostel-image: url("../images/hostel-b.png");
}

.hostel-card[data-hostel-code="c"],
.hostel-card[href*="hostel-c"] {
    --hostel-image: url("../images/hostel-c.png");
}

.hostel-card::before {
    content: "";
    position: absolute;
    top: 44px;
    left: 56px;
    width: 70px;
    height: 7px;
    background: linear-gradient(90deg, #efa914, #ffd45c);
    border-radius: 99px;
}

.hostel-card:hover {
    transform: none;
    box-shadow: inset 0 0 0 3px rgba(244, 173, 28, 0.75);
}

.hostel-card h3 {
    max-width: 560px;
    margin: 14px 0 18px;
    color: #ffffff;
    font-size: clamp(34px, 3.3vw, 52px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.hostel-card p {
    max-width: 470px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: calc(100% - 112px);
    margin-top: 42px;
}

.card-meta b {
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
}

.card-meta b::after {
    content: " BED CAPACITY";
    display: block;
    margin-top: 5px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.card-meta em {
    position: absolute;
    right: 54px;
    bottom: 42px;
    min-width: 210px;
    padding: 17px 30px;
    color: var(--navy);
    background: #ffffff;
    border: 2px solid var(--gold);
    border-radius: 999px;
    font-size: 16px;
    font-style: normal;
    font-weight: 850;
    text-align: center;
}

.card-meta em::after {
    content: "  \2192";
    color: var(--teal);
    font-size: 21px;
}

.hostel-feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(1320px, calc(100vw - 64px));
    margin: -36px auto 72px;
    padding-top: 22px;
}

.hostel-feature-strip article {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 0 28px;
    border-right: 1px solid #d3e1e3;
}

.hostel-feature-strip article:first-child {
    padding-left: 0;
}

.hostel-feature-strip article:last-child {
    padding-right: 0;
    border-right: 0;
}

.feature-icon {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    color: #075d48;
    background: #def2e7;
    border-radius: 50%;
    font-size: 29px;
    line-height: 1;
}

.feature-icon.mess {
    color: #755000;
    background: #fff0c8;
}

.feature-icon.wifi {
    color: #113969;
    background: #dceafa;
}

.feature-icon.support {
    color: #4e32c7;
    background: #e9e3fb;
}

.hostel-feature-strip h2 {
    margin: 0 0 5px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
}

.hostel-feature-strip p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.dashboard-panel,
.metrics article,
.admin-panel,
.panel-form,
.info-card,
.two-column > div {
    border-color: rgba(210, 226, 224, 0.95);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(7, 25, 55, 0.07);
}

.dashboard-tabs {
    border-color: rgba(210, 226, 224, 0.95);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(7, 25, 55, 0.07);
}

.btn,
button {
    border-radius: 12px;
}

.site-footer {
    color: var(--muted);
    background: #ffffff;
    border-top-color: var(--line);
}

@media (max-width: 900px) {
    .site-header {
        position: relative;
        top: 0;
        width: calc(100% - 20px);
        margin-top: 10px;
        padding: 16px;
    }

    .section-heading {
        margin-top: 42px;
    }

    .hostel-card {
        min-height: 520px;
        padding: 64px 34px 130px;
        background-color: #004d49;
        background-image:
            linear-gradient(0deg, rgba(0, 61, 58, 0.99) 0%, rgba(0, 73, 69, 0.88) 54%, rgba(0, 0, 0, 0.08) 100%),
            var(--hostel-image);
        background-position: center, center top;
        background-size: 100% 100%, 100% auto;
        background-repeat: no-repeat;
    }

    .hostel-card::before {
        left: 34px;
    }

    .card-meta {
        width: 100%;
    }

    .card-meta em {
        right: 34px;
        bottom: 34px;
        left: 34px;
    }

    .hostel-feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 0;
        width: calc(100vw - 48px);
        margin-top: -28px;
    }

    .hostel-feature-strip article:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 560px) {
    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .brand strong {
        font-size: 17px;
    }

    .brand small {
        font-size: 11px;
    }

    .section-heading,
    .carousel-shell {
        width: calc(100vw - 24px);
    }

    .section-heading h1 {
        font-size: 38px;
    }

    .hostel-card h3 {
        font-size: 34px;
    }

    .hostel-feature-strip {
        grid-template-columns: 1fr;
        gap: 0;
        width: calc(100vw - 32px);
        margin: -24px auto 48px;
        padding: 0 6px;
    }

    .hostel-feature-strip article,
    .hostel-feature-strip article:first-child,
    .hostel-feature-strip article:last-child {
        padding: 18px 0;
        border-right: 0;
        border-bottom: 1px solid #d3e1e3;
    }

    .hostel-feature-strip article:last-child {
        border-bottom: 0;
    }
}

/* Final dashboard fit overrides loaded after the base layout. */
.admin-page,
.dashboard {
    width: calc(100vw - 16px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.dashboard {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.dashboard-main,
.dashboard-panel,
.admin-panel,
.table-wrap {
    min-width: 0;
    max-width: 100%;
}

.dashboard-panel,
.admin-panel {
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.action-grid,
.metrics,
.admin-grid,
.application-card-grid {
    min-width: 0;
}

.mini-table,
.payment-proof-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mini-table table {
    min-width: 0;
    font-size: 13px;
}

.payment-proof-item {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

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

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

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

@media (max-width: 980px) {
    .admin-page,
    .dashboard {
        width: calc(100vw - 10px);
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-page,
    .dashboard {
        width: calc(100vw - 6px);
    }

    .dashboard-panel,
    .admin-panel,
    .application-card {
        padding: 12px;
    }

    table {
        min-width: 620px;
    }
}

/* Professional dashboard redesign. */
.admin-page,
.dashboard-shell {
    gap: 20px;
    width: calc(100vw - 16px);
    max-width: none;
    margin-top: 20px;
    margin-bottom: 36px;
}

.admin-page {
    display: grid;
    gap: 20px;
}

.dashboard-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    align-items: start;
}

.warden-dashboard.dashboard-shell {
    grid-template-columns: 1fr;
}

section.dashboard.admin-panel-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.admin-panel-page > .dashboard-main {
    grid-column: 1 / -1;
}

.admin-panel-nav {
    justify-content: flex-start;
}

.dashboard-tabs.admin-panel-nav-top {
    width: min(1900px, calc(100vw - 24px));
    margin: 18px auto 0;
}

.dashboard-tabs.admin-section-nav {
    width: min(1900px, calc(100vw - 24px));
    margin: 10px auto 0;
}

.admin-common-filters .admin-nav-hostel-filter {
    flex: 1 1 auto;
}

.admin-common-filters > a {
    flex: 0 0 auto !important;
    min-width: 190px;
}

.admin-hostel-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.report-filter-form .btn {
    align-self: end;
    min-height: 46px;
}

.dashboard-tabs.admin-panel-nav a {
    flex: 1 1 0;
}

.admin-nav-hostel-filter {
    flex: 1.25 1 320px;
    min-width: 240px;
}

.admin-nav-hostel-filter select {
    width: 100%;
    min-height: 40px;
}

.admin-panel-nav .admin-settings-menu {
    flex: 0 0 42px;
    margin-left: auto;
}

.admin-panel-nav .settings-menu-panel a {
    display: block;
    flex: none;
    min-height: auto;
    justify-content: flex-start;
    text-align: left;
}

.admin-application-filters select:first-of-type {
    min-width: 160px;
}

.dashboard-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.dashboard-tabs a,
.dashboard-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 14px;
    color: #44546a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.dashboard-tabs a:hover,
.dashboard-tabs a.active,
.dashboard-tabs a.is-selected,
.dashboard-tabs button:hover {
    color: var(--teal-dark);
    background: #e7f6f3;
    border-color: #c6eee7;
}

.dashboard-main {
    gap: 20px;
}

.admin-dashboard > .dashboard-head,
.dashboard-main > .dashboard-head {
    position: relative;
    overflow: hidden;
    padding: 24px;
    color: #0f172a;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.96)),
        linear-gradient(90deg, rgba(15, 118, 110, 0.18), rgba(217, 119, 6, 0.16));
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.1);
}

.admin-dashboard > .dashboard-head::before,
.dashboard-main > .dashboard-head::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--teal), #0ea5e9, var(--gold));
}

.dashboard-head h1 {
    margin: 8px 0 6px;
    max-width: 840px;
    font-size: clamp(28px, 3vw, 44px);
}

.dashboard-head .subtle {
    margin: 0;
    color: #52616f;
    line-height: 1.55;
}

.dashboard-tools,
.session-form {
    flex-wrap: wrap;
}

.dashboard-tools {
    justify-content: flex-end;
}

.session-form {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
}

.dashboard-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: calc(100vh - 126px);
    padding: 18px;
    color: #eaf4f8;
    background:
        linear-gradient(180deg, #102a43, #123042 58%, #163c3a);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.dashboard-sidebar h2 {
    margin: 2px 0 0;
    color: #ffffff;
    font-size: 20px;
}

.dashboard-sidebar p {
    margin: 0 0 16px;
    color: #b9d7e3;
}

.dashboard-sidebar a {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    color: #d7e8ef;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 750;
}

.dashboard-sidebar .sidebar-action {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    color: #d7e8ef;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.dashboard-sidebar a.active,
.dashboard-sidebar a:hover,
.dashboard-sidebar a.is-selected,
.dashboard-sidebar .sidebar-action:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.dashboard-sidebar .sidebar-pills {
    gap: 8px;
    margin-top: 12px;
    padding-top: 14px;
}

.dashboard-sidebar .sidebar-pill {
    justify-content: flex-start;
    min-height: 38px;
    color: #dff7f2;
    background: rgba(15, 118, 110, 0.28);
    border-color: rgba(191, 232, 223, 0.22);
    border-radius: 8px;
    text-align: left;
}

.metrics {
    gap: 14px;
}

.metrics article {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.88);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.metrics article::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 72px;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
}

.metrics span {
    color: #5b6b7d;
    font-size: 12px;
    text-transform: uppercase;
}

.metrics b {
    margin-top: 10px;
    color: #0f172a;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.dashboard-panel,
.admin-panel {
    padding: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.dashboard-panel h2,
.admin-panel h2 {
    color: #0f172a;
    font-size: 22px;
}

.action-grid {
    gap: 14px;
}

.action-grid article {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 150px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.88);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.action-grid h3 {
    margin: 0;
    color: #0f172a;
}

.action-grid p {
    color: #5b6b7d;
}

.action-grid .btn {
    justify-self: start;
    margin-top: auto;
}

.tabs {
    gap: 10px;
    padding: 6px;
    background: #f1f6f9;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
}

.tabs a {
    border-color: transparent;
    background: transparent;
}

.tabs a.active {
    background: #0f766e;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.application-group-head,
.application-card {
    background: #ffffff;
    border-color: rgba(203, 213, 225, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.application-card {
    align-content: start;
}

.application-card-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #e5edf4;
}

.application-card dl {
    padding: 0;
}

.payment-proof-item {
    background: #f8fbfd;
    border-color: #d9e5ee;
}

.application-row-table table {
    min-width: 1120px;
}

.application-row-table td {
    vertical-align: top;
}

.application-row-table td > strong,
.application-row-table td > small,
.reason-inline,
.fee-approved-note {
    display: block;
}

.application-row-table td > strong {
    color: #0f172a;
    font-size: 14px;
}

.application-row-table td > small,
.reason-inline,
.fee-approved-note {
    margin-top: 4px;
    color: #5b6b7d;
    font-size: 12px;
    font-weight: 750;
}

.reason-inline {
    color: var(--danger);
}

.fee-proof-inline {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.fee-proof-row {
    display: grid;
    gap: 6px;
    padding: 8px;
    background: #f8fbfd;
    border: 1px solid #d9e5ee;
    border-radius: 8px;
}

.fee-proof-row span {
    color: #243244;
    font-size: 13px;
}

.row-action-stack {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.row-action-stack form {
    display: inline-flex;
}

.row-action-stack .btn.small {
    min-height: 34px;
    padding: 0 12px;
}

.row-action-stack .room-allot-form {
    align-items: center;
}

.row-action-stack .room-allot-form input,
.row-action-stack .room-allot-form select {
    width: 210px;
    max-width: 100%;
}

.search-student-form {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    margin-bottom: 16px;
    padding: 18px;
    background: #f8fbfd;
    border: 1px solid #d9e5ee;
    border-radius: 8px;
    box-shadow: none;
}

.search-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px 14px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
}

.search-results-head span {
    color: #5b6b7d;
    font-size: 13px;
    font-weight: 750;
}

.history-modal-panel {
    width: min(1060px, 96vw);
}

.history-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fbfd;
    border: 1px solid #d9e5ee;
    border-radius: 8px;
}

.history-summary h2,
.history-summary p {
    margin: 0;
}

.history-summary h2 {
    margin-top: 6px;
    color: #0f172a;
}

.history-summary p {
    margin-top: 4px;
    color: #5b6b7d;
    font-weight: 750;
}

.history-section {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.history-section h3 {
    margin: 0;
    color: #0f172a;
}

.history-records {
    display: grid;
    gap: 10px;
}

.history-records article {
    padding: 14px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
}

.history-records dl {
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    margin: 0;
    gap: 8px 14px;
}

.history-records dt {
    text-transform: capitalize;
}

.warning-letter-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
}

.warning-search-results {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    max-height: 380px;
    overflow: auto;
}

.warning-search-results button,
.selected-warning-student {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 12px;
    color: #0f172a;
    background: #f8fbfd;
    border: 1px solid #d9e5ee;
    border-radius: 8px;
    text-align: left;
}

.warning-search-results button {
    cursor: pointer;
}

.warning-search-results button:hover {
    border-color: rgba(15, 118, 110, 0.42);
    background: #ffffff;
}

.warning-search-results span,
.selected-warning-student span {
    color: #5b6b7d;
    font-size: 12px;
    font-weight: 750;
}

.selected-warning-student {
    margin-bottom: 14px;
}

#warningWordCounter {
    justify-self: start;
}

#warningWordCounter.is-over-limit {
    color: var(--danger);
}

.warning-page {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 8px;
}

.warning-page + .warning-page {
    margin-top: 14px;
}

.warning-letter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid #102a43;
}

.warning-letter-head h1 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 30px;
}

.warning-letter-head span {
    color: #52616f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.warning-letter-head p {
    margin: 0;
    color: #5b6b7d;
    font-size: 13px;
    line-height: 1.45;
    text-align: right;
}

.warning-reference {
    margin: 0 0 18px;
    padding: 10px 12px;
    color: #0f172a;
    background: #f8fbfd;
    border: 1px solid #d9e5ee;
    border-radius: 8px;
    font-weight: 800;
}

.warning-page h2 {
    margin: 20px 0 8px;
    color: #0f172a;
    font-size: 18px;
}

.warning-text-print {
    min-height: 180px;
    margin: 10px 0 24px;
    color: #243244;
    line-height: 1.75;
    white-space: pre-wrap;
}

.warning-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    margin-top: 48px;
}

.warning-footer p {
    margin: 0;
    padding-top: 14px;
    color: #0f172a;
    border-top: 1px solid #102a43;
    font-weight: 800;
    text-align: right;
}

.warning-footer p:first-child {
    text-align: left;
}

.warning-delete-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

table {
    background: #ffffff;
}

th {
    color: #475569;
    background: #f5f8fb;
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: #243244;
}

tbody tr:hover {
    background: #f8fbfd;
}

.status {
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    color: #0f5f58;
    background: #dff7f2;
    border: 1px solid #bfe8df;
    font-size: 12px;
    white-space: nowrap;
}

.btn {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.btn.small {
    color: #0f5f58;
    background: #e7f6f3;
    border-color: #bfe8df;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.82);
}

.modal-panel {
    border: 1px solid rgba(203, 213, 225, 0.92);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

@media (max-width: 980px) {
    .admin-page,
    .dashboard-shell {
        width: calc(100vw - 10px);
        grid-template-columns: 1fr;
    }

    .dashboard-tabs {
        padding: 10px;
    }

    .admin-hostel-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: auto;
    }

    .dashboard-sidebar h2,
    .dashboard-sidebar p,
    .dashboard-sidebar .sidebar-pills {
        grid-column: 1 / -1;
    }

    .dashboard-tools {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .admin-page,
    .dashboard-shell {
        width: calc(100vw - 6px);
        margin-top: 8px;
    }

    .admin-dashboard > .dashboard-head,
    .dashboard-main > .dashboard-head,
    .dashboard-panel,
    .admin-panel,
    .metrics article,
    .action-grid article,
    .application-card {
        padding: 16px;
    }

    .dashboard-sidebar {
        grid-template-columns: 1fr;
    }

    .admin-hostel-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter-form {
        grid-template-columns: 1fr;
    }

    .dashboard-tabs.admin-panel-nav a {
        flex: 0 0 auto;
    }

    .tabs {
        display: grid;
    }

    .search-student-form {
        grid-template-columns: 1fr;
    }

    .search-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-summary {
        flex-direction: column;
    }

    .history-records dl {
        grid-template-columns: 1fr;
    }

    .warning-letter-layout {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4;
        margin: 14mm;
    }

    .warnings-print-modal .modal-close,
    .warnings-print-modal > .dashboard-head,
    .warnings-print-modal #warningsDetails > .history-summary,
    .no-print {
        display: none;
    }

    .warnings-print-modal {
        width: 100%;
        padding: 0;
        color: #111827;
        background: #ffffff;
    }

    .warning-page {
        display: flex;
        flex-direction: column;
        min-height: calc(297mm - 28mm);
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        page-break-after: always;
        break-after: page;
    }

    .warning-page + .warning-page {
        margin-top: 0;
    }

    .warning-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .warning-letter-head {
        margin-bottom: 10mm;
        padding-bottom: 5mm;
    }

    .warning-letter-head h1 {
        font-size: 24pt;
    }

    .warning-reference {
        background: transparent;
        border-color: #9ca3af;
    }

    .warning-text-print {
        flex: 1;
        min-height: 90mm;
        font-size: 12pt;
        line-height: 1.65;
    }

    .warning-footer {
        margin-top: auto;
        padding-top: 18mm;
    }
}
