:root {
    --faculty-bg: #f5f7fb;
    --faculty-panel: rgba(255, 255, 255, 0.94);
    --faculty-panel-soft: rgba(239, 246, 255, 0.9);
    --faculty-border: rgba(203, 213, 225, 0.78);
    --faculty-text: #172033;
    --faculty-dim: #64748b;
    --faculty-primary: #2563eb;
    --faculty-accent: #0891b2;
    --faculty-success: #0f9f6e;
    --faculty-warm: #d97706;
    --faculty-danger: #e11d48;
    --faculty-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
    --faculty-soft-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
}

body.faculty-hrm-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 14% 8%, rgba(37, 99, 235, 0.2), transparent 38%),
        radial-gradient(circle at 92% 8%, rgba(8, 145, 178, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.68) 340px, #f5f7fb);
    color: var(--faculty-text);
}

body.faculty-editor-open {
    overflow: hidden;
}

body.faculty-editor-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 850;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.34), rgba(8, 47, 73, 0.18)),
        rgba(241, 245, 249, 0.42);
    backdrop-filter: blur(6px) saturate(1.1);
}

body.faculty-add-page.faculty-editor-open {
    overflow: auto;
}

body.faculty-add-page.faculty-editor-open::before {
    display: none;
}

body.faculty-add-page .faculty-shell > :not(.faculty-master-shell) {
    display: none;
}

body.faculty-add-page .faculty-master-shell {
    display: block;
}

body.faculty-add-page .faculty-master-shell > .faculty-form-panel {
    display: none;
}

body.faculty-add-page .faculty-master-workspace {
    position: relative;
    inset: auto;
    min-height: calc(100vh - 56px);
    border-radius: 20px;
    box-shadow: var(--faculty-shadow);
}

.faculty-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.faculty-topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    flex-wrap: wrap;
    border: 1px solid rgba(219, 227, 239, 0.92);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.84)),
        rgba(255, 255, 255, 0.84);
    box-shadow: var(--faculty-soft-shadow);
    backdrop-filter: blur(14px);
}

.faculty-topbar::after {
    content: '';
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.24), rgba(8, 145, 178, 0.22), transparent);
    pointer-events: none;
}

.faculty-brand h1 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    letter-spacing: 0;
    color: transparent;
    background: linear-gradient(90deg, #1d4ed8, #0891b2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faculty-brand p {
    margin: 6px 0 0;
    color: var(--faculty-dim);
}

.faculty-top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.faculty-chip,
.faculty-button,
.faculty-select,
.faculty-input,
.faculty-textarea {
    border-radius: 12px;
    border: 1px solid var(--faculty-border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--faculty-text);
    font: inherit;
}

.faculty-chip,
.faculty-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.faculty-chip:hover,
.faculty-button:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.13);
}

.faculty-button.primary {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border-color: transparent;
    color: #ffffff;
    font-weight: 800;
}

.faculty-button.secondary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(8, 145, 178, 0.1));
    color: #1d4ed8;
}

.faculty-button.warning {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(225, 29, 72, 0.08));
    color: #9a3412;
}

.faculty-chip.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(8, 145, 178, 0.13));
    border-color: rgba(37, 99, 235, 0.44);
    color: #1d4ed8;
}

.faculty-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0 28px;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, 0.74);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.faculty-hrm-tabs {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 18px;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.faculty-hrm-tab {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    min-height: 56px;
    padding: 9px 10px;
    border: 1px solid rgba(203, 213, 225, 0.76);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.94);
    color: #475569;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.faculty-hrm-tab i {
    grid-row: span 2;
    font-size: 1.2rem;
    color: #2563eb;
}

.faculty-hrm-tab span {
    font-weight: 800;
    color: #172033;
    line-height: 1.1;
}

.faculty-hrm-tab small {
    color: var(--faculty-dim);
    font-size: 0.75rem;
    line-height: 1.1;
}

.faculty-hrm-tab:hover,
.faculty-hrm-tab.active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.48);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(8, 145, 178, 0.12));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

.faculty-hrm-tab.active span,
.faculty-hrm-tab.active i {
    color: #1d4ed8;
}

.faculty-hrm-tab-panels {
    min-height: 420px;
}

.faculty-hrm-panel[hidden] {
    display: none !important;
}

.faculty-hrm-panel.active {
    display: block;
}

.faculty-hrm-panel > section:first-child {
    margin-top: 0 !important;
}

.faculty-hrm-panel .faculty-table-card,
.faculty-hrm-panel .faculty-card {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.faculty-hrm-panel .faculty-list,
.faculty-hrm-panel .faculty-hrm-bars {
    max-height: 360px;
    overflow: auto;
}

.faculty-hrm-panel .faculty-table-wrap {
    max-height: 430px;
    overflow: auto;
}

.compact-grid .faculty-list,
.compact-grid .faculty-hrm-bars {
    max-height: 285px;
}

@media (max-width: 1180px) {
    .faculty-hrm-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.faculty-card,
.faculty-hero,
.faculty-kpi,
.faculty-table-card {
    background: var(--faculty-panel);
    border: 1px solid var(--faculty-border);
    border-radius: 16px;
    box-shadow: var(--faculty-shadow);
}

.faculty-module-card,
.faculty-attention-item {
    color: inherit;
    text-decoration: none;
}

.faculty-module-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faculty-module-card > i {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 1.45rem;
}

.faculty-module-card strong {
    font-size: 1.08rem;
}

.faculty-hrm-command-hero {
    align-items: stretch;
}

.faculty-hero-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 900;
    font-size: 0.78rem;
}

.faculty-hero-actions,
.faculty-hrm-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.faculty-hrm-risk-card {
    display: grid;
    align-content: center;
}

.faculty-risk-meter {
    height: 12px;
    margin: 10px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.faculty-risk-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f9f6e, #d97706, #e11d48);
}

.faculty-hrm-control-strip {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.7fr auto;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
}

.faculty-upload-zone {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 112px;
    margin-bottom: 14px;
    padding: 16px;
    border: 2px dashed rgba(37, 99, 235, 0.32);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.88), rgba(240, 253, 250, 0.72));
    color: #1d4ed8;
    text-align: center;
    cursor: pointer;
}

.faculty-upload-zone i {
    font-size: 2rem;
}

.faculty-upload-zone small {
    color: var(--faculty-dim);
}

.faculty-upload-zone.active {
    border-color: #0f9f6e;
    background: #ecfdf5;
    color: #047857;
}

.doc-upload-progress {
    margin-top: 12px;
}

.doc-vault-toolbar {
    grid-template-columns: 1.2fr .8fr .7fr .7fr .7fr .7fr .7fr .7fr auto auto;
}

.doc-bulk-actions {
    padding: 0 20px 16px;
}

.doc-missing-panel {
    padding: 0 20px 16px;
}

.doc-preview-body {
    max-height: 72vh;
    overflow: auto;
}

.doc-preview-frame {
    min-height: 440px;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 12px;
    background: #f8fafc;
}

.doc-preview-frame iframe {
    width: 100%;
    height: 520px;
    border: 0;
    background: #ffffff;
}

.faculty-hrm-kpis .faculty-kpi small {
    display: block;
    margin-top: 4px;
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-phase-card {
    margin-bottom: 18px;
}

.faculty-phase-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.faculty-phase-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    line-height: 1.25;
}

.faculty-phase-item i {
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.faculty-phase-item.done {
    background: #ecfdf5;
    border-color: rgba(16, 185, 129, 0.28);
    color: #047857;
}

.faculty-hrm-module-grid {
    margin-top: 18px;
    margin-bottom: 18px;
}

.faculty-hrm-module {
    min-height: 178px;
}

.faculty-hrm-module.blue > i { background: #eff6ff; color: #1d4ed8; }
.faculty-hrm-module.teal > i { background: #ecfeff; color: #0e7490; }
.faculty-hrm-module.amber > i { background: #fffbeb; color: #b45309; }
.faculty-hrm-module.green > i { background: #ecfdf5; color: #047857; }
.faculty-hrm-module.red > i { background: #fff1f2; color: #be123c; }
.faculty-hrm-module.purple > i { background: #f5f3ff; color: #6d28d9; }
.faculty-hrm-module.slate > i { background: #f8fafc; color: #475569; }

.faculty-hrm-module-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

.faculty-hrm-module-foot span {
    font-weight: 900;
    color: #172033;
}

.faculty-hrm-module-foot small {
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-hrm-bars {
    display: grid;
    gap: 10px;
    padding: 0 20px 16px;
}

.faculty-hrm-bar-row {
    display: grid;
    grid-template-columns: 92px 1fr 36px;
    align-items: center;
    gap: 10px;
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-hrm-bar-row div {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.faculty-hrm-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.faculty-hrm-summary-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 16px;
}

.faculty-attention-item.warning {
    border-color: rgba(217, 119, 6, 0.34);
    background: #fffbeb;
}

.faculty-workflow-task.done {
    border-color: rgba(16, 185, 129, 0.28);
    background: #ecfdf5;
}

.faculty-workflow-task.done strong {
    color: #047857;
}

.faculty-hrm-checklist {
    display: grid;
    gap: 10px;
}

.faculty-hrm-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
}

.faculty-hrm-check-item.done {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(16, 185, 129, 0.28);
}

.faculty-attention-item strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.faculty-hero {
    padding: 26px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88)),
        radial-gradient(circle at 8% 10%, rgba(37, 99, 235, 0.16), transparent 38%);
}

.faculty-hero h2 {
    margin: 0;
    font-size: 1.7rem;
    font-family: 'Outfit', sans-serif;
    color: #172033;
}

.faculty-hero p {
    margin: 10px 0 0;
    color: var(--faculty-dim);
    line-height: 1.6;
}

.faculty-hero-side {
    display: grid;
    gap: 12px;
}

.faculty-hero-side .faculty-card {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(240, 253, 250, 0.86));
    border-color: rgba(125, 211, 252, 0.34);
}

.faculty-grid {
    display: grid;
    gap: 18px;
}

.faculty-grid.kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.faculty-grid.two {
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 18px;
}

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

.faculty-kpi {
    padding: 18px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.86));
}

.faculty-kpi::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #2563eb, #0891b2);
}

.faculty-kpi p {
    margin: 0;
    color: var(--faculty-dim);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.faculty-kpi h3 {
    margin: 10px 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: #0f172a;
}

.faculty-table-card,
.faculty-card {
    padding: 20px;
}

.faculty-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.faculty-section-head h3 {
    margin: 0;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    color: #172033;
}

.faculty-section-head p {
    margin: 4px 0 0;
    color: var(--faculty-dim);
    font-size: 0.9rem;
}

.faculty-toolbar,
.faculty-form-grid {
    display: grid;
    gap: 12px;
}

.faculty-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

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

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

.faculty-form-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.faculty-form-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.faculty-hr-setup-card {
    margin-bottom: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.86)),
        #ffffff;
}

.faculty-monthly-hr-card {
    margin-bottom: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.88)),
        #ffffff;
}

.faculty-hr-setup-top {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.7fr;
    gap: 12px;
    margin-bottom: 14px;
}

.faculty-hr-policy-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.faculty-hr-policy-summary .faculty-mini-card,
.faculty-hr-preview-grid .faculty-mini-card {
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 10px;
    background: #f8fafc;
}

.faculty-hr-policy-summary strong,
.faculty-hr-preview-grid strong {
    display: block;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
}

.faculty-hr-policy-summary small,
.faculty-hr-preview-grid small {
    display: block;
    margin-top: 4px;
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-hr-setup-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0 16px;
    padding: 8px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
}

.faculty-hr-setup-tabs .faculty-button {
    min-height: 40px;
    padding: 9px 12px;
}

.hr-setup-tab.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.faculty-hr-setup-section {
    display: none;
}

.faculty-hr-setup-section.active {
    display: block;
}

.faculty-hr-setup-section.disabled {
    opacity: 0.58;
}

.faculty-hr-setup-section.disabled input,
.faculty-hr-setup-section.disabled select,
.faculty-hr-setup-section.disabled textarea {
    pointer-events: none;
    background: #f1f5f9;
}

.faculty-advanced-search-card {
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.88)),
        #ffffff;
}

.faculty-advanced-grid .faculty-input {
    min-height: 46px;
}

.faculty-field {
    display: grid;
    gap: 8px;
}

.faculty-field label {
    color: #526783;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.faculty-select,
.faculty-input,
.faculty-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #ffffff;
    border-color: rgba(187, 202, 222, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 8px 18px rgba(15, 23, 42, 0.04);
}

.faculty-select:focus,
.faculty-input:focus,
.faculty-textarea:focus {
    outline: 4px solid rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.78);
    box-shadow:
        0 0 0 1px rgba(20, 184, 166, 0.2),
        0 14px 28px rgba(37, 99, 235, 0.12);
}

.faculty-textarea {
    min-height: 96px;
    resize: vertical;
}

.faculty-table-wrap {
    overflow: auto;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.faculty-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.faculty-table th,
.faculty-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    text-align: left;
    vertical-align: top;
}

.faculty-table th {
    background: linear-gradient(180deg, #eff6ff, #e0f2fe);
    color: #1e40af;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
}

.faculty-table td {
    background: rgba(255, 255, 255, 0.86);
}

.faculty-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.96);
}

.faculty-table tbody tr:hover td {
    background: rgba(219, 234, 254, 0.62);
}

.faculty-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.faculty-pill.present,
.faculty-pill.approved,
.faculty-pill.active {
    background: rgba(34, 197, 94, 0.16);
    color: #047857;
}

.faculty-pill.pending,
.faculty-pill.half {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.faculty-pill.absent,
.faculty-pill.rejected,
.faculty-pill.cancelled {
    background: rgba(248, 113, 113, 0.18);
    color: #be123c;
}

.faculty-pill.wfh,
.faculty-pill.duty {
    background: rgba(56, 189, 248, 0.18);
    color: #0369a1;
}

.faculty-list {
    display: grid;
    gap: 12px;
}

.faculty-list-item {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.84));
}

.faculty-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.faculty-list-item small {
    color: var(--faculty-dim);
    line-height: 1.5;
}

.faculty-timeline {
    display: grid;
    gap: 12px;
}

.faculty-timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
}

.faculty-timeline-date {
    color: #1d4ed8;
    font-weight: 900;
}

.faculty-timeline-body {
    display: grid;
    gap: 4px;
}

.faculty-timeline-body strong {
    color: #172033;
}

.faculty-timeline-body small {
    color: var(--faculty-dim);
    line-height: 1.45;
}

.faculty-form-shell {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 18px;
}

.faculty-master-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.faculty-master-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.faculty-selected-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    margin-bottom: 18px;
}

.faculty-avatar-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.faculty-avatar {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.faculty-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faculty-selected-card h3 {
    margin: 0;
}

.faculty-selected-card p {
    margin: 6px 0 10px;
    color: var(--faculty-dim);
}

.faculty-completion-wrap {
    min-width: 260px;
    max-width: 390px;
    flex: 1;
}

.faculty-completion-head,
.faculty-audit-strip {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-progress,
.faculty-mini-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.faculty-progress {
    margin: 10px 0;
}

.faculty-progress span,
.faculty-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.faculty-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.faculty-mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 0;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
    font-family: inherit;
    cursor: default;
}

.faculty-mini-chip input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #2563eb;
}

button.faculty-mini-chip {
    cursor: pointer;
}

.faculty-mini-chip.warning {
    background: #fffbeb;
    color: #b45309;
}

.faculty-mini-chip.good {
    background: #ecfdf5;
    color: #047857;
}

.faculty-mini-chip.muted {
    background: #f8fafc;
    color: #64748b;
}

.faculty-master-filters {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 12px;
}

.faculty-master-workspace {
    position: fixed;
    inset: 28px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, #ffffff 0, #ffffff 178px, #f7fbff 178px, #f8fafc 100%);
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.36);
}

.faculty-master-workspace[hidden] {
    display: none;
}

.faculty-editor-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    border-color: rgba(37, 99, 235, 0.24);
}

.faculty-editor-close:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f9f6e);
    border-color: transparent;
}

.faculty-master-workspace > .faculty-section-head {
    flex: 0 0 auto;
    padding: 22px 24px 16px;
    margin-bottom: 0;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.9)),
        #ffffff;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    position: relative;
}

.faculty-master-workspace > .faculty-section-head::before {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #0f9f6e, #f59e0b, #e11d48);
}

.faculty-master-workspace > .faculty-validation-summary,
.faculty-master-workspace > .faculty-audit-strip {
    flex: 0 0 auto;
    margin: 0;
}

.faculty-master-workspace > .faculty-validation-summary {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.faculty-master-workspace > .faculty-audit-strip {
    padding: 12px 24px;
    background: linear-gradient(90deg, #f8fafc, #eef6ff);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.faculty-editor-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
    background: #f8fafc;
}

.faculty-editor-main {
    min-width: 0;
    height: 100%;
    overflow: auto;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.78)),
        #ffffff;
}

.faculty-tab-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    height: 100%;
    padding: 14px;
    background:
        linear-gradient(180deg, #f8fbff, #eef6ff 48%, #f0fdf4);
    overflow: auto;
}

.faculty-sidebar-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--faculty-dim);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
}

.faculty-sidebar-tab span {
    flex: 1;
}

.faculty-sidebar-tab small {
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 7px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.68rem;
}

.faculty-sidebar-tab.active,
.faculty-sidebar-tab:hover {
    color: #075985;
    border-color: rgba(14, 165, 233, 0.36);
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.faculty-tabs-header {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 6px;
    padding: 10px;
    overflow: visible;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background:
        linear-gradient(90deg, #f8fafc, #eff6ff 46%, #ecfdf5);
}

.faculty-tab-link {
    min-width: 0;
    min-height: 48px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--faculty-dim);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1.1;
    white-space: normal;
}

.faculty-tab-link small {
    font-size: 0.68rem;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 7px;
    background: rgba(37, 99, 235, 0.08);
    flex: 0 0 auto;
}

.faculty-tab-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.faculty-tab-link:hover,
.faculty-tab-link.active {
    color: #075985;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    border-color: rgba(14, 165, 233, 0.3);
}

.faculty-tab-link.active {
    box-shadow: inset 0 -3px 0 #0f9f6e, 0 12px 24px rgba(37, 99, 235, 0.13);
}

.faculty-tab-link.has-errors,
.faculty-sidebar-tab.has-errors {
    border-color: rgba(220, 38, 38, 0.35);
    background: #fff1f2;
}

.faculty-tab-link.has-errors::after,
.faculty-sidebar-tab.has-errors::after {
    content: attr(data-error-count);
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
}

.faculty-tab-content {
    display: none;
    padding: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
        #ffffff;
}

.faculty-tab-content.active {
    display: block;
}

.faculty-attendance-workspace {
    overflow: hidden;
}

.faculty-attendance-wide-table {
    min-width: 1180px;
}

.faculty-period-cell,
.faculty-month-col {
    min-width: 112px;
}

.faculty-period-cell .faculty-select,
.faculty-month-col .faculty-input,
.period-remarks {
    min-width: 96px;
}

.faculty-master-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(90deg, #f8fafc, #eff6ff);
    color: var(--faculty-dim);
    font-weight: 800;
}

.faculty-master-table {
    min-width: 980px;
}

.faculty-direct-list-card {
    margin-bottom: 18px;
    padding: 18px;
    background: #ffffff;
}

.faculty-view-switch {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 10px;
    background: #f8fafc;
}

.faculty-view-switch .faculty-icon-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f9f6e);
    border-color: transparent;
}

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

.faculty-card-results[hidden],
.faculty-summary-results[hidden] {
    display: none;
}

.faculty-result-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 12px;
    background:
        linear-gradient(135deg, #ffffff, #f0f9ff),
        #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.faculty-result-card-head,
.faculty-result-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.faculty-result-card-head > div:nth-child(2) {
    display: grid;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.faculty-result-card-head span,
.faculty-result-card-meta span,
.faculty-result-card-foot small {
    color: var(--faculty-dim);
    font-size: 0.82rem;
}

.faculty-avatar.small {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.faculty-result-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.faculty-result-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.faculty-summary-results {
    display: grid;
    gap: 14px;
}

.faculty-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.faculty-summary-grid article,
.faculty-summary-band,
.faculty-summary-row {
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.faculty-summary-grid article {
    padding: 14px;
    display: grid;
    gap: 5px;
}

.faculty-summary-grid span,
.faculty-summary-grid small {
    color: var(--faculty-dim);
    font-size: 0.82rem;
}

.faculty-summary-grid strong {
    color: #075985;
    font-size: 1.55rem;
    font-family: 'Outfit', sans-serif;
}

.faculty-summary-band {
    padding: 14px;
}

.faculty-summary-band strong {
    display: block;
    margin-bottom: 10px;
}

.faculty-summary-list {
    display: grid;
    gap: 8px;
}

.faculty-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    color: var(--faculty-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.faculty-summary-row small {
    color: var(--faculty-dim);
    overflow-wrap: anywhere;
}

.faculty-import-preview-table {
    min-width: 840px;
}

.faculty-import-preview-table tr.import-ready td {
    background: #f0fdf4;
}

.faculty-import-preview-table tr.import-error td {
    background: #fff7ed;
}

.faculty-direct-list-table {
    min-width: 1320px;
}

.faculty-master-table tr.selected td,
.faculty-direct-list-table tr.selected td {
    background: rgba(219, 234, 254, 0.88);
    box-shadow: inset 3px 0 0 #2563eb;
}

.faculty-form-panel {
    position: sticky;
    top: 16px;
    align-self: start;
    z-index: 3;
    isolation: isolate;
    background: #ffffff;
}

.faculty-form-panel .faculty-table-wrap {
    max-height: 620px;
}

.faculty-select-col {
    width: 42px;
    text-align: center !important;
}

.faculty-sort-head {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 900;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.faculty-sort-head.active {
    color: #0f766e;
}

.faculty-row-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.faculty-icon-button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1d4ed8;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.faculty-icon-button:hover {
    border-color: rgba(37, 99, 235, 0.38);
    background: #eff6ff;
}

.faculty-icon-button.danger {
    border-color: rgba(225, 29, 72, 0.3);
    color: #be123c;
}

.faculty-icon-button.danger:hover {
    border-color: rgba(225, 29, 72, 0.55);
    background: #fff1f2;
}

.faculty-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.faculty-input-action-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.faculty-input-actions {
    display: inline-flex;
    gap: 4px;
}

.faculty-skeleton-line {
    display: block;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
    background-size: 220% 100%;
    animation: facultySkeleton 1.1s linear infinite;
}

@keyframes facultySkeleton {
    from { background-position: 0 0; }
    to { background-position: -220% 0; }
}

.faculty-form-panel .faculty-input,
.faculty-form-panel .faculty-select,
.faculty-form-panel .faculty-textarea,
.faculty-master-workspace .faculty-input,
.faculty-master-workspace .faculty-select,
.faculty-master-workspace .faculty-textarea {
    background: #ffffff;
}

.faculty-form-sections {
    display: grid;
    gap: 18px;
}

.faculty-subcard {
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(203, 213, 225, 0.78);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(239, 246, 255, 0.72));
}

.faculty-subcard h4 {
    margin: 0 0 12px;
    font-family: 'Outfit', sans-serif;
}

.faculty-inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.faculty-validation-summary {
    margin: 0 20px 14px;
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 8px;
    background: #fff1f2;
    color: #991b1b;
    font-weight: 700;
}

.faculty-duplicate-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 14px 24px;
    padding: 14px 16px;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 242, 242, 0.94)),
        #ffffff;
    color: #92400e;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.12);
}

.faculty-duplicate-warning[hidden] {
    display: none;
}

.faculty-duplicate-warning-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #9f6707;
    color: #ffffff;
    flex: 0 0 auto;
}

.faculty-duplicate-warning strong {
    display: block;
    color: #7c2d12;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.faculty-duplicate-warning p {
    margin: 0 0 4px;
    color: #92400e;
    font-weight: 800;
}

.faculty-duplicate-warning span {
    color: #a16207;
    font-size: 0.84rem;
}

.faculty-audit-strip {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 0 20px 14px;
    font-size: 0.84rem;
}

.required-dot,
.field-error,
.missing-note {
    color: #dc2626;
}

.field-error {
    display: block;
    min-height: 16px;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 700;
}

.faculty-education-row {
    display: grid;
    grid-template-columns: 1.2fr .8fr 1fr .8fr .8fr auto;
    gap: 10px;
    margin-bottom: 10px;
}

.faculty-publication-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.2fr .8fr .9fr .9fr 1.2fr auto;
    gap: 10px;
    margin-bottom: 10px;
}

.faculty-record-grid {
    margin-top: 18px;
}

.faculty-record-grid h4 {
    margin: 0 0 10px;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

.faculty-mini-list,
.faculty-timeline-list {
    display: grid;
    gap: 10px;
    max-height: 330px;
    overflow: auto;
    padding-right: 4px;
}

.faculty-record-card,
.faculty-timeline-card {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98)),
        #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.faculty-record-card div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.faculty-record-actions {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.faculty-record-card strong,
.faculty-timeline-card strong {
    color: #111827;
    font-weight: 900;
}

.faculty-record-card span,
.faculty-record-card small,
.faculty-timeline-card small {
    color: var(--faculty-dim);
    font-weight: 700;
}

.faculty-record-card p,
.faculty-timeline-card p {
    margin: 0;
    color: #475569;
}

.faculty-empty.compact {
    padding: 14px;
    border: 1px dashed rgba(148, 163, 184, 0.55);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.82);
}

.soft-panel {
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.98)),
        #fff;
    box-shadow: none;
}

.faculty-mini-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    color: #334155;
    font-weight: 800;
}

.leave-balance-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.leave-balance-chip {
    display: inline-grid;
    gap: 2px;
    min-width: 142px;
    padding: 9px 11px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 253, 245, 0.76));
    color: #334155;
    font-size: 0.86rem;
    font-weight: 800;
}

.leave-balance-chip strong {
    color: #0f172a;
}

.leave-balance-chip em {
    color: #047857;
    font-style: normal;
    font-size: 0.78rem;
}

.faculty-certificate-preview {
    padding: 10px;
    background: #fff;
}

.faculty-certificate-border {
    min-height: 760px;
    padding: 34px;
    border: 3px double rgba(37, 99, 235, 0.5);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.98) 38%, rgba(236, 253, 245, 0.58)),
        #fff;
}

.faculty-certificate-head {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 34px;
    text-align: center;
}

.faculty-certificate-head h2 {
    margin: 0;
    color: #0f172a;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    letter-spacing: 0;
}

.faculty-certificate-head p,
.faculty-certificate-body {
    margin: 0;
    color: #475569;
}

.faculty-certificate-body {
    margin-bottom: 22px;
    font-size: 1.02rem;
    line-height: 1.8;
}

.faculty-certificate-sign {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 80px;
    color: #334155;
    font-weight: 900;
}

.faculty-certificate-sign span {
    min-width: 210px;
    padding-top: 12px;
    border-top: 1px solid rgba(71, 85, 105, 0.55);
    text-align: center;
}

.faculty-sticky-save {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)),
        #ffffff;
    box-shadow: 0 -16px 34px rgba(15, 23, 42, 0.08);
}

.faculty-sticky-save .dirty {
    color: #b45309;
    font-weight: 900;
}

.faculty-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.46);
}

.faculty-modal[hidden] {
    display: none;
}

.faculty-modal-panel {
    width: min(520px, 100%);
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.faculty-modal-panel.wide {
    width: min(840px, 100%);
}

.faculty-modal-panel h3 {
    margin-top: 0;
}

.faculty-export-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.faculty-export-columns label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--faculty-border);
    border-radius: 8px;
    background: #f8fafc;
    font-weight: 800;
    color: #334155;
}

body.faculty-section-page .faculty-master-kpis,
body.faculty-section-page .faculty-advanced-search-card,
body.faculty-section-page .faculty-direct-list-card,
body.faculty-section-page .faculty-selected-card > .faculty-form-panel {
    display: none;
}

body.faculty-section-page .faculty-selected-card {
    display: block;
}

body.faculty-section-page .faculty-master-workspace {
    margin-top: 12px;
    min-height: calc(100vh - 190px);
}

body.faculty-section-page .faculty-master-workspace[hidden] {
    display: block;
}

body.faculty-section-page .faculty-tab-rail,
body.faculty-section-page .faculty-tab-sidebar,
body.faculty-section-page .faculty-tabs-header,
body.faculty-section-page .faculty-master-footer {
    display: none;
}

.faculty-section-nav {
    margin-top: -4px;
}

.faculty-print-preview {
    display: grid;
    gap: 14px;
}

.faculty-print-preview-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faculty-print-preview-head h4,
.faculty-print-preview-head p {
    margin: 0;
}

.faculty-preview-table {
    min-width: 0;
}

.faculty-preview-table th {
    width: 180px;
}

.faculty-empty {
    padding: 22px;
    text-align: center;
    color: var(--faculty-dim);
}

@media (max-width: 1100px) {
    .faculty-hero,
    .faculty-grid.two,
    .faculty-grid.kpis,
    .faculty-grid.three,
    .faculty-master-shell,
    .faculty-master-kpis,
    .faculty-selected-card,
    .faculty-master-filters,
    .faculty-editor-layout,
    .faculty-hrm-control-strip,
    .faculty-toolbar,
    .doc-vault-toolbar,
    .faculty-phase-grid,
    .faculty-timeline-item,
    .faculty-form-grid.two,
    .faculty-form-grid.three,
    .faculty-form-grid.four,
    .faculty-form-grid.five,
    .faculty-grid.four,
    .faculty-hr-setup-top,
    .faculty-hr-policy-summary,
    .faculty-summary-grid,
    .faculty-result-card-meta,
    .faculty-form-shell,
    .faculty-education-row,
    .faculty-publication-row {
        grid-template-columns: 1fr;
    }

    .faculty-form-panel {
        position: static;
    }

    .faculty-editor-main {
        border-left: 0;
    }

    .faculty-tab-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    }

    .faculty-selected-card {
        display: grid;
    }

    .faculty-completion-wrap {
        max-width: none;
    }
}

@media print {
    .faculty-top-actions,
    .faculty-nav,
    .faculty-form-panel,
    .faculty-tabs-header,
    .faculty-master-footer,
    .faculty-sticky-save,
    .theme-fab-wrap {
        display: none !important;
    }

    .faculty-master-shell,
    .faculty-selected-card {
        display: block;
    }

    .faculty-tab-content {
        display: block !important;
        padding: 12px 0;
    }
}

@media (max-width: 640px) {
    body.faculty-hrm-body {
        background:
            radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.22), transparent 34%),
            radial-gradient(circle at 92% 12%, rgba(15, 159, 110, 0.14), transparent 30%),
            linear-gradient(180deg, #07131c, #0b1724 320px, #0f172a);
        color: #f8fafc;
    }

    .faculty-shell {
        padding: 12px 10px 84px;
    }

    .faculty-topbar {
        display: grid;
        gap: 12px;
        margin-bottom: 14px;
        padding: 14px;
        border-color: rgba(148, 163, 184, 0.22);
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.82);
        box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
    }

    .faculty-brand h1 {
        font-size: 1.45rem;
        -webkit-text-fill-color: #f8fafc;
        background: none;
        color: #f8fafc;
    }

    .faculty-brand p {
        font-size: 0.9rem;
        line-height: 1.45;
        color: #aebcd0;
    }

    .faculty-top-actions,
    .faculty-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .faculty-top-actions::-webkit-scrollbar,
    .faculty-nav::-webkit-scrollbar {
        display: none;
    }

    .faculty-chip {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 12px;
        border-color: rgba(148, 163, 184, 0.24);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.9);
        color: #e5edf8;
        box-shadow: none;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .faculty-chip.active {
        background: rgba(15, 159, 110, 0.18);
        border-color: rgba(15, 159, 110, 0.42);
        color: #bbf7d0;
    }

    .faculty-nav {
        margin: 12px 0 16px;
        padding: 8px;
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.62);
    }

    .faculty-hrm-tabs {
        position: sticky;
        top: 0;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin: 10px -2px 14px;
        padding: 8px;
        border-color: rgba(148, 163, 184, 0.22);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.84);
        scrollbar-width: none;
    }

    .faculty-hrm-tabs::-webkit-scrollbar {
        display: none;
    }

    .faculty-hrm-tab {
        flex: 0 0 154px;
        min-height: 52px;
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.82);
        color: #cbd5e1;
        box-shadow: none;
    }

    .faculty-hrm-tab span {
        color: #f8fafc;
    }

    .faculty-hrm-tab small {
        color: #aebcd0;
    }

    .faculty-hrm-tab.active {
        background: rgba(37, 99, 235, 0.22);
        border-color: rgba(96, 165, 250, 0.48);
    }

    .faculty-hrm-panel .faculty-list,
    .faculty-hrm-panel .faculty-hrm-bars,
    .faculty-hrm-panel .faculty-table-wrap {
        max-height: none;
    }

    .faculty-hero,
    .faculty-card,
    .faculty-kpi,
    .faculty-table-card {
        border-color: rgba(148, 163, 184, 0.22);
        background: rgba(15, 23, 42, 0.78);
        color: #f8fafc;
        box-shadow: 0 16px 38px rgba(2, 6, 23, 0.22);
    }

    .faculty-hero {
        padding: 16px;
        margin-bottom: 16px;
    }

    .faculty-hero h2,
    .faculty-section-head h3,
    .faculty-kpi h3 {
        color: #f8fafc;
    }

    .faculty-hero p,
    .faculty-section-head p,
    .faculty-list-item small,
    .faculty-timeline-body small,
    .faculty-field label,
    .faculty-kpi p {
        color: #aebcd0;
    }

    .faculty-phase-item,
    .faculty-upload-zone,
    .doc-preview-frame,
    .faculty-timeline-item,
    .faculty-hr-policy-summary .faculty-mini-card,
    .faculty-hr-preview-grid .faculty-mini-card,
    .faculty-hr-setup-tabs {
        border-color: rgba(148, 163, 184, 0.24);
        background: rgba(15, 23, 42, 0.7);
        color: #dbeafe;
    }

    .faculty-hr-policy-summary strong,
    .faculty-hr-preview-grid strong {
        color: #f8fafc;
    }

    .faculty-phase-item.done {
        background: rgba(15, 159, 110, 0.18);
        color: #bbf7d0;
        border-color: rgba(15, 159, 110, 0.36);
    }

    .faculty-timeline-body strong {
        color: #f8fafc;
    }

    .faculty-kpi,
    .faculty-card,
    .faculty-table-card {
        padding: 14px;
    }

    .faculty-tabs-header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .faculty-tab-link {
        justify-content: flex-start;
        font-size: 0.9rem;
    }

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

    .faculty-grid {
        gap: 12px;
    }
}
