:root {
    color-scheme: light;
    --bg: #edf5f7;
    --panel: #ffffff;
    --text: #102a43;
    --muted: #617487;
    --primary: #1769d2;
    --primary-dark: #0f4fa3;
    --accent: #0f9f7f;
    --accent-dark: #0b745f;
    --accent-soft: #dff7ef;
    --line: #cfdee5;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --shadow: 0 12px 30px rgba(16, 73, 96, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.global-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0;
    background: #ffffff;
    color: #334155;
    box-shadow: none;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.header-page-dropdown {
    position: relative;
}

.header-page-dropdown summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.header-page-dropdown summary::-webkit-details-marker {
    display: none;
}

.header-page-dropdown > div {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    min-width: 220px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.header-page-dropdown > div a {
    padding: 11px 14px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.header-page-dropdown > div a:hover {
    background: #dbeafe;
    color: var(--primary-dark);
}

.global-nav-button:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.header-xlsx-upload-form {
    display: inline-flex;
    margin: 0;
}

.header-xlsx-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.schedule-xlsx-nav-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 40px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px clamp(18px, 5vw, 64px);
    border-bottom: 4px solid var(--accent);
    background: #0f5eae;
    color: #ffffff;
}

.app-header h1,
.panel h2 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: #a7f3d0;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.muted {
    color: var(--muted);
}

.app-header .muted {
    color: #cbd5e1;
    margin-bottom: 0;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.date-filter {
    align-self: center;
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.header-actions {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
}

.vendor-unit-selector {
    display: block;
    width: 210px;
    margin: 0;
}

.vendor-unit-selector label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.vendor-unit-selector select {
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    padding: 7px 32px 7px 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.vendor-unit-empty {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    border-radius: 8px;
    padding: 0 12px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 800;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    min-height: 43px;
    border-radius: 8px;
    padding: 0 15px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}

.notification-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #0f172a;
    font-size: 1.35rem;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}

.notification-button::-webkit-details-marker {
    display: none;
}

.notification-button.has-notifications {
    color: #facc15;
}

.notification-button:hover {
    background: transparent;
    color: #475569;
}

.notification-button.has-notifications:hover {
    background: transparent;
    color: #fde047;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    padding: 0 4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
}

.notification-dropdown {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-self: center;
}

.visible-xs-inline {
    display: none;
}

.notification-menu {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    color: var(--text);
}

.notification-dropdown:not([open]) .notification-menu {
    display: none;
}

.notification-dropdown[open] .notification-menu {
    display: block;
}

.notification-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.16s ease-out;
}

.notification-heading {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
    color: var(--text);
}

.notification-list-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    color: var(--text);
    text-decoration: none;
}

.notification-list-item:hover {
    background: #eff6ff;
}

.notification-list-title,
.notification-list-message,
.notification-list-item small {
    display: block;
}

.notification-list-title {
    margin-bottom: 4px;
    font-weight: 800;
}

.notification-list-message {
    width: 300px;
    max-width: 100%;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.notification-list-item small {
    margin-top: 6px;
    color: var(--muted);
}

.notification-empty {
    padding: 16px 14px;
    color: var(--muted);
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
}

.notification-footer a {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
}

.date-filter label {
    color: #e2e8f0;
    width: 100%;
}

.filter-panel {
    margin-bottom: 18px;
}

.content-date-filter {
    align-items: end;
}

.content-date-filter label {
    color: #334155;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #ffffff;
    color: var(--text);
}

input[readonly] {
    background: #eef2f7;
    color: #475569;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 11px 16px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

button.secondary {
    background: #334155;
}

.button-link {
    display: inline-block;
    border-radius: 8px;
    padding: 11px 16px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.secondary-link {
    background: #334155;
}

.icon-button {
    display: inline-flex !important;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px;
    height: 40px !important;
    min-height: 40px;
    border: 0 !important;
    border-radius: 8px;
    padding: 0 !important;
    background: var(--primary) !important;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    vertical-align: middle;
}

.icon-button:hover {
    background: var(--primary-dark) !important;
}

.icon-button.secondary {
    background: #334155 !important;
}

.icon-button > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 18px !important;
    line-height: 1 !important;
}

.icon-button.status-process-button {
    background: #f97316 !important;
}

.icon-button.status-used-button {
    background: #16a34a !important;
}

.icon-button.status-rejected-button {
    background: #dc2626 !important;
}

.icon-button:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.security-shift-filter {
    width: min(100%, 520px);
}

.security-shift-create-form {
    display: grid;
    grid-template-columns: 58px minmax(160px, 1.4fr) 86px 120px 120px auto;
    gap: 10px;
    align-items: end;
}

.security-shift-create-form > div {
    min-width: 0;
}

.security-shift-create-form button {
    min-height: 44px;
    white-space: nowrap;
}

.security-shift-table {
    min-width: 790px;
}

.security-shift-table th:first-child,
.security-shift-table td:first-child {
    width: 58px;
    text-align: center;
}

.security-shift-table th:nth-child(3),
.security-shift-table td:nth-child(3) {
    width: 86px;
}

.security-shift-table th:nth-child(3),
.security-shift-table td:nth-child(3),
.security-shift-table th:nth-child(4),
.security-shift-table td:nth-child(4) {
    width: 170px;
}

.security-shift-table th:nth-child(5),
.security-shift-table td:nth-child(5) {
    width: 140px;
}

.security-shift-table th:last-child,
.security-shift-table td:last-child {
    width: 112px;
}

.security-shift-table input {
    min-width: 0;
    width: 100%;
}

.security-shift-table input[type="number"] {
    width: 58px;
    min-width: 58px;
}

.security-shift-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.security-shift-note {
    margin: 14px 0 0;
    font-size: 0.9rem;
}

.telegram-unit-filter,
.telegram-settings-panel {
    width: min(100%, 920px);
}

.telegram-settings-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(190px, 1.1fr) minmax(180px, 0.9fr) minmax(110px, 0.55fr) auto;
    gap: 14px;
    align-items: end;
}

.telegram-settings-form > div {
    min-width: 0;
}

.telegram-settings-form button {
    min-height: 44px;
    white-space: nowrap;
}

.telegram-settings-note {
    margin: 12px 0 0;
}

.telegram-settings-table {
    min-width: 1040px;
}

.telegram-settings-table input,
.telegram-settings-table select {
    min-width: 150px;
}

@media (max-width: 980px) {
    .security-shift-create-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-shift-create-form button {
        width: 100%;
    }

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

@media (max-width: 640px) {
    .security-shift-create-form {
        grid-template-columns: 1fr;
    }

    .telegram-settings-form {
        grid-template-columns: 1fr;
    }
}

.menu-card > i {
    color: var(--primary);
    width: 24px;
    font-size: 1.25rem;
    text-align: center;
}

.attendance-summary-panel {
    width: min(100%, 610px);
    padding: 0;
    overflow: hidden;
}

.attendance-summary-row {
    display: flex;
    width: min(100%, 860px);
    margin-right: auto;
    margin-bottom: 18px;
    margin-left: auto;
    gap: 12px;
    align-items: stretch;
    justify-content: center;
}

.compact-month-panel {
    width: 238px;
    margin: 0;
    padding: 12px;
}

.compact-month-filter {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 7px 8px;
    align-items: center;
}

.compact-month-filter label {
    margin: 0;
    font-size: 0.8rem;
}

.compact-month-filter select,
.compact-month-filter input,
.compact-month-filter button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.85rem;
}

.compact-month-filter button {
    grid-column: 1 / -1;
}

.compact-date-filter {
    display: grid;
    gap: 7px;
}

.compact-date-filter label {
    margin: 0;
    font-size: 0.8rem;
}

.compact-date-filter input,
.compact-date-filter button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.85rem;
}

.compact-report-filter {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding: 12px;
}

.report-filter-form {
    display: flex;
    width: 100%;
    gap: 12px;
    align-items: end;
}

.report-filter-field {
    display: grid;
    flex: 1 1 160px;
    min-width: 0;
    gap: 6px;
}

.report-filter-field.report-filter-search {
    flex-grow: 2;
}

.report-filter-field label {
    margin: 0;
    color: #334155;
    font-size: 0.8rem;
}

.report-filter-form input,
.report-filter-form select,
.report-filter-form button {
    min-height: 40px;
}

.report-filter-form > button {
    flex: 0 0 auto;
}

.data-recap-panel {
    padding: 14px 16px;
}

.data-recap-panel h2 {
    margin-bottom: 10px;
}

.table-wrap details pre {
    max-width: 460px;
    max-height: 240px;
    margin: 8px 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: #f4f9fb;
    color: var(--text);
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.data-recap-table {
    min-width: 760px;
    table-layout: fixed;
}

.data-recap-table th,
.data-recap-table td {
    padding: 9px 10px;
    text-align: center;
}

.data-recap-table th {
    font-size: 0.75rem;
}

.data-recap-table td {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.report-month-filter {
    grid-template-columns: auto 92px auto 140px auto minmax(180px, 1fr) auto;
}

.report-month-filter button {
    grid-column: auto;
}

.attendance-summary-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.attendance-summary-table {
    width: 100%;
    min-width: 510px;
    table-layout: fixed;
}

.attendance-summary-table td {
    width: 33.333%;
    padding: 8px 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
}

.attendance-summary-table td:last-child {
    border-right: 0;
}

.attendance-summary-table tr:last-child td {
    border-bottom: 0;
}

.attendance-summary-table span,
.attendance-summary-table strong {
    display: block;
}

.attendance-summary-table span {
    margin: 0 0 2px;
    color: var(--muted);
    font-size: 0.8rem;
}

.attendance-summary-table strong {
    font-size: 1.05rem;
}

.attendance-summary-table .empty-summary-cell {
    background: #f8fafc;
}

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

.row-actions form {
    margin: 0;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.summary-grid article,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.summary-grid article {
    border-radius: 8px;
    padding: 18px;
}

.summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.summary-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
}

.panel {
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 22px;
}

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

.menu-card {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px 10px;
    min-height: 105px;
    align-content: center;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-card:hover {
    transform: translateY(-2px);
    border-color: #5bc5ae;
    box-shadow: 0 14px 30px rgba(15, 159, 127, 0.12);
}

.menu-card strong {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.menu-card span {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.notification-menu-card.has-notifications > i {
    color: #facc15;
}

.menu-card .menu-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    grid-column: auto;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    padding: 0 7px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.main-menu-page .container {
    max-width: 1220px;
}

.main-menu-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    padding-left: 14px;
}

.main-menu-heading .eyebrow {
    margin-bottom: 4px;
}

.main-menu-heading h2 {
    margin: 0;
    font-size: 1.3rem;
}

.main-menu-heading .muted {
    margin: 5px 0 0;
    font-size: 0.9rem;
}

.main-menu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.main-menu-grid .menu-card {
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    grid-template-rows: auto auto;
    min-height: 122px;
    gap: 3px 12px;
    align-content: center;
    padding: 17px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.main-menu-grid .menu-card::after {
    content: "\f054";
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    color: #94a3b8;
    font-family: "Font Awesome 6 Free";
    font-size: 0.78rem;
    font-weight: 900;
}

.main-menu-grid .menu-card:hover {
    transform: translateY(-3px);
    border-color: #60a5fa;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.main-menu-grid .menu-card > i {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1 / 3;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 1.12rem;
}

.main-menu-grid .menu-card:nth-child(even) > i {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.main-menu-grid .menu-card strong {
    grid-column: 2;
    grid-row: 1;
    padding-right: 4px;
    font-size: 0.98rem;
}

.main-menu-grid .menu-card > span:not(.menu-card-badge) {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.82rem;
    line-height: 1.35;
}

.main-menu-grid .notification-menu-card.has-notifications > i {
    background: #fff7ed;
    color: #f59e0b;
}

.main-menu-grid .menu-card-badge {
    z-index: 1;
}

@media (max-width: 960px) {
    .main-menu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .main-menu-heading {
        margin-bottom: 12px;
    }

    .main-menu-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .main-menu-grid .menu-card {
        min-height: 102px;
        padding: 14px;
    }
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

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

.schedule-mode-fieldset {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.schedule-mode-fieldset legend {
    padding: 0 6px;
    color: var(--text);
    font-weight: 800;
}

.schedule-day-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.schedule-day-options label {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    cursor: pointer;
}

.schedule-day-options input {
    width: auto;
    margin: 0;
}

.schedule-mode-panel[hidden] {
    display: none;
}

.dynamic-date-list {
    display: grid;
    gap: 10px;
}

.dynamic-date-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.add-date-button {
    margin-top: 10px;
}

.stacked-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.employee-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 1080px;
}

.employee-form-grid > input[type="hidden"] {
    display: none;
}

.employee-form-field {
    min-width: 0;
}

.employee-form-field label {
    margin-bottom: 6px;
}

.employee-form-tad-fields {
    display: contents;
}

.employee-form-tad-fields[hidden] {
    display: none;
}

.employee-form-grid .vendor-work-unit-field,
.employee-form-submit {
    grid-column: 1 / -1;
}

.employee-form-submit {
    width: fit-content;
    min-width: 180px;
}

.tad-detail-fieldset {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.tad-detail-fieldset[hidden],
.vendor-work-unit-field[hidden] {
    display: none;
}

.tad-detail-fieldset legend {
    padding: 0 6px;
    font-weight: 800;
}

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

.tad-detail-grid > div {
    min-width: 0;
}

.tad-detail-grid label {
    display: block;
    margin-bottom: 6px;
}

.vendor-work-unit-field > label {
    margin-bottom: 6px;
}

.vendor-work-unit-dropdown {
    position: relative;
    max-width: 720px;
}

.vendor-work-unit-dropdown summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 18px;
    gap: 10px;
    align-items: center;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 12px 5px 7px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vendor-work-unit-dropdown summary::-webkit-details-marker {
    display: none;
}

.vendor-work-unit-dropdown summary:hover,
.vendor-work-unit-dropdown[open] summary {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.vendor-work-unit-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    background: #dbeafe;
    color: #2563eb;
}

.vendor-work-unit-summary {
    min-width: 0;
    overflow: hidden;
    color: #334155;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-work-unit-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    padding: 0 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
}

.vendor-work-unit-count:empty {
    display: none;
}

.vendor-work-unit-chevron {
    color: #64748b;
    font-size: 0.78rem;
    transition: transform 0.15s ease;
}

.vendor-work-unit-dropdown[open] .vendor-work-unit-chevron {
    transform: rotate(180deg);
}

.vendor-work-unit-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    left: 0;
    width: min(100%, 720px);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.vendor-work-unit-panel > p {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.4;
}

.vendor-work-unit-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
}

.vendor-work-unit-options label {
    display: flex;
    gap: 9px;
    align-items: center;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.vendor-work-unit-options label:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.vendor-work-unit-options label:has(input:checked) {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1d4ed8;
}

.vendor-work-unit-options input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: #2563eb;
}

.vendor-work-unit-options span {
    overflow-wrap: anywhere;
}

.office-location-intro {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.office-location-intro h2,
.office-location-intro p {
    margin: 0;
}

.office-location-intro p {
    margin-top: 5px;
}

.office-location-filter {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto auto;
    gap: 8px;
    align-items: end;
}

.office-location-filter.has-unit-filter {
    grid-template-columns: minmax(180px, 240px) minmax(220px, 320px) auto auto;
}

.office-location-filter > div {
    min-width: 0;
}

.office-location-filter label {
    margin-bottom: 6px;
}

.office-location-filter button {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.office-location-count {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.office-location-count > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2563eb;
    font-size: 1.1rem;
}

.office-location-count div {
    display: grid;
}

.office-location-count strong {
    color: var(--text);
    font-size: 1.2rem;
}

.office-location-count small {
    color: var(--muted);
}

.office-location-table {
    min-width: 1120px;
}

.office-location-table th:nth-child(1) {
    width: 18%;
}

.office-location-table th:nth-child(2) {
    width: 19%;
}

.office-location-table th:nth-child(3) {
    width: 24%;
}

.office-location-table th:nth-child(4) {
    width: 32%;
}

.office-location-table th:nth-child(5) {
    width: 70px;
}

.office-location-table td {
    vertical-align: middle;
}

.office-location-fixed {
    display: block;
    color: #334155;
    font-weight: 700;
}

.office-location-table .badge {
    display: inline-block;
    margin-top: 6px;
}

.office-location-point-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 7px;
}

.office-map-link,
.office-location-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 8px;
    padding: 0;
}

.office-map-link {
    background: #e0f2fe;
    color: #0369a1;
    text-decoration: none;
}

.office-map-link:hover {
    background: #bae6fd;
}

.office-location-save {
    background: #16a34a;
}

.office-location-save:hover {
    background: #15803d;
}

.ticket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.ticket-form-grid > input[type="hidden"] {
    display: none;
}

.ticket-form-grid > div {
    display: grid;
    gap: 7px;
    align-content: start;
}

.ticket-form-grid .field-span-2 {
    grid-column: 1 / -1;
}

.ticket-form-grid small,
.ticket-detail-grid span {
    color: var(--muted);
    line-height: 1.4;
}

.ticket-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(280px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
}

.ticket-filter-form > div {
    display: grid;
    gap: 7px;
}

.ticket-order-table,
.ticket-vendor-table {
    min-width: 1180px;
}

.ticket-passenger-input-table {
    min-width: 760px;
}

.ticket-passenger-input-table th,
.ticket-passenger-input-table td {
    padding: 9px 7px;
}

.ticket-passenger-input-table input {
    min-width: 560px;
}

.ticket-passenger-input-table th:last-child,
.ticket-passenger-input-table td:last-child {
    width: 130px;
}

.ticket-passenger-input-table td:last-child button {
    width: 100%;
}

.ticket-passenger-list-table {
    min-width: 1100px;
}

.ticket-passenger-master-table {
    min-width: 1520px;
}

.ticket-passenger-master-table th,
.ticket-passenger-master-table td {
    padding: 9px 7px;
}

.ticket-passenger-master-table input {
    min-width: 150px;
}

.ticket-passenger-master-table td:nth-child(1) input,
.ticket-passenger-master-table td:nth-child(5) input {
    min-width: 205px;
}

.ticket-master-submit {
    align-self: end;
}

.ticket-passenger-section {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.ticket-passenger-section > .section-heading {
    margin-bottom: 0;
}

.ticket-attachment-section {
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.ticket-attachment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.ticket-attachment-grid > div {
    display: grid;
    gap: 7px;
}

.ticket-document-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ticket-order-table {
    min-width: 1450px;
}

.ticket-order-table td:nth-child(7) a {
    display: block;
    margin-bottom: 6px;
}

.ticket-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.ticket-detail-grid > div {
    padding: 15px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fbfdff;
}

.ticket-detail-grid > div:nth-child(2n) {
    border-right: 0;
}

.ticket-detail-grid dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ticket-detail-grid dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ticket-detail-grid dd span {
    display: block;
    margin-top: 4px;
    font-weight: 400;
}

.ticket-submit-row {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center !important;
}

.ticket-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ticket-action-group form {
    margin: 0;
}

[data-return-flight-field][hidden] {
    display: none;
}

.facility-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    column-gap: 36px;
    row-gap: 18px;
}

.facility-form-grid > input[type="hidden"] {
    display: none;
}

.facility-form-grid .field-span-2 {
    grid-column: span 2;
}

.facility-form-grid .field-span-3 {
    grid-column: 1 / -1;
}

.facility-form-grid .field-col-1 {
    grid-column: 1;
}

.facility-form-grid .field-col-2 {
    grid-column: 2;
}

.facility-form-grid .field-col-3 {
    grid-column: 3;
}

.facility-form-grid .field-group {
    display: grid;
    gap: 8px;
}

.facility-form-grid button[type="submit"] {
    justify-self: start;
}

@media (max-width: 1100px) {
    .facility-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 18px;
    }

    .facility-form-grid .field-col-1,
    .facility-form-grid .field-col-2,
    .facility-form-grid .field-col-3 {
        grid-column: auto;
    }
}

.button-row,
.status-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.schedule-xlsx-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

.schedule-xlsx-actions .button-link {
    cursor: pointer;
}

.status-actions button {
    background: #e0f2fe;
    color: #075985;
}

.status-actions button:hover {
    background: #bae6fd;
}

.alert {
    border-radius: 8px;
    padding: 13px 16px;
    margin-bottom: 14px;
    font-weight: 700;
}

.alert.success {
    background: var(--success-bg);
    color: var(--success-text);
}

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

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

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

.table-filter {
    margin: 12px 0 16px;
}

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

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

th {
    color: #475569;
    background: #f1f7f8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:hover {
    background: #f7fbfb;
}

td span,
.employee-card span,
.employee-card small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.badge {
    display: inline-block;
    width: auto;
    border-radius: 999px;
    background: #e0ecff;
    color: #1d4ed8;
    padding: 5px 10px;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge.status-process {
    background: #ffedd5;
    color: #c2410c;
}

.badge.status-used {
    background: #dcfce7;
    color: #15803d;
}

.badge.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.status-icon-cell {
    text-align: center;
    vertical-align: middle;
}

/* ==========================================
   TOGGLE STATUS DOKTER DAN FASKES
========================================== */

.status-toggle-form {
    display: inline;
    margin: 0;
}

.status-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: #ffffff;
    cursor: pointer;
    transition: .2s;
}

.status-toggle-button:hover {
    transform: translateY(-1px);
}

.status-toggle-button.active {
    background: #16a34a;
}

.status-toggle-button.active:hover {
    background: #15803d;
}

.status-toggle-button.inactive {
    background: #dc2626;
}

.status-toggle-button.inactive:hover {
    background: #b91c1c;
}

.status-toggle-button i {
    color: #ffffff;
    font-size: 18px;
}

.badge.status-pending {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge.status-yellow {
    background: #fef3c7;
    color: #a16207;
}

.badge.shift-badge {
    border: 1px solid transparent;
    font-weight: 800;
}

.badge.shift-code-1 {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.badge.shift-code-2 {
    background: #dcfce7;
    border-color: #86efac;
    color: #15803d;
}

.badge.shift-code-3 {
    background: #f3e8ff;
    border-color: #d8b4fe;
    color: #7e22ce;
}

.badge.shift-code-4 {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.badge.shift-code-libur {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.vehicle-request-table {
    min-width: 1120px;
}

.vehicle-approval-table {
    min-width: 1180px;
    table-layout: fixed;
}

.vehicle-approval-table th:nth-child(1) {
    width: 13%;
}

.vehicle-approval-table th:nth-child(2) {
    width: 23%;
}

.vehicle-approval-table th:nth-child(3) {
    width: 21%;
}

.vehicle-approval-table th:nth-child(4) {
    width: 9%;
}

.vehicle-approval-table th:nth-child(5) {
    width: 25%;
}

.vehicle-approval-table th:nth-child(6) {
    width: 9%;
}

.vehicle-approval-table .vehicle-status-actions {
    flex-wrap: nowrap;
}

.vehicle-time-fields,
.vehicle-purpose-fields {
    vertical-align: top;
}

.vehicle-time-fields input,
.vehicle-purpose-fields input {
    display: block;
    width: 100%;
    margin-bottom: 7px;
}

.managed-vehicle-table {
    min-width: 1050px;
}

.managed-vehicle-table th:first-child {
    width: 17%;
}

.managed-vehicle-table th:nth-child(2) {
    width: 24%;
}

.managed-vehicle-table th:nth-child(3) {
    width: 24%;
}

.managed-vehicle-table th:nth-child(4) {
    width: 25%;
}

.vehicle-status-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.compact-status-save {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) 40px;
    gap: 7px;
    align-items: center;
}

.vehicle-status-actions .icon-button {
    min-width: 38px;
}

.status-process-button {
    background: #f97316;
}

.status-used-button {
    background: #16a34a;
}

.status-rejected-button {
    background: #dc2626;
}

.overtime-list-table {
    min-width: 1000px;
}

.overtime-list-table th:first-child {
    width: 24%;
}

.overtime-list-table th:nth-child(2) {
    width: 22%;
}

.overtime-list-table th:nth-child(3) {
    width: 17%;
}

.overtime-list-table th:nth-child(4) {
    width: 29%;
}

.overtime-list-table td {
    vertical-align: top;
}

.overtime-detail-cell strong,
.overtime-detail-cell span,
.overtime-verification-cell > input,
.overtime-verification-cell > details {
    display: block;
}

.overtime-detail-cell strong,
.overtime-detail-cell span,
.overtime-verification-cell > input {
    margin-bottom: 7px;
}

.overtime-verification-cell > input {
    width: 100%;
}

.overtime-note-cell textarea {
    width: 100%;
    min-width: 280px;
    min-height: 78px;
    resize: vertical;
}

.day-type-badge {
    display: inline-block;
    width: max-content;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.75rem;
    font-weight: 800;
}

.day-type-badge.workday {
    background: #dbeafe;
    color: #1d4ed8;
}

.day-type-badge.holiday {
    background: #fef3c7;
    color: #a16207;
}

.overtime-report-table {
    min-width: 1050px;
}

.overtime-report-detail strong,
.overtime-report-detail span {
    display: block;
    margin-bottom: 5px;
}

.attendance-request-history-table th:nth-child(4),
.attendance-request-history-table td:nth-child(4) {
    width: 34%;
    min-width: 260px;
}

.attendance-request-history-table th:nth-child(5),
.attendance-request-history-table td:nth-child(5) {
    width: 130px;
    white-space: nowrap;
}

.status-icon-menu {
    position: relative;
    width: max-content;
}

.status-icon-menu summary {
    list-style: none;
    cursor: pointer;
}

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

.status-icon-menu > div {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    gap: 6px;
    min-width: 150px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.status-menu-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 9px 10px;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
}

.status-menu-option span {
    margin: 0;
    color: inherit;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
    color: var(--muted);
}

.pagination-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-links a {
    min-width: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--text);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.pagination-links a.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    color: var(--muted);
    font-weight: 800;
}

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.employee-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdff;
}

.vehicle-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdff;
}

.vehicle-card.inactive {
    opacity: 0.62;
}

.vehicle-card span {
    color: var(--muted);
}

.vehicle-schedule-filter {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(170px, 0.45fr) auto;
    gap: 14px;
    align-items: end;
    margin: 18px 0;
}

.vehicle-schedule-filter > div {
    display: grid;
    gap: 7px;
}

.vehicle-schedule-table {
    max-width: 760px;
}

.vehicle-schedule-table th,
.vehicle-schedule-table td {
    text-align: center;
}

.vehicle-schedule-table td:nth-child(2),
.vehicle-schedule-table td:nth-child(4) {
    font-weight: 700;
    color: #1d4ed8;
}

.employee-card > div {
    min-width: 180px;
    flex: 1;
}

.mini-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
}

.approval-compact-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 40px 40px;
    gap: 8px;
    align-items: center;
    min-width: 330px;
}

.approval-compact-form .icon-button {
    width: 40px;
    min-width: 40px;
}

.overtime-request-table {
    min-width: 980px;
    table-layout: fixed;
}

.overtime-request-table .activity-column {
    width: 38%;
}

.overtime-request-table .approval-column {
    width: 260px;
}

.overtime-request-table .approval-column .mini-form {
    grid-template-columns: 1fr;
}

.overtime-request-table .approval-column input,
.overtime-request-table .approval-column select,
.overtime-request-table .approval-column button {
    width: 100%;
}

.inline-update-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    align-items: center;
}

.capture-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
    gap: 14px;
}

.capture-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfdff;
}

.capture-box h3 {
    margin: 0 0 10px;
}

.camera-preview,
.photo-preview {
    display: block;
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    background: #0f172a;
    object-fit: cover;
    margin-bottom: 12px;
}

.camera-preview[hidden],
.photo-preview[hidden] {
    display: none !important;
}

.verification-status {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
}

.verification-status.is-success {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.verification-status.is-error {
    color: #9d174d;
    background: #fce7f3;
    border-color: #f9a8d4;
}

.verification-status.is-pending {
    color: #334155;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.capture-grid.single-capture {
    grid-template-columns: minmax(280px, 680px);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    border-top: 6px solid var(--primary);
    background: #edf5f7;
}

.login-shell {
    width: min(430px, 100%);
}

.login-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(217, 225, 238, 0.88);
    border-radius: 8px;
    padding: clamp(24px, 5vw, 34px);
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 24px 60px rgba(16, 73, 96, 0.14);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: var(--primary);
}

.login-card .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0 10px;
    background: #eff6ff;
    color: #1d4ed8;
    letter-spacing: 0;
    font-size: 0.78rem;
}

.login-card h1 {
    margin: 0 0 20px;
    color: #101827;
    font-size: clamp(1.9rem, 6vw, 2.35rem);
    line-height: 1.05;
}

.login-card .stacked-form {
    gap: 10px;
    margin-top: 0;
}

.login-card label {
    color: #334155;
    font-size: 0.92rem;
    font-weight: 800;
}

.login-card input {
    min-height: 48px;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #172033;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-card input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.login-card button[type="submit"] {
    min-height: 50px;
    margin-top: 6px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.22);
}

.login-card button[type="submit"]:hover {
    background: var(--accent-dark);
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    background: #eaf1fb;
    color: #1d4ed8;
    outline: none;
}

.password-eye {
    position: relative;
    display: block;
    width: 20px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 999px / 720px;
    transform: rotate(-4deg);
}

.password-eye::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.password-toggle.is-visible .password-eye::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 2px;
    height: 25px;
    border-radius: 999px;
    background: currentColor;
    transform: translateX(-50%) rotate(45deg);
}

.captcha-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.captcha-box img {
    width: 180px;
    height: 58px;
    max-width: 100%;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    background: #ffffff;
    object-fit: cover;
}

.captcha-box input {
    grid-column: 1 / -1;
}

.captcha-refresh-button {
    min-height: 48px;
    border: 1px solid #d7e0ec;
    border-radius: 8px;
    padding: 0 14px;
    background: #f8fafc;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.captcha-refresh-button:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.login-help {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e5edf7;
    color: var(--muted);
    font-size: 0.92rem;
    text-align: center;
}

.biometric-login-button {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border: 1px solid #0f9f7f;
    border-radius: 8px;
    background: #e3f7f1;
    color: #0b745f;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.biometric-login-button:hover,
.biometric-login-button:focus-visible {
    background: #0f9f7f;
    color: #ffffff;
    transform: translateY(-1px);
}

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

    .captcha-box {
        grid-template-columns: 1fr;
    }

    .captcha-box img {
        width: 100%;
    }
}

.employee-summary {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.attendance-form {
    max-width: 680px;
}

.employee-card.inactive {
    opacity: 0.62;
}

.link-button {
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--primary);
}

.link-button:hover {
    background: transparent;
    color: var(--primary-dark);
    transform: none;
}

@media (max-width: 900px) {
    .app-header,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .app-header {
        display: grid;
    }

    .vendor-unit-selector {
        width: min(190px, calc(100vw - 190px));
    }

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

    .attendance-summary-row {
        display: grid;
    }

    .compact-month-panel,
    .attendance-summary-panel {
        width: 100%;
    }

    .report-month-filter {
        grid-template-columns: 64px 1fr;
    }

    .report-month-filter button {
        grid-column: 1 / -1;
    }

    .report-filter-form {
        flex-wrap: wrap;
    }

    .report-filter-field,
    .report-filter-field.report-filter-search {
        flex-basis: calc(50% - 6px);
    }

    .employee-summary,
    .inline-fields,
    .facility-form-grid,
    .vehicle-schedule-filter,
    .mini-form,
    .approval-compact-form,
    .compact-status-save,
    .inline-update-form,
    .capture-grid {
        grid-template-columns: 1fr;
    }

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

    .office-location-intro {
        display: grid;
    }

    .ticket-form-grid,
    .ticket-filter-form,
    .ticket-attachment-grid,
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

    .ticket-form-grid .field-span-2 {
        grid-column: 1;
    }

    .ticket-detail-grid > div,
    .ticket-detail-grid > div:nth-child(2n) {
        border-right: 0;
    }

    .facility-form-grid .field-span-2,
    .facility-form-grid .field-span-3 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .report-filter-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .report-filter-field,
    .report-filter-field.report-filter-search,
    .report-filter-form > button {
        width: 100%;
    }

    .global-nav-button {
        width: 36px;
        height: 36px;
    }

    .container {
        width: min(100% - 20px, 1180px);
        margin-top: 16px;
    }

    .panel {
        padding: 16px;
    }

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

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

    .vendor-work-unit-options {
        grid-template-columns: 1fr;
    }

    .office-location-filter {
        grid-template-columns: 1fr;
    }

    .office-location-filter.has-unit-filter {
        grid-template-columns: 1fr;
    }

    .date-filter,
    .button-row,
    .status-actions {
        align-items: stretch;
    }

    .date-filter button,
    .button-row button,
    .status-actions button {
        width: 100%;
    }
}

/* PGS */
.pgs-form-panel {
    max-width: 1120px;
    margin-inline: auto;
}

.pgs-form {
    gap: 20px;
}

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

.pgs-form-fields > div {
    min-width: 0;
}

.pgs-calendar {
    max-width: 620px;
    padding: 16px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
}

.pgs-calendar-toolbar,
.pgs-calendar-weekdays,
.pgs-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.pgs-calendar-toolbar {
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    margin-bottom: 14px;
    text-align: center;
}

.pgs-calendar-weekdays {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.pgs-calendar-day {
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    background: #fff;
    color: #172033;
}

.pgs-calendar-day:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.pgs-calendar-day.today {
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.pgs-calendar-day.selected {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.pgs-selected-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    margin-top: 16px;
}

.pgs-selected-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
}

.pgs-table td > span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.pgs-date-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 190px;
}

.pgs-date-list span {
    padding: 4px 7px;
    border-radius: 5px;
    background: #f1f5f9;
    white-space: nowrap;
}

.pgs-approval-actions {
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.badge.pgs-status-proses {
    background: #ffedd5;
    color: #c2410c;
}

.badge.pgs-status-verif {
    background: #dcfce7;
    color: #15803d;
}

.badge.pgs-status-tolak {
    background: #fee2e2;
    color: #b91c1c;
}

.pgs-report-filter {
    justify-content: flex-start;
}

.pgs-report-filter input,
.pgs-report-filter select,
.pgs-report-filter button {
    width: auto;
    min-width: 150px;
}

.pgs-report-summary {
    max-width: 620px;
    margin-inline: auto;
    padding: 10px;
    overflow-x: auto;
}

.pgs-report-summary table {
    min-width: 420px;
    margin: 0 auto;
}

.pgs-report-summary td {
    width: 33.333%;
    padding: 10px 18px;
    color: #64748b;
    text-align: center;
}

.pgs-report-summary strong {
    display: block;
    margin-top: 3px;
    color: #172033;
    font-size: 22px;
}

@media (max-width: 720px) {
    .pgs-form-fields {
        grid-template-columns: 1fr;
    }

    .pgs-calendar {
        padding: 12px;
    }

    .pgs-calendar-day {
        height: 38px;
    }
}

@media (max-width: 760px) {
    .schedule-entry-grid {
        grid-template-columns: 1fr;
    }

    .schedule-filter-form {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .schedule-filter-form input[type="month"] {
        width: 130px;
    }
}

/* Modern blue-green application theme */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 159, 127, 0.12);
}

.panel {
    border-top-color: #b8d9e1;
}

.panel > h2:first-child,
.section-heading h2 {
    color: #123b5d;
}

.summary-grid article:nth-child(odd) {
    border-top: 3px solid #78aee7;
}

.summary-grid article:nth-child(even) {
    border-top: 3px solid #5bc5ae;
}

.button-link:hover,
button:hover {
    box-shadow: 0 8px 18px rgba(23, 105, 210, 0.16);
}

.badge:not(.status-process):not(.status-rejected) {
    border: 1px solid #b7d8e5;
}

/* Form perjalanan dinas */
.trip-request-layout {
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.trip-request-calendar,
.trip-request-details {
    min-width: 0;
}

.trip-request-calendar > label,
.trip-request-details > label {
    display: block;
    margin-bottom: 8px;
}

.trip-request-details {
    display: grid;
    gap: 10px;
}

.trip-request-calendar .date-checklist-calendar {
    width: 100%;
    padding: 12px;
}

.trip-request-calendar .date-checklist-toolbar {
    margin-bottom: 10px;
}

.trip-request-calendar .date-checklist-days,
.trip-request-calendar .date-checklist-weekdays {
    gap: 4px;
}

.trip-request-calendar .date-checklist-day {
    height: 34px;
    font-size: 13px;
}

.trip-request-calendar .date-checklist-selected {
    margin-top: 10px;
}

.trip-request-details textarea {
    min-height: 126px;
    resize: vertical;
}

@media (max-width: 900px) {
    .trip-request-layout {
        grid-template-columns: 1fr;
    }

    .trip-request-calendar {
        max-width: 520px;
    }
}

/* Form pengajuan izin, sakit, dan cuti */
.permission-request-layout {
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.permission-request-calendar,
.permission-request-details {
    min-width: 0;
}

.permission-request-calendar > label,
.permission-request-details > label {
    display: block;
    margin-bottom: 8px;
}

.permission-request-calendar .date-checklist-calendar {
    width: 100%;
    padding: 12px;
}

.permission-request-calendar .date-checklist-toolbar {
    margin-bottom: 10px;
}

.permission-request-calendar .date-checklist-days,
.permission-request-calendar .date-checklist-weekdays {
    gap: 4px;
}

.permission-request-calendar .date-checklist-day {
    height: 34px;
    font-size: 13px;
}

.permission-request-calendar .date-checklist-selected {
    margin-top: 10px;
}

.permission-request-details {
    display: grid;
    gap: 10px;
}

.permission-request-details textarea {
    min-height: 132px;
    resize: vertical;
}

.permission-request-details button[type="submit"] {
    margin-top: 4px;
}

@media (max-width: 900px) {
    .permission-request-layout {
        grid-template-columns: 1fr;
    }

    .permission-request-calendar {
        max-width: 520px;
    }
}

/* Form pengajuan lembur */
.overtime-request-layout {
    display: grid;
    grid-template-columns: minmax(330px, 390px) minmax(420px, 1fr);
    align-items: start;
    gap: 24px;
}

.overtime-request-calendar,
.overtime-request-details {
    min-width: 0;
}

.overtime-request-calendar > label,
.overtime-request-details > label {
    display: block;
    margin-bottom: 8px;
}

.overtime-request-calendar .date-checklist-calendar {
    width: 100%;
    padding: 12px;
}

.overtime-request-calendar .date-checklist-toolbar {
    margin-bottom: 10px;
}

.overtime-request-calendar .date-checklist-days,
.overtime-request-calendar .date-checklist-weekdays {
    gap: 4px;
}

.overtime-request-calendar .date-checklist-day {
    height: 34px;
    font-size: 13px;
}

.overtime-request-calendar .date-checklist-selected {
    margin-top: 10px;
}

.overtime-request-details {
    display: grid;
    gap: 10px;
}

.overtime-request-details textarea {
    width: 100%;
    min-height: 132px;
    resize: vertical;
}

.overtime-request-details button[type="submit"] {
    margin-top: 4px;
}

@media (max-width: 900px) {
    .overtime-request-layout {
        grid-template-columns: 1fr;
    }

    .overtime-request-calendar {
        max-width: 520px;
    }
}

/* Kalender ceklist tanggal */
.shift-leave-layout {
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.shift-leave-calendar,
.shift-leave-details {
    min-width: 0;
}

.shift-leave-calendar > label,
.shift-leave-details > label {
    display: block;
    margin-bottom: 8px;
}

.shift-leave-calendar .date-checklist-calendar {
    width: 100%;
    padding: 12px;
}

.shift-leave-calendar .date-checklist-days,
.shift-leave-calendar .date-checklist-weekdays {
    gap: 4px;
}

.shift-leave-calendar .date-checklist-day {
    height: 34px;
    font-size: 13px;
}

.shift-leave-details {
    display: grid;
    gap: 10px;
}

.shift-leave-details .muted {
    margin: -2px 0 8px;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .shift-leave-layout {
        grid-template-columns: 1fr;
    }

    .shift-leave-calendar {
        max-width: 520px;
    }
}

.date-checklist-calendar {
    width: min(100%, 620px);
    padding: 16px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
}

.schedule-employee-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 12px 14px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #f8fafc;
}

.schedule-employee-summary span {
    color: #64748b;
}

.schedule-filter-form {
    display: grid;
    width: min(100%, 420px);
    grid-template-columns: 1fr;
    gap: 8px;
}

.schedule-filter-form label {
    width: auto;
}

.schedule-filter-form input[type="month"] {
    width: 130px;
}

.schedule-entry-grid {
    display: grid;
    grid-template-columns: minmax(250px, 360px) minmax(220px, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 18px;
}

.schedule-entry-grid-four {
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.schedule-main-control-column {
    min-width: 0;
}

.schedule-shift-column {
    min-width: 0;
}

.schedule-shift-column > label {
    display: block;
    margin-bottom: 8px;
}

.schedule-calendar-form {
    display: grid;
    gap: 10px;
}

.schedule-calendar-column .date-checklist-calendar {
    width: min(100%, 360px);
    padding: 10px;
}

.schedule-calendar-column .date-checklist-day {
    height: 34px;
    font-size: 12px;
}

.schedule-calendar-column .date-checklist-selected {
    display: none;
}

.schedule-control-column {
    display: grid;
    gap: 10px;
    align-content: start;
    align-self: start;
}

.schedule-control-column button {
    width: fit-content;
}

.schedule-shift-date-list {
    display: grid;
    gap: 8px;
}

.schedule-shift-date-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.schedule-shift-date-row span {
    color: #475569;
    font-size: 13px;
    white-space: nowrap;
}

.schedule-shift-dropdown {
    position: relative;
    min-width: 0;
}

.schedule-shift-dropdown-button {
    width: 100%;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.schedule-shift-dropdown-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-shift-dropdown.has-selection .schedule-shift-dropdown-button {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
}

.schedule-shift-dropdown.has-libur-selection .schedule-shift-dropdown-button {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.schedule-shift-dropdown-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    width: min(280px, 90vw);
    max-height: 230px;
    overflow-y: auto;
    display: grid;
    gap: 4px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .18);
}

.schedule-shift-dropdown-panel[hidden] {
    display: none;
}

.schedule-shift-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    border-radius: 7px;
    padding: 7px 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.schedule-shift-dropdown-option:hover {
    background: #f1f5f9;
}

.schedule-shift-dropdown-option input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.date-checklist-day.selected.date-shift-code-1 {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #fff;
}

.date-checklist-day.selected.date-shift-code-2 {
    background: #16a34a;
    border-color: #15803d;
    color: #fff;
}

.date-checklist-day.selected.date-shift-code-3 {
    background: #9333ea;
    border-color: #7e22ce;
    color: #fff;
}

.date-checklist-day.selected.date-shift-code-4 {
    background: #ea580c;
    border-color: #c2410c;
    color: #fff;
}

.date-checklist-day.selected.date-shift-code-libur {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

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

.schedule-month-table {
    min-width: 980px;
}

.schedule-month-table th,
.schedule-month-table td {
    min-width: 42px;
    padding: 8px 6px;
    text-align: center;
    white-space: nowrap;
}

.schedule-month-table th:first-child,
.schedule-month-table td:first-child {
    min-width: 130px;
    width: 130px;
    text-align: left;
}

.schedule-month-table th:nth-child(2),
.schedule-month-table td:nth-child(2) {
    min-width: 42px;
    width: 42px;
    text-align: center;
}

.date-checklist-toolbar,
.date-checklist-weekdays,
.date-checklist-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.date-checklist-toolbar {
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    margin-bottom: 14px;
    text-align: center;
}

.date-checklist-weekdays {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.date-checklist-day {
    min-width: 0;
    height: 42px;
    padding: 0;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    background: #fff;
    color: #172033;
}

.date-checklist-day:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.date-checklist-day.today {
    box-shadow: inset 0 0 0 2px #93c5fd;
}

.date-checklist-day.selected {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.date-checklist-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 38px;
    margin-top: 16px;
}

.date-checklist-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 13px;
}

@media (max-width: 720px) {
    .date-checklist-calendar {
        padding: 12px;
    }

    .date-checklist-day {
        height: 38px;
    }
}

.compact-grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
}

.compact-grid-form > button {
    align-self: end;
}

.compact-grid-form .span-2 {
    grid-column: 1 / -1;
}

.inline-action-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 44px 44px;
    gap: 8px;
    align-items: center;
}

.inline-action-form input[type="text"] {
    min-width: 0;
}

.inline-action-form .icon-button {
    width: 44px;
    height: 44px;
    padding: 0;
}

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

    .inline-action-form {
        grid-template-columns: 1fr 44px 44px;
    }
}
