:root {
    --black: #111315;
    --charcoal: #1b1f23;
    --navy: #183b7a;
    --navy-dark: #102f63;
    --silver: #c8c8c8;
    --light: #f5f5f5;
    --white: #ffffff;
    --muted: #6f7479;
    --border: #d9d9d9;
    --danger: #a82020;
    --success: #1f7a3f;
    --page-bg: #f3f4f6;
    --card-bg: #ffffff;
    --chip-bg: #edf1f6;
    --chip-border: #64748b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    color: var(--black);
}

.topbar {
    background: linear-gradient(135deg, #0f1113, #252a2f);
    color: var(--white);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-bottom: 4px solid #b8b8b8;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    height: 46px;
    width: auto;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-tagline {
    font-size: 13px;
    color: #d5d5d5;
    margin-top: 2px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
}

.nav a:hover {
    background: rgba(255,255,255,0.12);
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropbtn {
    background: transparent;
    color: var(--white);
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.nav-dropbtn:hover {
    background: rgba(255,255,255,0.12);
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.18);
    padding: 8px;
    z-index: 50;
}

.nav-dropdown-menu a {
    display: block;
    color: #111315;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: #eef1f4;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.page {
    padding: 28px;
    max-width: 1500px;
    margin: 0 auto;
}

.footer {
    padding: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 16px 0 20px;
    max-width: 520px;
}

.filter-bar > div:first-child {
    flex: 1;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 700px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions button,
    .filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.help-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
}

.help-card h2 {
    margin-bottom: 10px;
}

.help-card p {
    margin: 0 0 10px;
    line-height: 1.45;
}

.help-card p:last-child {
    margin-bottom: 0;
}

.help-example {
    background: #ffffff;
    border-left: 4px solid var(--navy);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .help-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   GENERAL LAYOUT / CARDS
========================================= */

.hero-card,
.card {
    background: var(--white);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.05);
}

.hero-card {
    background: linear-gradient(135deg, #111315, #2d3339);
    color: var(--white);
}

.hero-card h1 {
    margin: 0 0 8px;
}

.hero-card p {
    margin: 0;
    color: #dddddd;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.wide {
    width: 100%;
}

h1,
h2 {
    margin-top: 0;
}

.muted {
    color: var(--muted);
}

.small-text {
    font-size: 13px;
}

.big-number {
    font-size: 48px;
    font-weight: 800;
}

.big-number span {
    font-size: 18px;
    color: var(--muted);
}

.page-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================================
   FORMS / BUTTONS / TABLES
========================================= */

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: left;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--white);
}

button,
.button {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button:hover {
    background: #2c3136;
}

.button.secondary {
    background: #e7e8ea;
    color: var(--black);
}

.button.secondary:hover {
    background: #d7d9dc;
}

button.danger {
    background: var(--danger);
}

.small-button {
    padding: 7px 10px;
    font-size: 13px;
    border-radius: 8px;
}

.button-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-actions {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.checkbox-row {
    display: flex;
    align-items: center;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.checkbox-row input {
    width: auto;
}

.field-help {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-form input {
    min-width: 180px;
    flex: 1;
}

.stacked-mini-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.stacked-mini-form textarea {
    width: 100%;
    font-size: 13px;
}

.mini-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f2f4;
    font-weight: 800;
}

/* =========================================
   ALERTS
========================================= */

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    text-align: left;
}

.alert-error {
    background: #f9dede;
    color: #7a1515;
    border: 1px solid #e0a8a8;
}

.alert-success {
    background: #dcf4e4;
    color: #155b2e;
    border: 1px solid #9fd0ad;
}

/* =========================================
   LOGIN
========================================= */

.login-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--white);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    max-width: 260px;
    width: 100%;
    margin-bottom: 18px;
}

.login-card h1 {
    margin: 0;
    font-size: 34px;
}

.tagline {
    color: var(--muted);
    margin-top: 8px;
    margin-bottom: 24px;
}

/* =========================================
   PTO / LEDGER
========================================= */

.history-balance-box {
    background: linear-gradient(135deg, #111315, #2d3339);
    color: #ffffff;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 22px;
    max-width: 420px;
}

.history-balance-label {
    font-size: 14px;
    color: #d5d5d5;
    margin-bottom: 8px;
}

.history-balance-number {
    font-size: 42px;
    font-weight: 900;
}

.history-balance-number span {
    font-size: 16px;
    color: #d5d5d5;
}

.hours-positive {
    color: #1f7a3f;
    font-weight: 800;
}

.hours-negative {
    color: #a82020;
    font-weight: 800;
}

.scheduled-box {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
}

.employee-balance-card {
    min-height: 240px;
}

.employee-balance-number {
    font-size: 58px;
    font-weight: 900;
    margin-top: 28px;
    text-align: center;
}

.employee-balance-number span {
    font-size: 18px;
    color: var(--muted);
}

.accrual-table input[type="number"] {
    max-width: 140px;
}

.accrual-table td,
.accrual-table th {
    vertical-align: middle;
}

.split-warning {
    display: inline-block;
    background: #fff3cd;
    color: #7a5b00;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

/* =========================================
   POINTS
========================================= */

.points-overview-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    margin: 22px 0 26px;
}

.points-overview-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
}

.points-overview-card-dark {
    background: linear-gradient(135deg, #111315, #2d3339);
    color: #ffffff;
    border: none;
}

.points-overview-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}

.points-overview-card-dark .points-overview-label {
    color: #d7dce2;
}

.points-overview-number {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.points-overview-subtext {
    font-size: 14px;
    color: #d7dce2;
}

.level-pill {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    margin: 6px 0 16px;
}

.level-none {
    background: #eef1f4;
    color: #4b5563;
}

.level-coaching {
    background: #fff3cd;
    color: #7a5b00;
}

.level-verbal {
    background: #fde8e8;
    color: #8a1f1f;
}

.level-written {
    background: #fbd5d5;
    color: #7f1d1d;
}

.level-termination {
    background: #2b0d0d;
    color: #ffffff;
}

.points-thresholds {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 8px 16px;
    font-size: 13px;
    color: var(--muted);
}

.points-summary-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.points-summary-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.points-summary-card.dark {
    background: linear-gradient(135deg, #111315, #2d3339);
    color: #ffffff;
}

.points-summary-label {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.points-summary-card.dark .points-summary-label {
    color: #d5d5d5;
}

.points-summary-number {
    font-size: 42px;
    font-weight: 900;
}

.points-summary-text {
    font-size: 24px;
    font-weight: 800;
}

.status-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-active {
    background: #fde8e8;
    color: #8a1f1f;
}

.status-pending {
    background: #fff3cd;
    color: #7a5b00;
}

.status-waived {
    background: #dcf4e4;
    color: #155b2e;
}

.status-expired {
    background: #e7e8ea;
    color: #4b5563;
}

/* =========================================
   ADMIN DASHBOARD
========================================= */

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-hero-card {
    background: linear-gradient(135deg, #111315, #2d3339);
    color: #ffffff;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.admin-hero-card h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.admin-hero-card p {
    margin: 0;
    color: #dddddd;
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.admin-metric-card {
    display: block;
    background: #ffffff;
    border-radius: 20px;
    padding: 22px;
    text-decoration: none;
    color: #111315;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.05);
}

.admin-metric-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

.metric-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.metric-number {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
}

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.admin-action-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.05);
}

.admin-action-card h2 {
    margin-bottom: 8px;
}

.admin-action-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.admin-action-list a {
    display: block;
    background: #e7e8ea;
    color: #111315;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 800;
}

.admin-action-list a:hover {
    background: #d7d9dc;
}

/* =========================================
   CALENDAR
========================================= */

.calendar-shell {
    width: 100%;
}

.calendar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.calendar-month-title {
    margin: 0;
    text-align: center;
    flex: 1;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--navy);
    text-transform: uppercase;
}

.calendar-nav-button {
    display: inline-block;
    text-decoration: none;
    background: var(--white);
    color: var(--navy);
    border: 1px solid #cfd7e3;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
}

.calendar-nav-button:hover {
    background: #eef3fb;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.calendar-weekdays div {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 14px 10px;
    font-size: 16px;
    font-weight: 800;
    border-right: 1px solid rgba(255,255,255,0.15);
}

.calendar-weekdays div:last-child {
    border-right: none;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    border-left: 1px solid #cfd7e3;
    border-top: 1px solid #cfd7e3;
    background: var(--white);
}

.calendar-day {
    min-height: 190px;
    padding: 8px;
    border-right: 1px solid #cfd7e3;
    border-bottom: 1px solid #cfd7e3;
    background: var(--white);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-day.other-month {
    background: #f2f4f7;
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--navy);
}

.calendar-day-number {
    font-size: 18px;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
}

.calendar-day.other-month .calendar-day-number {
    color: #97a0ad;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    max-height: 150px;
    padding-right: 2px;
}

.calendar-event-card {
    background: var(--chip-bg);
    border-left: 3px solid var(--chip-border);
    border-radius: 9px;
    padding: 6px 8px;
}

.calendar-event-card.time_off {
    border-left-color: #64748b;
}

.calendar-event-card.holiday {
    border-left-color: #183b7a;
}

.calendar-event-card.company_event {
    border-left-color: #2f855a;
}

.calendar-event-card.attendance {
    border-left-color: #c05621;
}

.calendar-event-card.other {
    border-left-color: #64748b;
}

.calendar-event-name {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    margin-bottom: 2px;
}

.calendar-event-time {
    font-size: 11px;
    line-height: 1.1;
    color: #5b6779;
    font-weight: 600;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1200px) {
    .calendar-day {
        min-height: 160px;
    }

    .calendar-event-name {
        font-size: 14px;
    }

    .calendar-event-time {
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    .admin-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        width: 100%;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropbtn {
        width: 100%;
        text-align: left;
    }

    .nav-dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        margin-top: 4px;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: block;
    }

    .grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 18px;
    }

    .brand-logo {
        height: 36px;
    }

    .calendar-shell {
        overflow-x: auto;
    }

    .calendar-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-month-title {
        font-size: 24px;
    }

    .calendar-weekdays,
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(140px, 1fr));
        min-width: 980px;
    }

    .points-overview-grid,
    .points-summary-grid {
        grid-template-columns: 1fr;
    }

    .points-thresholds {
        grid-template-columns: 1fr;
    }

    .page-heading-row {
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .admin-metrics-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero-card h1 {
        font-size: 26px;
    }
}