/* ===== Base (shared) ===== */
:root {
    --bg: #f4f6fb;
    --bg-grad-1: #f7f9ff;
    --bg-grad-2: #eef2fb;
    --glass: rgba(255, 255, 255, 0.75);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --stroke: rgba(16, 16, 24, 0.08);
    --text: #0f1222;
    --muted: #596077;
    --accent: #d10000;
    --accent-2: #ef3a3a;
    --check: #11a040;
    --sel: #d10000;
    --shadow-1: 0 8px 24px rgba(12, 22, 44, .10), inset 0 1px 0 rgba(255, 255, 255, .9);
    --shadow-2: 0 18px 46px rgba(12, 22, 44, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 24px;
    --dur-fast: .15s;
    --dur: .25s;
    --spring: cubic-bezier(.2, .8, .2, 1);
    /*  */
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
    color: var(--text);
    background:
        radial-gradient(1200px 1200px at 80% -10%, rgba(209, 0, 0, .06), transparent 60%),
        linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2));
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.footer {
    margin-top: 30px;
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: #444;
    background: #f0f2f7;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Server Status Styles */
.server-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stroke);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--dur-fast) var(--spring);
}

.server-status.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffaa00;
    /* Yellow for checking/unknown */
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #22cc22;
    /* Green for connected */
    animation: none;
}

.status-dot.disconnected {
    background: #ff4444;
    /* Red for disconnected */
    animation: blink 1s infinite;
}

.status-text {
    color: var(--text);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Adjust header position to account for status bar */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 20px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: var(--glass-strong);
    border-bottom: 1px solid var(--stroke);
    /* overflow: hidden; */
    margin-top: 32px;
    /* Space for status bar */
    flex-wrap: wrap;

    @media(min-width:768px) {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
}

.left {
    display: flex;
    /* align-items: center; */
    gap: 16px
}

.logo-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 92px;
}

.logo-stack img {
    height: 72px;
    width: 72px;
    object-fit: contain;
    border-radius: 14px;
    /* box-shadow: 0 8px 28px rgba(0, 0, 0, .08); */
}

.logo-stack .company-under {
    margin-top: 6px;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .25px;
    text-align: center;
    color: var(--text);
}

header h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: .2px;
    font-weight: 800
}

header .company {
    color: var(--accent)
}

.design-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center
}

.pill {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 999px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .55));
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-1);
    text-decoration: none;
    transition: transform var(--dur-fast) var(--spring), background var(--dur), box-shadow var(--dur);
    display: inline-block;
}

.pill:hover {
    transform: translateY(-1px);
}

.pill.active {
    color: #fff;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(209, 0, 0, .25);
}

.pill:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.userbar {
    display: flex;
    align-items: center;
    gap: 10px
}

.user-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-weight: 800;
    font-size: 12px;
    opacity: .95;
    line-height: 1.1;
}

.user-pill .welcome {
    font-size: 13px;
}

.user-pill .role {
    font-size: 11px;
    opacity: .8;
}

.container {
    /* max-width: 1200px; */
    max-width: 100%;
    margin: 22px auto;
    padding: 0 16px
}

.card {
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--r-lg);
    padding: 18px;
    box-shadow: var(--shadow-2);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

/* .layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 18px
} */

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr
    }
}

aside.stack {
    background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .70));
    border: 1px solid var(--stroke);
    border-radius: var(--r-md);
    padding: 14px;
    box-shadow: var(--shadow-1);
}

select,
input[type="month"],
input[type="number"],
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background-color: rgba(255, 255, 255, .90);
    /* background: linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(255, 255, 255, .75)); */
    color: var(--text);
    font-weight: 700;
    transition: box-shadow var(--dur), border-color var(--dur);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

select:hover,
input:hover {
    box-shadow: var(--shadow-1);
}

select:focus,
input:focus {
    /* border-color: var(--accent); */
    border-color: transparent;
    outline: none;
    box-shadow: 0 0 0 4px rgba(209, 0, 0, .12);
}

select {
    -webkit-appearance: none;
    background-image: url(./chevron-down-svgrepo-com.svg);
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
}

.section-title {
    font-weight: 800;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
    user-select: none;
}

.files {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--stroke);
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .75));
    backdrop-filter: blur(12px);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 6px
}

.day {
    position: relative;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    text-align: center;
    font-weight: 800;
    color: #364056;
    background: #ff7777;
    /* Solid red for unavailable */
    user-select: none;
    transition: background-color var(--dur-fast) var(--spring);
}

.day.enabled {
    cursor: pointer;
    color: #0f1222;
    background: #66cc66;
    /* Solid green for available */
    border: none;
}

.day.enabled.selected {
    outline: 2px solid #228822;
    background: #77dd77;
    /* Slightly brighter green when selected */
}

/* Monthly calendar for evaluations */
.month-calendar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px
}

.month {
    position: relative;
    padding: 12px 0;
    border-radius: 14px;
    border: none;
    text-align: center;
    font-weight: 800;
    color: #364056;
    background: #ff7777;
    /* Solid red for unavailable */
    user-select: none;
    transition: background-color var(--dur-fast) var(--spring);
}

.month.enabled {
    cursor: pointer;
    color: #0f1222;
    background: #66cc66;
    /* Solid green for available */
    border: none;
}

.month.enabled.selected {
    outline: 2px solid #228822;
    background: #77dd77;
    /* Slightly brighter green when selected */
}

/* Remove the check/cross icons */
.day.enabled::after,
.day.no-data::after {
    display: none;
}

.hidden {
    display: none !important
}

/* ===== Theme: Classic ===== */
body.theme-Classic {
    --sel: #d10000;
}

body.theme-Classic {
    background: linear-gradient(180deg, #eaeef5, #dfe4ef);
}

body.theme-Classic header {
    /* background: #f2f3f7; */
    background-color: #fff;
}

body.theme-Classic .card {
    background: #f3f4f8;
    border: 1px solid #cfd5e2;
    border-radius: 12px;
    box-shadow: none;
}

body.theme-Classic aside.stack {
    background: #f3f4f8;
    border: 1px solid #cfd5e2;
    box-shadow: none;
    border-radius: 10px;
    width: 100%;

    @media(min-width:992px) {
        width: 310px;
    }
}

body.theme-Classic .pill {
    background: #ffffff;
    border: 1px solid #d9dfea;
    color: #101321;
}

body.theme-Classic .pill.active {
    background: linear-gradient(180deg, #b60000, #e02f2f);
    color: #fff;
    border: 0;
}

/* ===== Theme: Modern (distinct but light) ===== */
body.theme-Modern {
    --bg: #f5f7ff;
    --bg-grad-1: #f9fbff;
    --bg-grad-2: #eff3ff;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-strong: rgba(255, 255, 255, 0.92);
    --stroke: rgba(18, 18, 28, 0.08);
    --text: #0f1424;
    --muted: #5e6782;
    --accent: #c80000;
    --accent-2: #ff3a3a;
    --sel: #c80000;
    background: var(--bg);
    /* background:
        radial-gradient(1100px 900px at 10% -15%, rgba(200, 0, 0, .06), transparent 60%),
        radial-gradient(900px 700px at 90% -20%, rgba(255, 80, 80, .08), transparent 55%),
        linear-gradient(180deg, var(--bg-grad-1), var(--bg-grad-2)); */
}

body.theme-Modern header {
    /* background: var(--glass-strong);
    border-bottom: 1px solid var(--stroke);
    box-shadow: 0 8px 24px rgba(12, 22, 44, .06); */
}

body.theme-Modern .card,
body.theme-Modern aside.stack {
    background: var(--glass);
    border: 1px solid var(--stroke);
}

body.theme-Modern .pill {
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .7));
}

body.theme-Modern .pill.active {
    color: #fff;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 22px rgba(200, 0, 0, .22);
}

/* ===== Theme: AI (dark neon, restored) ===== */
body.theme-AI {
    --bg: #050b16;
    --bg-grad-1: #050b16;
    --bg-grad-2: #081225;
    --glass: rgba(10, 22, 45, .85);
    --glass-strong: rgba(10, 25, 50, .92);
    --stroke: rgba(0, 217, 255, .25);
    --text: #e8f7ff;
    --muted: #9ad9ff;
    --check: #1dd1a1;
    --sel: #001f3f;
    background:
        radial-gradient(1100px 900px at 20% -10%, rgba(0, 217, 255, .16), transparent 60%),
        radial-gradient(900px 700px at 90% -20%, rgba(40, 140, 255, .20), transparent 55%),
        linear-gradient(180deg, #050b16, #081225);
    color: var(--text);
}

body.theme-AI header {
    background: linear-gradient(180deg, rgba(10, 25, 50, .95), rgba(10, 22, 45, .88));
    border-bottom: 1px solid rgba(0, 217, 255, .25);
    box-shadow: inset 0 -1px 0 rgba(0, 217, 255, .15), 0 12px 32px rgba(0, 100, 200, .15);
}

body.theme-AI .card,
body.theme-AI aside.stack {
    background: linear-gradient(180deg, rgba(10, 25, 50, .85), rgba(8, 18, 37, .75));
    border: 1px solid rgba(0, 217, 255, .20);
}

body.theme-AI .pill {
    background: linear-gradient(180deg, rgba(0, 217, 255, .10), rgba(91, 119, 255, .16));
    border: 1px solid rgba(0, 217, 255, .35);
    color: #e8f7ff;
}

body.theme-AI select,
body.theme-AI input {
    background: #0b1627;
    color: #e8f7ff;
    border: 1px solid rgba(0, 217, 255, .35);
}

body.theme-AI .day {
    color: #ffcccc;
    background: #cc4444;
}

body.theme-AI .day.enabled {
    color: #e8ffe8;
    background: #44cc44;
}

body.theme-AI .day.enabled.selected {
    outline: 2px solid #88ff88;
    background: #55dd55;
}

body.theme-AI .month {
    color: #ffcccc;
    background: #cc4444;
}

body.theme-AI .month.enabled {
    color: #e8ffe8;
    background: #44cc44;
}

body.theme-AI .month.enabled.selected {
    outline: 2px solid #88ff88;
    background: #55dd55;
}

/* AI robot + glow (only visible in AI) */
.ai-robot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    width: 86px;
    height: 86px;
    display: none;
    pointer-events: none;
    opacity: .0;
    filter: drop-shadow(0 8px 18px rgba(0, 180, 255, .35));
    animation: floaty 5.5s ease-in-out infinite, fadein .6s ease forwards;
    animation-delay: .2s, .2s;
    z-index: 0;
}

body.theme-AI .ai-robot {
    display: block;
}

@keyframes floaty {
    0% {
        transform: translate(-50%, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50%, 6px) rotate(1.5deg);
    }

    100% {
        transform: translate(-50%, 0) rotate(0deg);
    }
}

@keyframes fadein {
    to {
        opacity: .95;
    }
}

.ai-glow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -32px;
    height: 64px;
    display: none;
    pointer-events: none;
    background: radial-gradient(60% 60% at 70% 0%, rgba(0, 150, 255, .25), transparent 60%),
        radial-gradient(50% 50% at 20% 0%, rgba(0, 217, 255, .18), transparent 70%);
    filter: blur(20px);
    opacity: .9;
    z-index: 0;
}

body.theme-AI .ai-glow {
    display: block;
}

/* ===== Daily Report Button (consistent red/white across themes) ===== */
.btn-daily-report {
    background: linear-gradient(135deg, #ff1e1e, #b60000);
    color: #000000 !important;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.30);
    border: none;
    transition: transform var(--dur-fast) var(--spring), box-shadow var(--dur);
}

.btn-daily-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.45);
}

/* Setpoint Remarks styling */
.setpoint-section {
    margin-top: 14px;
}

.setpoint-section .section-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.setpoint-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    font-weight: 600;
    resize: vertical;
    background: #fff;
    /* make remarks write area white */
    color: var(--text);
}

/* Evaluation Forms Styling */
.evaluation-form {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .75));
}

.evaluation-form .form-name {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
}

.employee-name-input {
    width: 100%;
    max-width: 300px;
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--stroke);
    background: white;
}

.pdf-viewer-container {
    width: 100%;
    height: 600px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/*  */
.user {
    display: flex;
    position: relative;
    align-items: center;
    position: absolute;
    right: 1rem;
    top: 1rem;

    @media(min-width:768px) {
        position: relative;
        right: 0;
        top: 0;
    }

    &:before {
        content: "";
    }

    .avator {
        width: 40px;
        height: 40px;
        overflow: hidden;
        border-radius: 50%;
        border: 1px solid rgba(0, 0, 0, 0.2);
        cursor: pointer;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    .dropdown {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: 150px;
        border-radius: 6px;
        padding: 12px;
        background-color: #fff;
        box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
        display: none;

        a {
            display: block;
            text-decoration: none;
            color: #000;
            margin-bottom: 0.75rem;
            font-size: 14px;
            font-weight: 600;

            &:hover {
                color: #ff7777
            }

            &:last-child {
                margin-bottom: 0;
            }
        }
    }
}

.header-right {
    display: flex;
    align-items: center;
    column-gap: 2rem;
    margin-top: 1rem;

    @media(min-width:768px) {
        margin-top: 0;
    }
}

.links {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* daily report css */

:root {
    --brand: #d10000;
    --ink: #0f172a;
    --muted: #64748b;
    --card: #ffffff;
    --bg: #f6f7fb;
    --ring: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    background: var(--bg);
    color: var(--ink);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--ring);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand img {
    height: 28px;
    width: auto;
}

.actions a {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--ring);
    padding: 8px 12px;
    border-radius: 10px;
}

.actions a:hover {
    border-color: var(--brand);
    color: var(--brand);
}

main {
    margin: 22px 0px;
    /* padding: 0px 16px; */
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.toolbar select {
    padding: 8px 10px;
    border: 1px solid var(--ring);
    border-radius: 8px;
    background: #fff;
    width: 100px;
    -webkit-appearance: none;
    background-image: url(./chevron-down-svgrepo-com.svg);
    background-repeat: no-repeat;
    background-position: calc(100% - 4px) center;
}

.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(12, 1fr);
}

.card {
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .03);
}

.kpi {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.kpi .big {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.kpi .sub {
    font-size: 12px;
    color: var(--muted);
}

.title {
    font-weight: 700;
    margin-bottom: 10px;
}

.muted {
    color: var(--muted);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.day {
    border: 1px solid var(--ring);
    background: #fff;
    text-align: center;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.day.off {
    opacity: .35;
}

.day.has {
    border-color: #22c55e;
}

.day.sel {
    background: #22c55e10;
    border-color: #22c55e;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}

.span-8 {
    grid-column: span 8;
}

.span-12 {
    grid-column: span 12;
}

@media (max-width:1100px) {

    .span-6,
    .span-4,
    .span-8 {
        grid-column: span 12;
    }
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 20px 10px;
}

/* Indicator areas above charts */
.indicator {
    text-align: center;
    font-size: 24px;
    height: 30px;
    transition: opacity .2s ease;
    margin-top: 2px;
    margin-bottom: 4px;
    line-height: 30px;
}

.happy {
    color: #22c55e;
}

/* green */
.sad {
    color: #ef4444;
}

/* red */

/* Future day styling (red X and unselectable) */
.day.future {
    border-color: #ef4444;
    color: #ef4444;
    cursor: not-allowed;
    opacity: 1;
    /* override .off */
    background: #fff;
    position: relative;
    font-weight: 600;
}

.day.future .x {
    margin-left: 4px;
    font-weight: 800;
}


/* evalution css */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

header h1 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.left,
.right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layout .left {
    /* flex: 2; */
    flex: 0 0 auto;
    width: 100%;

    @media(min-width:992px) {
        width: calc(75% - 16px)
    }

}

.layout .right {
    flex: 0 0 auto;
    width: 100%;

    @media(min-width:992px) {
        width: 25%;
    }
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.card h2,
.card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

label {
    font-size: 13px;
    display: block;
    margin-bottom: 4px;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.field {
    flex: 1 1 140px;
    min-width: 140px;
}

input[type="text"],
input[type="date"],
select,
textarea {
    /* width: 100%;
    padding: 12px 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    box-sizing: border-box; */
}

textarea {
    min-height: 70px;
    resize: vertical;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

th,
td {
    border: 1px solid #e5e7eb;
    padding: 10px 6px;
    vertical-align: top;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

.score-input {
    width: 70px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
}

.score-input.low-score {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.score-input.high-score {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.score-input.normal-score {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.remark-input {
    width: 100%;
    min-height: 40px;
}

.kpi-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
    font-size: 13px;
    gap: 8px;
}

.kpi-footer-total {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: flex-end;
    padding-right: 12px;
}

#totalScoreDisplay {
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.status {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0;
    transition: opacity .2s;
}

.status.show {
    opacity: 1;
}

.status.ok {
    color: #059669;
}

.status.err {
    color: #b91c1c;
}

.actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.actions-row>button {
    flex: 1;
    max-width: 260px;
    text-align: center;
}

/* Admin Edit button sizing (match action buttons like "Load Selected Evaluation") */
#targetsEditToolbar {
    justify-content: center !important;
}

#targetsEditToolbar>button {
    flex: 1;
    max-width: 260px;
    text-align: center;
}

button {
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    background: #dc2626;
    color: #fff;
}

button.secondary {
    background: #4b5563;
}

canvas.sig-pad {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    width: 100%;
    height: 80px;
    background: #f9fafb;
}

.sig-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sig-col {
    flex: 1 1 200px;
}

.sig-col footer {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 6px 0;
    font-size: 12px;
}

.month-tile {
    padding: 4px 6px;
    border-radius: 8px;
    text-align: center;
    background: #e5e7eb;
}

.month-tile.has-data {
    background: #bbf7d0;
    cursor: pointer;
}

.month-tile.has-data.selected {
    outline: 2px solid #16a34a;
}

.month-tile .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #15803d;
    margin-right: 4px;
}

#archiveInfo {
    font-size: 12px;
    color: #4b5563;
    margin: 4px 0;
}

@media (max-width:900px) {
    .layout {
        /* flex-direction: column; */
    }
}

/* KPI Targets & Man Power panels */
.kpi-target-panels-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.kpi-target-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.kpi-target-panels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.number-panel {
    min-width: 72px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font-size: 11px;
}

.number-panel span.label {
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 2px;
}

.number-panel span.value {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.targets-card-note {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

.targets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}

.targets-table th,
.targets-table td {
    border: 1px solid #e5e7eb;
    padding: 4px 6px;
}

.targets-table th {
    background: #f9fafb;
    text-align: left;
}

.targets-table td.num-cell {
    text-align: center;
    font-weight: 600;
}

/* Performance indicator */
.perf-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    white-space: nowrap;
}

.perf-indicator .perf-label {
    font-weight: 600;
}

.perf-indicator.perf-poor,
.perf-indicator.perf-need {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.perf-indicator.perf-meet,
.perf-indicator.perf-exceed {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.perf-indicator .perf-range {
    font-size: 11px;
    color: inherit;
    opacity: 0.9;
}

@media (max-width: 960px) {
    .kpi-target-panels-row {
        align-items: flex-start;
    }

    .perf-indicator {
        margin-top: 6px;
    }
}

.targets-edit-toolbar {
    display: flex;
    gap: 6px;
    margin: 4px 0 4px;
    flex-wrap: wrap;
}

.targets-edit-toolbar button {
    font-size: 11px;
    padding: 3px 6px;
}

.targets-table input,
.number-panel input.targets-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 11px;
    padding: 2px 4px;
}

.targets-error-message {
    margin-top: 4px;
    font-size: 11px;
    color: #b91c1c;
    font-weight: 600;
}


.kpi-category-row .kpi-category-cell {
    font-weight: bold;
    font-size: 15px;
    text-align: center;
    color: #1F4E78;
    /* Dark blue */
    background-color: #DDEBF7;
    /* Light blue */
    padding: 6px 0;
    letter-spacing: 0.5px;
    border-top: 1px solid #A6A6A6;
    border-bottom: 1px solid #A6A6A6;
}


/* Category Targets locked look */
#perfConfigCard.locked {
    opacity: 0.85;
}

#perfConfigCard.locked input[type="number"] {
    background: #f3f4f6;
    cursor: not-allowed;
}



/* Ensure the single "Admin Edit" button matches the height of "Load Selected Evaluation" */
#btnEditTargets {
    font-size: 13px !important;
    padding: 6px 14px !important;
    line-height: normal;
}


/* SIG_UPLOAD_RULES_V3 */
.sig-hint {
    font-size: 11px;
    color: #374151;
    margin-top: 4px;
}

.sig-error {
    font-size: 12px;
    color: #dc2626;
    font-weight: 700;
    margin: 4px 0 6px 0;
    display: none;
}

/* yearly report css */

:root {
    --bg: #f4f6fb;
    --bg-grad-1: #f7f9ff;
    --bg-grad-2: #eef2fb;
    --glass: rgba(255, 255, 255, 0.85);
    --stroke: rgba(15, 18, 34, 0.08);
    --text: #0f1222;
    --muted: #596077;
    --accent: #d10000;
    --accent-soft: rgba(209, 0, 0, 0.12);
    --ok: #11a040;
    --danger: #c62828;
    --shadow-soft: 0 18px 45px rgba(9, 18, 48, 0.12);
    --ring: rgba(226, 232, 240, 1);
    --ink: var(--text);
    --brand: var(--accent);
    --radius-lg: 18px;
    --radius-xl: 22px;
    --dur: 220ms;
    --easing: cubic-bezier(.18, .82, .25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* background: #f4f6fb; */
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* New header with logo and different color */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--ring);
    border-radius: 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo {
    width: auto;
    height: 28px;
    object-fit: contain;
}

.title-group {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.main-title {
    font-size: 20px;
    font-weight: 750;
}

.sub-title {
    font-size: 13px;
    color: var(--muted);
}

.title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-title {
    font-size: 24px;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.subtitle {
    font-size: 13px;
    color: var(--muted);
}

.badge-year {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(15, 18, 34, 0.12);
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
}

.layout {
    /* display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 16px;
    align-items: flex-start; */
}

.card {
    position: relative;
    background: var(--glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--stroke);
    padding: 16px 18px;
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}

.card-title span {
    color: var(--accent);
}

.card-help {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
}

.years-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.year-pill {
    position: relative;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(15, 18, 34, 0.16);
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur) var(--easing), box-shadow var(--dur) var(--easing), background var(--dur), border-color var(--dur), color var(--dur);
    box-shadow: 0 1px 2px rgba(15, 18, 34, 0.05);
}

.year-pill.available {
    background: linear-gradient(135deg, #1fb655, #0d8337);
    color: #ffffff;
    border-color: rgba(4, 67, 26, 0.6);
    box-shadow: 0 8px 18px rgba(6, 111, 42, 0.45);
}

.year-pill.available:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(6, 111, 42, 0.55);
}

.year-pill.selected {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(6, 111, 42, 0.65);
    border-color: #0b6c31;
}

.year-pill.disabled {
    cursor: not-allowed;
    color: rgba(89, 96, 119, 0.7);
    background: rgba(240, 242, 250, 0.9);
    border-style: dashed;
    opacity: .7;
}

.legend {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.legend-dot.available {
    background: linear-gradient(135deg, #1fb655, #0d8337);
}

.legend-dot.missing {
    background: rgba(199, 204, 220, 0.9);
    border: 1px dashed rgba(120, 128, 160, 0.7);
}

.sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
}

.section-sub {
    font-size: 11px;
    color: var(--muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.metric-card {
    position: relative;
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 18, 34, 0.08);
    box-shadow: 0 10px 26px rgba(15, 18, 34, 0.10);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
    word-break: break-word;
}

.metric-unit {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.metric-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-icon img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.error-banner {
    display: none;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 11px;
    background: rgba(198, 40, 40, 0.06);
    border: 1px solid rgba(198, 40, 40, 0.35);
    color: var(--danger);
}

.error-banner.show {
    display: block;
}

.year-chip {
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 18, 34, 0.12);
}

@media (max-width:900px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Footer style inline already, but keep page spacing nice */

/* Header taken from Daily Report */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--ring);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand img {
    height: 28px;
    width: auto;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

header #currentYearLabel {
    display: none;
    /* hide Year 2025 text in header while keeping JS working */
}

.yearly-report {
    .layout {
        .left {
            width: 100%;

            @media(min-width:992px) {
                width: 25%;
                flex: 0 0 auto;
            }
        }

        .sections {
            width: 100%;

            @media(min-width:992px) {
                width: calc(75% - 16px);
                flex: 0 0 auto;
            }
        }
    }
}

/* user list css */
.user-list {
    /* overflow: hidden; */
    /* overflow-x: auto; */

    @media(min-width:1200px) {
        overflow-x: unset;
    }

    form#roleForm,
    form#userForm,
    form#deptForm {
        label {
            font-size: 14px;
            font-weight: 600;
            display: inline-block;
            margin-bottom: 0.5rem;
        }

        /* margin-bottom: 2rem; */
    }

    .scroll {
        overflow: hidden;
        overflow-x: auto;
    }
}

.user-list-table {
    border: 1px solid rgba(0, 0, 0, 0.08);

    tr {
        th {
            text-align: left;
            font-size: 14px;
            padding: 10px 10px;

            &:first-child {
                width: 200px;
            }

            &:nth-child(4) {
                width: 50px;
            }

            &:last-child {
                width: 100px;
            }
        }

        td {
            padding: 10px 10px;
            vertical-align: middle;
        }
    }
}

.user-name {
    display: flex;
    align-items: center;
    column-gap: 16px;

    .checkbox {
        margin-top: 5px;
    }

    .photo {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
}

.user-list {
    margin: 22px 0;
}

.text-right {
    text-align: right;
}

.mt-2 {
    margin-top: 2rem;
}

.btn {
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);

    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    color: #000;

    &:hover {
        background-color: #ff1e1e;
        color: #fff;
    }
}

.btn-daily-setting {
    position: relative;

    .dropmenu {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        width: 150px;
        border-radius: 6px;
        padding: 12px;
        background-color: #fff;
        box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
        display: none;

        @media(min-width:576px) {
            right: 0;
            left: auto;
        }

        &:before {
            content: "";
            width: 100%;
            height: 10px;
            position: absolute;
            top: -10px;
            left: 0;
            /* background-color: #f00; */

        }

        a {
            display: block;
            text-decoration: none;
            color: #000;
            margin-bottom: 0.75rem;
            font-size: 14px;
            font-weight: 600;

            &:hover {
                color: #ff7777
            }

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    &:hover {
        .dropmenu {
            display: block;
        }

    }

    .pill {
        box-shadow: 0 6px 18px rgba(255, 0, 0, 0.30);
        border: none;
        transition: transform var(--dur-fast) var(--spring), box-shadow var(--dur);
    }
}


.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.row-gap2 {
    row-gap: 2rem;
}

.row-2 {
    margin-left: -1rem;
    margin-right: -1rem;
    display: flex;
    flex-wrap: wrap;
}

.col-lg-3,
.col-lg-4,
.col-lg-8,
.col-lg-9,
.col-xl-3,
.col-xl-4,
.col-xl-8,
.col-xl-9 {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media(min-width:992px) {
    .col-lg-4 {
        width: 33.3333%;
        flex: 0 0 auto;

    }

    .col-lg-8 {
        width: 66.6666%;
        flex: 0 0 auto;
    }

    .col-lg-3 {
        width: 25%;
        flex: 0 0 auto;
    }

    .col-lg-9 {
        width: 75%;
        flex: 0 0 auto;
    }
}

@media(min-width:1200px) {
    .col-xl-4 {
        width: 33.3333%;
        flex: 0 0 auto;

    }

    .col-xl-8 {
        width: 66.6666%;
        flex: 0 0 auto;
    }

    .col-xl-3 {
        width: 25%;
        flex: 0 0 auto;
    }

    .col-xl-9 {
        width: 75%;
        flex: 0 0 auto;
    }
}

.user-list-table {
    width: 100%;
}

.mb-2 {
    margin-bottom: 2rem;
}


/* login css */
.login .logo {
    margin: 0;
    height: auto;

    a {
        display: block;
    }
}

.login-btn {
    background-color: #9e0210;
    color: #fff;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transform: scale(1);
    transition: ease-in-out all 0.4s;

    &:hover {
        text-decoration: none;
        color: #fff;
        transform: scale(0.98);
    }
}

.login-form {
    text-align: center;
}



.login .content {
    max-width: 400px;

    h3 {
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}

.login .copyright {
    padding-bottom: 3rem;
    font-size: 13px;
}

.login-form {
    padding-left: 10px;
    padding-right: 10px;

    form {
        label {
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 0.5rem;
            display: inline-block;
        }
    }
}

.form-container {
    max-width: 100%;
    margin: 0 auto 0;
    background-color: #fff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(18, 18, 28, 0.08);

    h2 {
        margin-bottom: 1rem;
    }
}



.login-page {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
    background-color: #fff;
    overflow: hidden;
    flex-direction: column-reverse;

    @media(min-width:768px) {
        flex-direction: row;
        height: 100vh;
        min-height: unset;
    }

    .login-left {
        width: 100%;
        flex: 0 0 auto;
        height: 100%;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;

        @media(min-width:768px) {
            height: 100%;
            width: 50%;
        }


    }

    .login-right {
        width: 100%;
        flex: 0 0 auto;
        height: 100%;


        @media(min-width:768px) {

            width: 50%;
        }

    }
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}