:root {
    --bg: #eef3f8;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --ink: #111827;
    --muted: #667085;
    --line: #d8e0ea;
    --blue: #00abbc;
    --blue-soft: #dff8fb;
    --green: #15803d;
    --green-soft: #dcfce7;
    --red: #c2410c;
    --red-soft: #ffedd5;
    --amber: #b7791f;
    --amber-soft: #fef3c7;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(0, 171, 188, 0.12), transparent 28rem),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 42%, #edf2f7 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

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

.login-card {
    display: grid;
    gap: 18px;
    padding: 30px;
}

.login-card h1 {
    font-size: 32px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 24px;
    min-height: 76px;
    padding: 14px 5vw;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(216, 224, 234, 0.9);
    backdrop-filter: blur(18px);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #00abbc, #007985);
    box-shadow: var(--shadow-soft);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark img,
.image-avatar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.brand-mark.has-image {
    overflow: hidden;
    padding: 0;
    color: transparent;
    background: #fff;
}

.mobile-user-title {
    display: none;
}

.user-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 10px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border-bottom: 0;
    font-size: 14px;
    font-weight: 700;
}

.user-avatar {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: #007985;
}

.user-avatar.image-avatar {
    display: block;
    border: 1px solid rgba(216, 224, 234, 0.95);
    background: #fff;
}

.role-pill {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 12px;
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.1;
}

h2 {
    font-size: 18px;
    line-height: 1.2;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border:0px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    gap: 8px;
}

.nav-tabs a,
.nav-dropbtn,
.quick-actions a,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: #344054;
    background: transparent;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-tabs a:hover,
.nav-dropbtn:hover,
.quick-actions a:hover,
.button:hover {
    border-color: var(--line);
    background: var(--panel-soft);
}

.nav-tabs a.active,
.nav-dropdown.active > .nav-dropbtn,
.button.primary {
    color: #fff;
    border-color: var(--blue);
    background: var(--blue);
}

.nav-dropdown {
    position: relative;
}

.nav-dropbtn {
    font: inherit;
}

.nav-dropbtn::after {
    content: "▾";
    margin-left: 8px;
    font-size: 12px;
    line-height: 1;
}

.nav-dropdown.open > .nav-dropbtn::after {
    content: "▴";
}

.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.nav-menu a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.nav-dropdown.open .nav-menu {
    display: grid;
    gap: 4px;
}

.button.primary:hover {
    background: #007985;
}

.page-shell {
    width: min(1200px, 92vw);
    margin: 28px auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card,
.panel {
    border: 1px solid rgba(216, 224, 234, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 20px;
    border-left-width: 4px;
}

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

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 34px;
    line-height: 1;
}

.accent-blue {
    border-left-color: var(--blue);
}

.accent-green {
    border-left-color: var(--green);
}

.accent-red {
    border-left-color: var(--red);
}

.accent-amber {
    border-left-color: var(--amber);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.align-start {
    align-items: start;
}

.wide-panel {
    min-width: 0;
}

.panel {
    padding: 22px;
    margin-bottom: 16px;
}

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

.progress-track {
    height: 10px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.progress-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--green), #007985);
}

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

.quick-actions a,
.button {
    border-color: var(--line);
    background: #fff;
}

.text-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.report-table-wrap {
    border-width: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.report-panel-note {
    margin: -4px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: 0;
}

th {
    color: var(--muted);
    background: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-table {
    border-collapse: separate;
    border-spacing: 0;
}

.report-table thead th {
    border-bottom: 0;
}

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

.attendance-report-panel {
    background:
        linear-gradient(135deg, rgba(0, 171, 188, 0.08), transparent 40%),
        #fff;
}

.attendance-table-wrap {
    border: 1px solid rgba(166, 234, 241, 0.95);
    background: #fff;
}

.attendance-report-table thead th {
    color: #e6fdff;
    background: linear-gradient(135deg, #00abbc, #008f9d);
}

.attendance-report-table tbody td {
    border-bottom-color: rgba(166, 234, 241, 0.7);
}

.attendance-report-table tbody tr:hover td {
    background: rgba(223, 248, 251, 0.42);
}

.leave-report-panel {
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(255, 251, 235, 0.92)),
        #fff;
}

.leave-report-grid {
    display: grid;
    gap: 16px;
}

.leave-report-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(187, 247, 208, 0.95);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.leave-report-notes {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.leave-report-notes p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    color: #0f172a;
    background: rgba(0, 171, 188, 0.08);
    font-size: 13px;
    line-height: 1.45;
}

.leave-report-card-head {
    display: grid;
    gap: 4px;
}

.leave-report-card-head strong {
    font-size: 16px;
}

.leave-report-card-head span {
    color: var(--muted);
    font-size: 13px;
}

.leave-report-metric-grid {
    display: grid;
    gap: 14px;
}

.leave-report-metric-grid-admin {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leave-report-metric-grid-employee {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.leave-report-metric {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 112px;
    padding: 14px 10px;
    border: 1px solid rgba(216, 224, 234, 0.9);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.leave-report-metric strong {
    color: #111827;
    font-size: 36px;
    line-height: 1;
}

.leave-report-metric span {
    margin-top: 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.pastel-blue {
    background: #dff8fb;
    border-color: #b8ecf2;
}

.pastel-yellow {
    background: #fff0c9;
    border-color: #edd39d;
}

.pastel-red {
    background: #ffd9dd;
    border-color: #eab1b8;
}

.pastel-lilac {
    background: #f4e2ff;
    border-color: #e4c4f6;
}

.pastel-green {
    background: #dff3e6;
    border-color: #c3e2ce;
}

.pastel-red-soft {
    background: #ffe6e7;
    border-color: #efc2c5;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.badge {
    display: inline-flex;
    min-width: 72px;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.present,
.badge.approved,
.badge.paid {
    color: var(--green);
    background: var(--green-soft);
}

.badge.absent,
.badge.rejected {
    color: #9a3412;
    background: var(--red-soft);
}

.badge.late,
.badge.half-day {
    color: #92400e;
    background: var(--amber-soft);
}

.badge.pending {
    color: #92400e;
    background: var(--amber-soft);
}

.badge.cancelled {
    color: #00abbc;
    background: rgba(0, 121, 133, 0.12);
}

.badge.due,
.badge.preview {
    color: #92400e;
    background: var(--amber-soft);
}

.metric-value {
    display: inline-flex;
    align-items: center;
    min-width: 34px;
    font-size: 18px;
    font-weight: 900;
}

.metric-green {
    color: var(--green);
}

.metric-red {
    color: #dc2626;
}

.metric-orange {
    color: #f59e0b;
}

.metric-blue {
    color: var(--blue);
}

.metric-neutral {
    color: #0f172a;
}

.metric-blue-soft {
    color: #00abbc;
    background: rgba(0, 121, 133, 0.1);
}

.metric-green-soft {
    color: #15803d;
    background: rgba(34, 197, 94, 0.1);
}

.metric-red-soft {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.attendance-calendar-mobile {
    display: none;
}

.attendance-day-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.calendar-date {
    display: grid;
    place-items: center;
    min-height: 82px;
    border-radius: 8px;
    color: #475467;
    background: #eef3f9;
    line-height: 1;
}

.calendar-date span,
.calendar-date small {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-date strong {
    font-size: 28px;
}

.attendance-day-card.present .calendar-date {
    color: var(--green);
    background: var(--green-soft);
}

.attendance-day-card.absent .calendar-date {
    color: #dc2626;
    background: #fee2e2;
}

.attendance-day-card.late .calendar-date,
.attendance-day-card.half-day .calendar-date {
    color: #b45309;
    background: var(--amber-soft);
}

.calendar-detail {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.calendar-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.calendar-topline strong {
    min-width: 0;
    font-size: 14px;
    line-height: 1.25;
}

.calendar-times {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.calendar-times span {
    padding: 8px;
    border-radius: 8px;
    color: #475467;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.holiday-note-row {
    grid-template-columns: 1fr;
}

.holiday-note-row span {
    text-align: left;
}

.form-panel label,
.toolbar-form label,
.report-filters label {
    display: grid;
    gap: 7px;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(0, 171, 188, 0.65);
    box-shadow: 0 0 0 4px rgba(0, 171, 188, 0.11);
}

input[type="date"],
input[type="month"],
input[type="time"] {
    cursor: pointer;
}

input[type="file"] {
    padding: 8px;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

.form-panel {
    display: grid;
    gap: 14px;
}

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

.employee-image-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.employee-image-preview img {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    object-fit: cover;
}

.leave-balance-panel {
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(0, 171, 188, 0.08), transparent 44%),
        #fff;
}

.leave-balance-panel-compact {
    padding: 14px;
}

.leave-balance-panel-compact .panel-heading {
    gap: 6px;
}

.leave-balance-panel-compact .panel-heading h2 {
    font-size: 18px;
}

.leave-balance-panel-compact .count-pill {
    padding: 6px 10px;
    font-size: 11px;
}

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

.leave-balance-card {
    position: relative;
    min-height: 132px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(216, 224, 234, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.leave-balance-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -28px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    opacity: 0.16;
    background: currentColor;
}

.leave-balance-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.leave-balance-card strong {
    display: block;
    margin-top: 18px;
    font-size: 42px;
    line-height: 1;
}

.leave-balance-panel-compact .leave-balance-grid {
    gap: 10px;
}

.leave-balance-panel-compact .leave-balance-card {
    min-height: 96px;
    padding: 12px 10px;
    border-radius: 12px;
}

.leave-balance-panel-compact .leave-balance-card::after {
    right: -18px;
    bottom: -22px;
    width: 72px;
    height: 72px;
    opacity: 0.12;
}

.leave-balance-panel-compact .leave-balance-card span {
    font-size: 10px;
    letter-spacing: 0;
}

.leave-balance-panel-compact .leave-balance-card strong {
    margin-top: 12px;
    font-size: 28px;
}

.balance-total {
    color: var(--blue);
    background: linear-gradient(180deg, #fff, #e8fbfd);
}

.balance-used {
    color: #b45309;
    background: linear-gradient(180deg, #fff, #fff7ed);
}

.balance-remaining {
    color: var(--green);
    background: linear-gradient(180deg, #fff, #ecfdf3);
}

.balance-empty {
    color: #dc2626;
    background: linear-gradient(180deg, #fff, #fef2f2);
}

.leave-apply-panel {
    max-width: 820px;
}

.holiday-dashboard-chips {
    margin-top: 14px;
}

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

.permission-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.permission-card input {
    width: auto;
    min-height: 0;
    margin: 0;
}

.salary-breakdown-card {
    overflow: hidden;
    border: 1px solid rgba(216, 224, 234, 0.95);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

.salary-breakdown-section {
    padding: 18px 18px 16px;
}

.salary-breakdown-section + .salary-breakdown-section {
    border-top: 12px solid #f4f6fb;
}

.salary-breakdown-list {
    display: grid;
    gap: 14px;
}

.salary-breakdown-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.salary-breakdown-row span {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.salary-breakdown-row strong {
    color: #00abbc;
    font-size: 15px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.salary-breakdown-divider {
    margin: 16px 0;
    border-top: 1px dashed #cbd5e1;
}

.total-row span,
.total-row strong {
    font-size: 16px;
    font-weight: 800;
}

.salary-breakdown-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.salary-breakdown-heading strong {
    font-size: 16px;
}

.salary-breakdown-heading-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #00abbc;
}

.salary-breakdown-heading-icon svg {
    width: 24px;
    height: 24px;
}

.deduction-row strong,
.deduction-total strong {
    color: #ef5b35;
}

.addition-row strong {
    color: #00abbc;
}

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

.meta-row strong {
    color: #111827;
}

.salary-breakdown-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    color: #fff;
    background: linear-gradient(135deg, #00abbc, #008f9d);
}

.salary-breakdown-footer span,
.salary-breakdown-footer strong {
    font-size: 18px;
    font-weight: 800;
}

.holiday-notice-panel {
    padding: 20px;
    border: 1px solid rgba(167, 243, 208, 0.95);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(220, 252, 231, 0.92), rgba(209, 250, 229, 0.86)),
        #fff;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.holiday-notice-panel .panel-heading {
    margin-bottom: 10px;
}

.holiday-notice-stack {
    display: grid;
    gap: 8px;
}

.holiday-notice-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 8px 0 0;
    border: 0;
    border-radius: 0;
    color: inherit;
    background: transparent;
    box-shadow: none;
    text-decoration: none;
}

.holiday-notice-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    color: #111827;
    background: rgba(0, 171, 188, 0.14);
    flex-shrink: 0;
}

.holiday-notice-icon svg {
    width: 28px;
    height: 28px;
}

.holiday-notice-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.holiday-notice-copy strong {
    color: #0b7a16;
    font-size: 17px;
    line-height: 1.2;
}

.holiday-notice-copy span,
.holiday-notice-copy small {
    color: #146c17;
    line-height: 1.35;
}

.holiday-notice-copy span {
    font-size: 15px;
    font-weight: 500;
}

.holiday-notice-copy small {
    font-size: 12px;
}

.form-divider {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.toolbar-form,
.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
}

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

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

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

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

.status-grid div {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.status-grid span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-grid strong {
    font-size: 18px;
}

.check-card-panel {
    max-width: 560px;
}

.time-clock-card {
    display: grid;
    justify-items: center;
    gap: 28px;
    padding: 28px 20px 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.time-clock-date {
    color: #3f3f46;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.time-clock-now {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    color: #111113;
    line-height: 0.9;
}

.time-clock-now span {
    font-size: 68px;
    font-weight: 800;
    letter-spacing: 0;
}

.time-clock-now small {
    font-size: 34px;
    font-weight: 500;
}

.clock-action {
    display: grid;
    width: min(300px, 100%);
}

.clock-button {
    display: grid;
    place-items: center;
    gap: 16px;
    width: 100%;
    min-height: 230px;
    padding: 28px 20px;
    border: 0;
    border-radius: 22px;
    color: #fff;
    box-shadow: 0 16px 32px rgba(0, 121, 133, 0.24);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.clock-in-button {
    background: linear-gradient(180deg, #008f9d 0%, #00abbc 100%);
}

.clock-out-button {
    background: linear-gradient(155deg, #f97316 0%, #fb923c 42%, #00abbc 100%);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.24);
}

.clock-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 121, 133, 0.3);
}

.clock-out-button:hover {
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.32);
}

.clock-button:disabled {
    transform: none;
}

.clock-button strong {
    font-size: 22px;
}

.tap-icon {
    width: 82px;
    height: 82px;
    color: #fff;
}

.clock-complete {
    display: inline-flex;
    justify-content: center;
    min-height: 56px;
    align-items: center;
    width: 100%;
}

.clock-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

.clock-mini {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
}

.clock-mini strong {
    color: #111827;
    font-size: 16px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.clock-mini > span:last-child {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

.mini-clock-icon {
    width: 42px;
    height: 42px;
    color: var(--blue);
}

.decision-form {
    display: grid;
    min-width: 220px;
    gap: 8px;
}

.button.mini {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
}

.button.danger {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
}

.button.warning {
    color: #fff;
    border-color: #d97706;
    background: #d97706;
}

.space-top {
    margin-top: 18px;
}

.settings-panel {
    max-width: 680px;
}

.location-note {
    margin: 12px 0 0;
}

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

.alert.success {
    color: #166534;
    background: var(--green-soft);
}

.alert.error {
    color: #9a3412;
    background: var(--red-soft);
}

.count-pill {
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    color: #475467;
    background: #eef3f9;
    font-size: 12px;
    font-weight: 800;
}

.inline-form {
    margin: 0;
}

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

.link-danger {
    border: 0;
    color: var(--red);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: min(1200px, 92vw);
    margin: 0 auto 24px;
    color: var(--muted);
    font-size: 14px;
}

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

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

    .header-main,
    .user-strip,
    .nav-tabs {
        grid-column: 1 / -1;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-tabs {
        display: none;
        grid-row: 3;
        justify-content: stretch;
        padding-top: 12px;
    }

    .nav-tabs.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-tabs a {
        justify-content: flex-start;
        border-color: var(--line);
        background: #fff;
    }

    .nav-dropdown {
        display: grid;
        gap: 8px;
    }

    .nav-dropbtn {
        justify-content: flex-start;
        width: 100%;
        border-color: var(--line);
        background: #fff;
    }

    .nav-menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 8px;
        box-shadow: none;
    }

    .nav-dropdown.open .nav-menu {
        display: grid;
        gap: 4px;
    }

    .nav-tabs.open .nav-menu {
        padding: 8px 0 0 12px;
        border: 0;
        background: transparent;
    }

    .nav-dropbtn::after {
        content: "+";
        margin-left: auto;
        font-size: 18px;
        font-weight: 900;
    }

    .nav-dropdown.open > .nav-dropbtn::after {
        content: "−";
    }

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

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

@media (max-width: 620px) {
    body {
        background: #f4f6fb;
        padding-bottom: 0;
    }

    .app-header {
        min-height: 0;
        align-items: center;
        padding: 18px 16px 14px;
        color: var(--ink);
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(216, 224, 234, 0.82);
        border-radius: 0 0 22px 22px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    }

    .brand-mark {
        display: none;
    }

    .brand-mark.has-image {
        display: inline-grid;
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        border: 1px solid rgba(216, 224, 234, 0.95);
        border-radius: 999px;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    }

    .brand-block {
        min-width: 0;
        gap: 12px;
    }

    .brand-block .eyebrow,
    .brand-block h1 {
        display: none;
    }

    .mobile-user-title {
        display: grid;
        min-width: 0;
        gap: 3px;
    }

    .mobile-user-title strong {
        overflow: hidden;
        color: #101828;
        font-size: 22px;
        font-weight: 800;
        line-height: 1.08;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-user-title span {
        overflow: hidden;
        color: #667085;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .menu-toggle {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        gap: 3px;
        border-color: rgba(216, 224, 234, 0.95);
        border-radius: 999px;
        background: #fff;
        
    }

    .menu-toggle span {
        width: 4px;
        height: 4px;
        border-radius: 999px;
        background: #101828;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .menu-toggle.open span:nth-child(1),
    .menu-toggle.open span:nth-child(2),
    .menu-toggle.open span:nth-child(3) {
        opacity: 1;
        transform: none;
    }

    .nav-tabs.open {
        margin-top: 12px;
        grid-template-columns: 1fr;
        padding: 12px;
        border: 1px solid rgba(216, 224, 234, 0.92);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    }

    .nav-tabs.open a,
    .nav-tabs.open .nav-dropbtn {
        color: var(--ink);
        border-color: rgba(216, 224, 234, 0.9);
        background: #f8fafc;
    }

    .nav-tabs.open a.active,
    .nav-tabs.open .nav-dropdown.active > .nav-dropbtn {
        color: #fff;
        background: var(--blue);
    }

    .user-strip {
        display: none;
    }

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

    .page-shell,
    .app-footer {
        width: min(100% - 28px, 1200px);
    }

    .page-shell {
        margin-top: 20px;
    }

    .panel,
    .stat-card {
        padding: 16px;
        border-color: rgba(216, 224, 234, 0.85);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
    }

    .panel-heading,
    .app-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar-form > *,
    .report-filters > *,
    .action-row > * {
        width: 100%;
    }

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

    .leave-balance-grid {
        grid-template-columns: 1fr;
    }

    .leave-report-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .leave-report-metric {
        min-height: 98px;
    }

    .leave-report-metric strong {
        font-size: 30px;
    }

    .leave-report-metric span {
        font-size: 13px;
    }

    .holiday-notice-banner {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
    }

    .salary-breakdown-section,
    .salary-breakdown-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .salary-breakdown-row span,
    .salary-breakdown-row strong {
        font-size: 13px;
    }

    .total-row span,
    .total-row strong,
    .salary-breakdown-footer span,
    .salary-breakdown-footer strong {
        font-size: 16px;
    }

    .leave-balance-card {
        min-height: 112px;
    }

    .leave-balance-panel-compact {
        padding: 12px;
    }

    .leave-balance-panel-compact .panel-heading h2 {
        font-size: 16px;
    }

    .leave-balance-panel-compact .count-pill {
        font-size: 10px;
    }

    .leave-balance-panel-compact .leave-balance-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .leave-balance-panel-compact .leave-balance-card {
        min-height: 84px;
        padding: 10px 8px;
    }

    .leave-balance-panel-compact .leave-balance-card span {
        font-size: 9px;
        line-height: 1.2;
    }

    .leave-balance-panel-compact .leave-balance-card strong {
        margin-top: 10px;
        font-size: 24px;
    }

    .status-grid,
    .status-grid.compact {
        grid-template-columns: 1fr;
    }

    .status-grid {
        gap: 10px;
    }

    .status-grid div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .status-grid span {
        margin-bottom: 0;
    }

    .check-card-panel {
        max-width: none;
    }

    .time-clock-card {
        gap: 24px;
        padding: 24px 14px 22px;
    }

    .time-clock-date {
        font-size: 18px;
    }

    .time-clock-now span {
        font-size: 58px;
    }

    .time-clock-now small {
        font-size: 30px;
    }

    .clock-action {
        width: min(100%, 300px);
    }

    .clock-button {
        min-height: 210px;
    }

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

    .clock-mini strong {
        font-size: 12px;
    }

    .clock-mini > span:last-child {
        font-size: 11px;
    }

    .mini-clock-icon {
        width: 34px;
        height: 34px;
    }

    .action-row .button,
    .quick-actions a {
        min-height: 46px;
    }

    .table-wrap {
        border: 0;
        overflow-x: visible;
    }

    .attendance-calendar-mobile {
        display: grid;
        gap: 12px;
    }

    .attendance-detail-table {
        display: none;
    }

    table {
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow-soft);
    }

    td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
        border-bottom: 1px solid #eef2f7;
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
    }

    td.empty-state {
        display: block;
        text-align: center;
    }

    td.empty-state::before {
        content: "";
    }

    .login-page {
        background: #fff;
    }

    .login-card {
        box-shadow: none;
        border: 0;
    }
}
