:root {
    --red: #ef2028;
    --red-dark: #d81820;
    --text: #14213d;
    --text-soft: #667085;
    --muted: #8a94a6;
    --border: #e6ebf2;
    --bg: #f3f6fb;
    --card: #ffffff;
    --card-soft: #fbfcfe;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.04);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.portal-shell {
    min-height: 100vh;
}

/* Topbar */
.portal-topbar {
    height: 74px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e8edf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand-wrap {
    min-width: 98px;
}

.brand {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--red-dark);
}

.brand span {
    color: #ffb400;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.nav-link {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    padding: 24px 0 18px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
    border-bottom-color: var(--red);
}

.muted-link {
    opacity: 0.85;
}

.disabled-link {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
    user-select: none;
}

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

.journey-search {
    width: 300px;
    height: 42px;
    border: 1px solid #d8dee8;
    border-radius: 999px;
    padding: 0 14px;
    outline: none;
    background: #f8fafc;
}

.user-chip {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

/* Main */
.portal-main {
    padding: 18px;
}

.home-screen,
.dashboard-screen {
    width: 100%;
}

/* Hero */
.welcome-hero {
    position: relative;
    min-height: 190px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #d9101a 0%, #f3202a 60%, #ff4b55 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 36px rgba(217, 16, 26, 0.2);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 25%),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.08), transparent 22%),
        linear-gradient(135deg, rgba(255,255,255,0.04), transparent 60%);
}

.hero-copy {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 24px;
    max-width: 760px;
}

.hero-eyebrow {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.92;
    margin-bottom: 10px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
}

.hero-text {
    margin: 0 auto;
    max-width: 680px;
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.96;
}

.hero-actions {
    margin-top: 22px;
}

.hero-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: #fff;
    color: var(--red-dark);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    transition: transform 0.18s ease;
}

.hero-primary-btn:hover {
    transform: translateY(-1px);
}

/* Home layout */
.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.main-panel,
.notice-panel,
.card,
.content-title-bar,
.overview-card,
.summary-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.main-panel,
.notice-panel,
.card {
    padding: 18px;
}

/* Section title */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.red-bar {
    width: 4px;
    height: 22px;
    border-radius: 999px;
    background: var(--red);
}

/* Menu cards */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.menu-card {
    min-height: 154px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.active-card {
    border-color: #f04a50;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
}

.muted-card {
    opacity: 0.78;
}

.disabled-card {
    pointer-events: none;
    cursor: not-allowed;
    user-select: none;
}

.disabled-card:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
    border-color: var(--border);
}

.disabled-card .menu-icon,
.disabled-card .menu-icon img {
    filter: grayscale(100%);
}

.menu-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon img {
    width: 64px;
    height: 64px;
    display: block;
}

.menu-label {
    font-size: 16px;
    font-weight: 800;
}

.menu-hint {
    font-size: 13px;
    color: #7b8497;
    line-height: 1.5;
}

/* Announcements */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--card-soft);
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff0f0;
    color: var(--red-dark);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 10px;
}

.notice-item p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.6;
}

/* Home dashboard */
.home-dashboard {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.overview-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.overview-copy h2 {
    margin: 6px 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.overview-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.breadcrumb {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.breadcrumb span {
    margin: 0 6px;
}

.clean-summary-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.clean-card,
.summary-card {
    padding: 18px 20px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.clean-card span,
.summary-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.clean-card strong,
.summary-card strong {
    font-size: 40px;
    line-height: 1;
    font-weight: 800;
    color: var(--text);
}

/* Dashboard layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 18px;
    align-items: start;
}

.dashboard-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 14px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 92px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    color: #101828;
    margin-bottom: 16px;
}

.sidebar-back {
    display: block;
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 16px;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #f8fafc;
    color: #344054;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-back:hover {
    background: #eef2f7;
    border-color: #cfd8e3;
}

.sidebar-group-label {
    font-size: 11px;
    font-weight: 800;
    color: #98a2b3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 4px 0 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f8fafc;
    color: #344054;
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background: #f1f5f9;
    border-color: #d8dee8;
}

.sidebar-item.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 6px 14px rgba(230, 30, 36, 0.18);
}

.sidebar-item.active:hover {
    background: var(--red);
    color: #fff;
}

.sidebar-item-text {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Content title */
.content-title-bar {
    padding: 14px 16px;
}

.content-title-bar h2 {
    margin: 6px 0 0;
    font-size: 20px;
    color: #101828;
}

/* Cards */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}

.action-row.compact-actions,
.table-actions,
.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.toolbar-row-split {
    justify-content: space-between;
    flex-wrap: wrap;
}

.toolbar-row.toolbar-row-split {
    align-items: flex-start;
}

.search-wrap.full-width {
    width: 100%;
}

.flex-grow {
    flex: 1 1 auto;
    min-width: 280px;
}

.toolbar-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
}

/* Fields */
.search-wrap input,
.field-group input,
.field-group select {
    width: 100%;
    height: 42px;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
    background: #fff;
}

.filter-grid.wide-grid,
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.field-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475467;
    margin-bottom: 6px;
}

/* Buttons */
.primary-btn,
.ghost-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(239, 32, 40, 0.18);
}

.primary-btn:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.ghost-btn {
    border: 1px solid #d0d7e2;
    background: #fff;
    color: var(--text);
}

.export-btn {
    min-width: 92px;
}

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    padding: 0 14px 14px;
    position: relative;
    isolation: isolate;
}

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

th,
td {
    border-bottom: 1px solid #e9edf3;
    padding: 12px 10px;
    text-align: left;
    font-size: 13px;
}

th {
    background: #f8fafc;
    color: #344054;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    color: #98a2b3;
    padding: 28px;
}

.results-count {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* Info blocks */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.info-block {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: var(--card-soft);
}

.info-block h4 {
    margin: 0 0 8px;
    color: var(--text);
}

.info-block p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.6;
}

/* Base Modal */
.modal.hidden,
#employeeModal.hidden,
#downloadLogsModal.hidden,
#confirmModal.hidden {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.modal,
#employeeModal,
#downloadLogsModal,
#confirmModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
}

#employeeModal,
#downloadLogsModal,
#confirmModal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

#employeeModal {
    background: rgba(15, 23, 42, 0.45);
}

#downloadLogsModal {
    background: transparent;
}

#confirmModal {
    background: rgba(15, 23, 42, 0.48);
}

.modal-backdrop,
#downloadLogsModal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.modal-card,
.modal-dialog,
#employeeModal .modal-card,
#downloadLogsModal .modal-dialog,
#confirmModal .modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 32px));
    max-height: min(88vh, 920px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-lg {
    width: min(1200px, 95%);
}

#downloadLogsModal .modal-dialog {
    width: min(920px, calc(100vw - 32px));
    margin: 0;
}

.modal-header,
#employeeModal .modal-header,
#downloadLogsModal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    margin: 0;
    border-bottom: 1px solid #e8edf5;
}

.modal-header h3,
#employeeModal .modal-header h3,
#downloadLogsModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

#employeeModal .modal-header .muted {
    margin: 6px 0 0;
    color: #667085;
    font-size: 13px;
}

.modal-body {
    padding: 20px;
    overflow: auto;
}

#downloadLogsModal .modal-body {
    padding: 20px 24px 24px;
    overflow: auto;
}

.modal-body-tight {
    padding-top: 18px;
}

.close-btn,
.modal-close-btn,
.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.close-btn:hover,
.modal-close-btn:hover,
.icon-btn:hover {
    background: #f8fafc;
    color: #dc2626;
    border-color: #fecaca;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

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

.two-col-span {
    grid-column: 1 / -1;
}

#employeeModal form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 0 24px 24px;
    overflow: auto;
}

.form-section {
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
}

.form-section h4 {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

#employeeModal .field-group input,
#employeeModal .field-group select {
    background: #fbfdff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
    margin-top: 2px;
    background: #ffffff;
}

.modal-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.confirm-dialog {
    position: relative;
    width: min(500px, calc(100vw - 32px));
    max-width: 500px;
    max-height: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.confirm-header {
    display: none;
}

.confirm-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 22px 54px 10px 22px;
}

.confirm-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff4f4 0%, #ffe9ea 100%);
    color: var(--red-dark);
    box-shadow: inset 0 0 0 1px #fecdd3;
    margin-top: 1px;
}

#confirmModal[data-tone="default"] .confirm-icon {
    background: #eff6ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.confirm-copy {
    min-width: 0;
    flex: 1;
}

.confirm-copy h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    max-width: 300px;
}

.confirm-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.58;
    color: #64748b;
    max-width: 320px;
}

.confirm-employee-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 8px 0 10px;
}

.confirm-employee-meta.hidden {
    display: none;
}

.confirm-employee-name {
    margin: 0;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.confirm-employee-id {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.confirm-footer {
    justify-content: flex-end;
    gap: 10px;
    padding: 0 22px 20px;
}


.danger-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(239, 32, 40, 0.18);
}

.danger-btn:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.danger-btn:disabled,
.ghost-btn:disabled,
.modal-close-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.danger-btn.is-loading {
    position: relative;
    padding-left: 38px;
}

.danger-btn.is-loading::before {
    content: '';
    position: absolute;
    left: 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    animation: button-spin 0.8s linear infinite;
}

#confirmModal[data-tone="default"] .danger-btn {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

#confirmModal[data-tone="default"] .danger-btn:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

/* Table card */
.table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.table-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcfe;
}

.table-card .card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

/* Employee Table */
#employeeTable {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    position: relative;
}

#employeeTable th,
#employeeTable td {
    position: relative;
}

#employeeTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.25;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
}

#employeeTable tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
    color: #1e293b;
    vertical-align: middle;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#employeeTable tbody tr:nth-child(even) {
    background: #fcfdff;
}

#employeeTable tbody tr:hover {
    background: #f8fbff;
    transition: background 0.2s ease;
}

#employeeTable td:first-child,
#employeeTable th:first-child {
    padding-left: 16px;
}

#employeeTable td:last-child,
#employeeTable th:last-child {
    position: static;
    z-index: auto;
    min-width: 156px;
    width: 156px;
    max-width: 156px;
    overflow: visible;
    background: inherit;
    border-left: 1px solid #e2e8f0;
    box-shadow: none;
}

#employeeTable thead th:last-child {
    background: #f8fafc;
}

#employeeTable tbody tr:hover td:last-child {
    background: #f8fbff;
}

#employeeTable .empty-state {
    text-align: center;
    color: #64748b;
    padding: 28px 16px;
    font-size: 14px;
    white-space: normal;
}

.table-action-cell {
    min-width: 156px;
    width: 156px;
    max-width: 156px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

.table-action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.table-action-cell .action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: none;
}

.table-action-cell .action-icon-btn img {
    width: 16px;
    height: 16px;
    display: block;
}

.table-action-cell .ghost-btn,
.table-action-cell .danger-btn,
.table-action-cell .view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.table-action-cell .ghost-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.table-action-cell .ghost-btn:hover {
    background: #f8fafc;
}

.table-action-cell .danger-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px rgba(239, 32, 40, 0.18);
}

.table-action-cell .danger-btn:hover {
    background: #ffe4e6;
}

.view-btn {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.view-btn:hover {
    background: #dbeafe;
}

.table-action-cell .action-view {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.table-action-cell .action-view:hover {
    background: #dbeafe;
}

.table-action-cell .action-edit {
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.table-action-cell .action-edit:hover {
    background: #eef2f7;
}

.table-action-cell .action-delete {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fecdd3;
}

.table-action-cell .action-delete:hover {
    background: #ffe4e6;
}

.col-id { min-width: 90px; }
.col-name { min-width: 170px; }
.col-client { min-width: 130px; }
.col-position { min-width: 140px; }
.col-department { min-width: 130px; }
.col-area { min-width: 130px; }
.col-district { min-width: 120px; }
.col-date { min-width: 100px; }
.col-type { min-width: 110px; }
.col-status { min-width: 110px; }
.col-number { min-width: 115px; }
.col-phone { min-width: 120px; }
.col-emp_bank,
.col-emp_bankaccountnum,
.col-emp_emergencyname { min-width: 160px; }
.col-emp_emergencycontact { min-width: 135px; }
.col-actions {
    min-width: 156px;
    width: 156px;
    max-width: 156px;
}

.status-badge,
.medicard-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.status-active {
    background: #ecfdf3;
    color: #047857;
}

.status-probation {
    background: #fff7ed;
    color: #c2410c;
}

.status-on-leave {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-inactive {
    background: #f1f5f9;
    color: #475569;
}

.medicard-enrolled {
    background: #ecfdf3;
    color: #047857;
}

.medicard-pending {
    background: #fff7ed;
    color: #c2410c;
}

.medicard-not-enrolled {
    background: #fef2f2;
    color: #b91c1c;
}

.compact-text {
    font-size: 12px;
    color: #334155;
}

.table-wrap::-webkit-scrollbar {
    height: 10px;
}

.table-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* Download logs modal */
.download-logs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.download-logs-note {
    flex: 1 1 320px;
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.btn-generate-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--red);
    border-radius: 12px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 18px rgba(239, 32, 40, 0.18);
}

.btn-generate-export:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-1px);
}

.btn-generate-export:active {
    transform: translateY(0);
}

.btn-generate-export:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-logs-table-wrap {
    padding: 0;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    background: #ffffff;
    overflow: auto;
}

#downloadLogsModal table {
    min-width: 720px;
}

#downloadLogsModal th,
#downloadLogsModal td {
    padding: 12px 14px;
    font-size: 13px;
    white-space: nowrap;
}

#downloadLogsModal th {
    background: #f8fafc;
    color: #475467;
}

#downloadLogsModal .empty-state {
    text-align: center;
    color: #98a2b3;
    white-space: normal;
}

.download-log-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d7e2f1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.download-log-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.table-header-wrap {
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.table-actions-stack {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.table-page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.table-page-size select {
    min-width: 78px;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #d8dee8;
    background: #fff;
    color: #0f172a;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 16px;
    flex-wrap: wrap;
}

.pagination-summary {
    color: #667085;
    font-size: 13px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 92px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #d8dee8;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

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

.pagination-page-indicator {
    min-width: 110px;
    text-align: center;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.download-logs-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-clear-logs {
    min-width: 116px;
    height: 40px;
    border-radius: 12px;
}

.btn-clear-logs:disabled {
    opacity: 0.68;
    cursor: not-allowed;
}

.download-logs-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-pagination {
    padding-top: 14px;
}

/* Employee details modal */
.employee-details-dialog {
    max-width: 1120px;
}

.employee-details-body {
    padding-top: 6px;
}

.employee-profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(135deg, #fff8f8 0%, #ffffff 100%);
    margin-bottom: 18px;
}

.employee-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ef2028 0%, #ff6b72 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.employee-profile-copy {
    flex: 1;
    min-width: 0;
}

.employee-profile-copy h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.employee-profile-copy p {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--text);
    font-weight: 700;
}

.employee-profile-copy span {
    display: inline-block;
    color: var(--text-soft);
    font-size: 13px;
}

.employee-profile-status {
    display: flex;
    align-items: flex-start;
}

.employee-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.details-section {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    padding: 18px;
}

.details-section-head {
    margin-bottom: 14px;
}

.details-section-head h4 {
    margin: 0 0 4px;
    font-size: 16px;
}

.details-section-head span {
    font-size: 12px;
    color: var(--text-soft);
}

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

.detail-item {
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card-soft);
    border: 1px solid #edf2f7;
    min-width: 0;
}

.detail-item-full {
    grid-column: 1 / -1;
}

.detail-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.detail-item strong {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    word-break: break-word;
}

.employee-details-footer {
    margin-top: 18px;
}

/* Export filter panel */
.export-filter-panel {
    margin: 12px 0 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.export-filter-panel-head h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #0f172a;
}

.export-filter-panel-head p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.export-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbe4f0;
    color: #334155;
    font-size: 12px;
    line-height: 1.2;
}

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

.filter-chip.muted-chip {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

/* Toast notifications */
.toast-viewport {
    position: fixed;
    top: 92px;
    right: 18px;
    width: min(360px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1200;
    pointer-events: none;
}

.toast {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 24px;
    gap: 12px;
    align-items: start;
    padding: 14px 14px 16px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow: hidden;
    pointer-events: auto;
}

.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.toast-success {
    background: linear-gradient(135deg, rgba(10, 102, 58, 0.98), rgba(16, 124, 73, 0.96));
}

.toast-error {
    background: linear-gradient(135deg, rgba(120, 24, 24, 0.98), rgba(190, 24, 24, 0.96));
}

.toast-warning {
    background: linear-gradient(135deg, rgba(133, 77, 14, 0.98), rgba(180, 83, 9, 0.96));
}

.toast-info {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98), rgba(51, 65, 85, 0.96));
}

.toast-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.toast-content {
    min-width: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.toast-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 22px;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
}

.toast-close:hover {
    color: #fff;
}

.toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.24);
    transform-origin: left center;
    animation: toast-progress linear forwards;
}

.toast-paused .toast-progress {
    animation-play-state: paused;
}

@keyframes toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Optional legacy topbar support */
.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-weight: 700;
    font-size: 18px;
}

.logo-main {
    color: #dc2626;
}

.logo-sub {
    color: #f59e0b;
}

.nav-item {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: 0.2s;
}

.nav-item:hover {
    background: #f3f4f6;
}

.nav-item.active {
    background: #fee2e2;
    color: #dc2626;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 8px 36px 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    width: 260px;
}

.icon-search {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 14px;
    color: #9ca3af;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}

.user-menu:hover {
    background: #f3f4f6;
}

.avatar {
    width: 32px;
    height: 32px;
    background: #dc2626;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.dropdown-menu {
    position: absolute;
    right: 20px;
    top: 70px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: none;
    flex-direction: column;
    min-width: 150px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.dropdown-menu a {
    padding: 10px;
    text-decoration: none;
    color: #374151;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.user-district {
    font-size: 12px;
    color: #6b7280;
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-buttons button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 1200px) {
    .top-nav {
        display: none;
    }

    .home-layout,
    .dashboard-layout,
    .clean-summary-grid,
    .summary-grid,
    .info-grid,
    .form-grid,
    .filter-grid.wide-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .overview-card {
        align-items: flex-start;
    }

    .journey-search {
        width: 220px;
    }

    .hero-title {
        font-size: 32px;
    }

    #employeeTable thead th,
    #employeeTable tbody td {
        padding: 12px 10px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    #employeeModal,
    #downloadLogsModal {
        padding: 16px;
    }

    .form-grid.two-col,
    .filter-grid.wide-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .two-col-span {
        grid-column: auto;
    }

    .download-logs-toolbar {
        align-items: stretch;
    }

    .btn-generate-export {
        width: 100%;
    }

    .table-actions-stack,
    .download-logs-toolbar-actions,
    .download-logs-meta,
    .table-pagination,
    .pagination-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-page-size {
        width: 100%;
        justify-content: space-between;
    }

    .employee-profile-hero {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .employee-details-grid,
    .details-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portal-topbar {
        height: auto;
        padding: 14px;
        flex-wrap: wrap;
    }

    .toolbar-row-split {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions-right {
        width: 100%;
        margin-left: 0;
    }

    .toolbar-actions-right .ghost-btn {
        width: 100%;
    }

    .action-row.compact-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .journey-search {
        width: 100%;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-text {
        font-size: 14px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .toast-viewport {
        top: 82px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}
@keyframes button-spin {
    to { transform: rotate(360deg); }
}

#confirmModal.is-loading .modal-backdrop {
    cursor: wait;
}


#confirmModal .modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 2;
}

#confirmModal .confirm-icon svg {
    width: 20px;
    height: 20px;
}

#confirmModal .ghost-btn,
#confirmModal .danger-btn {
    min-width: 110px;
    height: 40px;
    font-size: 13px;
    border-radius: 12px;
}

#confirmModal .danger-btn.is-loading {
    padding-left: 34px;
}

#confirmModal .danger-btn.is-loading::before {
    left: 12px;
    width: 12px;
    height: 12px;
}

.dropdown-section-title {
    padding: 10px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.dropdown-static-item {
    display: block;
    padding: 0 12px 10px;
    font-size: 13px;
    color: #0f172a;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

.dropdown-menu a {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-menu a small {
    color: #94a3b8;
    font-size: 11px;
}

select:disabled,
input:disabled {
    background: #f8fafc;
    color: #475569;
    cursor: not-allowed;
}

.dropdown-static-item.subtle {
    padding-top: 0;
    color: #64748b;
    font-size: 12px;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(239, 32, 40, 0.14), transparent 24%),
        radial-gradient(circle at bottom right, rgba(20, 33, 61, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

.login-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-shell {
    width: min(1360px, 100%);
    min-height: min(840px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(230, 235, 242, 0.9);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.09);
    backdrop-filter: blur(10px);
}

.login-hero-panel {
    padding: 54px 56px;
    background:
        radial-gradient(circle at top left, rgba(239, 32, 40, 0.08), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #fff6f6 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
}

.login-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand-login {
    display: inline-flex;
    align-items: center;
    font-size: 20px;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(239, 32, 40, 0.08);
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-hero-copy {
    max-width: 620px;
}

.login-kicker {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-hero-panel h1 {
    margin: 0;
    font-size: clamp(38px, 4vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    max-width: 640px;
}

.login-hero-panel p {
    margin: 18px 0 0;
    max-width: 610px;
    color: #5f6f86;
    font-size: 17px;
    line-height: 1.65;
}

.login-role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 740px;
}

.login-role-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e6ebf2;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.login-role-card.active {
    border-color: rgba(239, 32, 40, 0.24);
    box-shadow: 0 18px 36px rgba(239, 32, 40, 0.08);
}

.login-role-chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(239, 32, 40, 0.1);
    color: var(--red-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.login-role-chip.district {
    background: rgba(20, 33, 61, 0.08);
    color: var(--text);
}

.login-role-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 19px;
}

.login-role-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.login-district-box {
    max-width: 740px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e6ebf2;
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.login-district-label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-district-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-district-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.login-card-panel {
    padding: 40px;
    background: linear-gradient(180deg, rgba(252,253,255,0.78) 0%, rgba(255,255,255,0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-auth-card {
    width: min(100%, 460px);
    background: #ffffff;
    border: 1px solid #e6ebf2;
    border-radius: 26px;
    padding: 32px;
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.08);
}

.login-card-head {
    margin-bottom: 24px;
}

.login-card-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--red-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-card-head h2 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.05;
}

.login-card-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.password-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrap input {
    width: 100%;
    padding-right: 84px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #d9e2ec;
    background: #fff;
    color: #334155;
    border-radius: 10px;
    min-width: 62px;
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.password-toggle-btn:hover {
    border-color: rgba(239, 32, 40, 0.25);
}

.login-password-wrap input {
    padding-right: 84px !important;
}

.danger-ghost-btn {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
}

.danger-ghost-btn:hover {
    background: #ffe4e6;
}

.operation-access-row-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.operation-row-btn {
    padding: 10px 14px;
    min-width: 78px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    font-weight: 600;
}

.login-field input {
    height: 52px;
    border-radius: 14px;
    border: 1px solid #d7deea;
    padding: 0 16px;
    background: #fbfdff;
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-field input:focus {
    border-color: rgba(239, 32, 40, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 32, 40, 0.08);
    background: #fff;
}

.login-submit-btn {
    margin-top: 4px;
    height: 54px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), #ff434a);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 16px 30px rgba(239, 32, 40, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 36px rgba(239, 32, 40, 0.28);
}

.login-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.login-alert.error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #b42318;
}

.login-help-box {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e6ebf2;
}

.login-help-box strong {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
}

.login-help-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.login-help-box li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
}

.login-help-box li span {
    color: #0f172a;
    font-weight: 600;
}

.login-help-box code {
    display: inline-block;
    padding: 6px 8px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .login-page-wrap {
        padding: 18px;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-hero-panel,
    .login-card-panel {
        padding: 32px 24px;
    }

    .login-role-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-page-wrap {
        padding: 0;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .login-hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-hero-panel h1 {
        font-size: 34px;
    }

    .login-card-panel {
        padding-top: 0;
    }

    .login-auth-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .login-card-head h2 {
        font-size: 28px;
    }
}

.operation-screen-wrap {
    padding-bottom: 32px;
}

.operation-hero-card,
.operation-create-card,
.operation-access-card {
    border: 1px solid #e7edf5;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.05);
}

.operation-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.8fr);
    gap: 20px;
    align-items: stretch;
}

.operation-hero-copy h2 {
    margin: 10px 0 8px;
    font-size: 28px;
    color: #0f172a;
}

.operation-hero-copy p,
.operation-access-header p,
.operation-access-row-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.operation-hero-side {
    border-radius: 22px;
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 1px solid #ffe0e3;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.operation-stat-label,
.operation-stat-note {
    color: #64748b;
    font-size: 14px;
}

.operation-stat-value {
    font-size: 40px;
    font-weight: 800;
    color: #0f172a;
}

.operation-access-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.operation-create-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.operation-create-card .form-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.operation-create-callout-card {
    padding: 24px 26px;
}

.operation-create-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.operation-create-callout h3 {
    margin: 8px 0 6px;
    font-size: 22px;
    color: #0f172a;
}

.operation-create-callout p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
    max-width: 720px;
}

.operation-modal-dialog {
    width: min(760px, calc(100vw - 32px));
}

.operation-modal-header {
    align-items: flex-start;
}

.operation-modal-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.operation-modal-actions {
    margin-top: 6px;
}

.operation-create-client-grid {
    margin-top: 10px;
}

.field-note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.operation-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.operation-access-header h3 {
    margin: 0 0 6px;
}

.operation-access-actions {
    display: flex;
    gap: 10px;
}

.operation-access-alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    border: 1px solid #fbd0d5;
    background: #fff4f5;
    color: #b42318;
}

.operation-access-grid {
    display: grid;
    gap: 18px;
}

.operation-access-row {
    border: 1px solid #e5eaf1;
    border-radius: 20px;
    padding: 20px;
    background: #fbfdff;
}

.operation-access-row-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.operation-access-row-head h4 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #0f172a;
}

.operation-access-badge {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff1f2;
    color: #be123c;
    font-size: 13px;
    font-weight: 700;
}

.operation-access-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.operation-access-check {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 13px 14px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.operation-access-check:hover {
    border-color: rgba(239, 32, 40, 0.22);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

.operation-access-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

.operation-access-check span {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.operation-access-loading,
.operation-access-empty {
    border: 1px dashed #d7e0ea;
    border-radius: 18px;
    padding: 26px 18px;
    text-align: center;
    color: #64748b;
    background: #fbfdff;
}

@media (max-width: 980px) {
    .operation-hero-card {
        grid-template-columns: 1fr;
    }

    .operation-access-header {
        flex-direction: column;
    }

    .operation-create-callout {
        flex-direction: column;
        align-items: flex-start;
    }

    .operation-create-card .form-grid,
    .operation-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .operation-access-actions {
        width: 100%;
    }

    .operation-access-row-tools {
        width: 100%;
        justify-content: flex-start;
    }

    .operation-access-actions .ghost-btn,
    .operation-access-actions .primary-btn,
    .operation-create-actions .ghost-btn,
    .operation-create-actions .primary-btn {
        flex: 1;
    }

    .operation-create-actions {
        width: 100%;
    }

    .operation-access-check-grid {
        grid-template-columns: 1fr;
    }

    .operation-create-callout-card {
        padding: 22px 18px;
    }

    .operation-modal-dialog {
        width: calc(100vw - 20px);
    }
}


.client-access-selector {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.client-access-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.client-access-search-wrap {
    position: relative;
    flex: 1 1 260px;
}

.client-access-search {
    display: block;
    width: 100%;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #0f172a;
    padding: 0 16px 0 44px;
    font-size: 15px;
    line-height: 1.35;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.client-access-search::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.client-access-search::-webkit-search-decoration,
.client-access-search::-webkit-search-cancel-button,
.client-access-search::-webkit-search-results-button,
.client-access-search::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.client-access-search:focus {
    outline: none;
    border-color: rgba(239, 32, 40, 0.38);
    box-shadow: 0 0 0 4px rgba(239, 32, 40, 0.08);
}

.client-access-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.client-access-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.client-access-toolbar-meta {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
}

.client-access-inline-btn {
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.client-access-inline-btn:hover:not(:disabled) {
    border-color: rgba(239, 32, 40, 0.24);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.client-access-inline-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.client-access-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 14px;
}

.client-access-panel {
    border: 1px solid #e5eaf1;
    border-radius: 18px;
    background: #fbfdff;
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.client-access-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
}

.client-access-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.client-access-panel-count {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.client-access-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 14px 14px;
    max-height: 310px;
    overflow: auto;
}

.client-access-item,
.client-access-assigned-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 14px;
    padding: 11px 12px;
}

.client-access-item-name,
.client-access-assigned-name {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-access-item-btn,
.client-access-remove-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.client-access-item-btn {
    background: rgba(239, 32, 40, 0.08);
    color: var(--red);
}

.client-access-remove-btn {
    background: #eef2f7;
    color: #334155;
}

.client-access-item-btn:hover,
.client-access-remove-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.client-access-assigned-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 14px 14px;
    align-content: flex-start;
}

.client-access-assigned-item {
    padding: 10px 10px 10px 12px;
    min-width: 0;
}

.client-access-empty-state {
    border: 1px dashed #d7e0ea;
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    color: #64748b;
    background: #fff;
    font-size: 14px;
    line-height: 1.55;
}

.client-access-selector.compact .client-access-panel {
    min-height: 220px;
}

.client-access-selector.compact .client-access-list {
    max-height: 260px;
}

@media (max-width: 900px) {
    .client-access-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .client-access-toolbar-actions {
        width: 100%;
    }

    .client-access-inline-btn {
        flex: 1;
        text-align: center;
    }

    .client-access-item,
    .client-access-assigned-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-access-item-btn,
    .client-access-remove-btn {
        width: 100%;
    }
}

.login-alert.success {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.22);
    color: #166534;
}

.login-otp-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.login-otp-summary strong {
    font-size: 15px;
    color: #0f172a;
}

.login-otp-summary span,
.login-help-note {
    font-size: 13px;
    color: #475569;
}

.login-otp-summary small {
    font-size: 12px;
    color: #64748b;
}

.login-secondary-form {
    margin-top: 12px;
}

.full-width-btn {
    width: 100%;
    justify-content: center;
}


/* Operation district admin table */
#districtAdminTable {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

#districtAdminTable th,
#districtAdminTable td {
    position: relative;
}

#districtAdminTable thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

#districtAdminTable tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
    color: #1e293b;
    vertical-align: top;
    line-height: 1.45;
}

#districtAdminTable tbody tr:nth-child(even) {
    background: #fcfdff;
}

#districtAdminTable tbody tr:hover {
    background: #f8fbff;
}

#districtAdminTable td:first-child,
#districtAdminTable th:first-child {
    padding-left: 16px;
}

#districtAdminTable td:last-child,
#districtAdminTable th:last-child {
    min-width: 156px;
    width: 156px;
    max-width: 156px;
    border-left: 1px solid #e2e8f0;
}

#districtAdminTable .empty-state {
    text-align: center;
    color: #64748b;
    padding: 28px 16px;
    font-size: 14px;
    white-space: normal;
}

.operation-filter-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.operation-admin-table-card .card-header p,
.operation-table-note {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.col-email { min-width: 230px; }
.col-client-access { min-width: 320px; }

.admin-name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-name-cell strong {
    font-size: 14px;
    color: #0f172a;
}

.admin-name-cell span {
    color: #64748b;
    font-size: 12px;
}

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

.client-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.client-pill-more {
    background: #f8fafc;
    color: #64748b;
}

.access-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.access-state-active {
    background: #ecfdf3;
    color: #047857;
}

.access-state-empty {
    background: #fff7ed;
    color: #c2410c;
}

.operation-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.operation-inline-actions .ghost-btn,
.operation-inline-actions .danger-ghost-btn {
    min-width: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .operation-filter-grid {
        grid-template-columns: 1fr;
    }
}


.operation-quick-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.operation-client-modal-dialog {
    max-width: 560px;
}

@media (max-width: 640px) {
    .operation-quick-actions {
        width: 100%;
        flex-direction: column-reverse;
        align-items: stretch;
    }
}



.sr-only-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.batch-upload-file-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #fbfdff;
}

.batch-upload-file-shell:focus-within {
  border-color: rgba(239, 32, 40, 0.36);
  box-shadow: 0 0 0 3px rgba(239, 32, 40, 0.08);
}

.batch-upload-file-trigger {
  flex: 0 0 auto;
  min-width: 118px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
}

.batch-upload-file-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.batch-upload-file-name {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-upload-file-help {
  color: #64748b;
  font-size: 12px;
}

.batch-upload-footer {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

.batch-upload-action-btn {
  min-width: 140px;
  min-height: 42px;
}

.batch-upload-result {
  max-height: 180px;
  overflow: auto;
}

.batch-upload-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}
.batch-upload-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.batch-upload-result.is-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.batch-upload-result.is-error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.batch-upload-result ul {
  margin: 8px 0 0 18px;
  padding: 0;
}


.operation-section-heading {
  margin: 1.25rem 0 0.9rem;
}

.operation-section-heading h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.35rem;
}

.operation-section-heading p {
  margin: 0;
  color: #667085;
}

.operation-section-heading-spaced {
  margin-top: 1.5rem;
}

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

@media (max-width: 1100px) {
  .activity-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .activity-filter-grid {
    grid-template-columns: 1fr;
  }
}


.operation-section-nav-wrap {
  margin: 1.25rem 0 0.75rem;
}

.operation-section-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.operation-section-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.operation-section-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.operation-section-tab.is-active {
  background: linear-gradient(135deg, #ef4444, #ff5a6b);
  color: #fff;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.24);
}

.operation-tab-panel {
  display: none;
}

.operation-tab-panel.is-active {
  display: block;
}

@media (max-width: 720px) {
  .operation-section-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .operation-section-tab {
    width: 100%;
    text-align: center;
  }
}

.operation-subpage-header-card {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem 1.15rem;
}

.operation-subpage-heading {
  margin: 0;
}

.operation-subpage-heading h3 {
  margin-top: 0.3rem;
}

.operation-section-nav-wrap-inline {
  margin-top: 0.95rem;
}

.operation-filter-panel-embedded,
.operation-inline-subpage-card {
  margin-top: 1rem;
}

.operation-activity-filter-panel {
  margin-top: 1rem;
}


.batch-upload-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.batch-upload-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.batch-upload-template-btn {
  white-space: nowrap;
}

#batchUploadModal .modal-card {
  width: min(980px, calc(100vw - 32px));
}

#batchUploadForm {
  padding: 0 0 18px;
}

#batchUploadForm .form-section {
  margin: 0 16px 0;
}

#batchUploadModal .batch-upload-action-btn {
  min-width: 128px;
  height: 40px;
}

.batch-upload-footer {
  display: none;
}

@media (max-width: 720px) {
  .batch-upload-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .batch-upload-footer-actions {
    width: 100%;
    justify-content: stretch;
  }

  .batch-upload-footer-actions .batch-upload-action-btn,
  .batch-upload-template-btn {
    width: 100%;
  }
}
