﻿
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --primary: #1a2332;
    --primary-light: #243048;
    --accent: #3b82f6;
    --accent-2: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --surface: #ffffff;
    --surface2: #f8fafc;
    --surface3: #f1f5f9;
    --border: #e2e8f0;
    --text: #0f172a;
    --text2: #64748b;
    --text3: #94a3b8;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

body {
    font-family: 'Segoe UI',system-ui,sans-serif;
    background: var(--surface2);
    color: var(--text);
    min-height: 100vh
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

/* LOGIN */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 50%,#0f2027 100%)
}

.login-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 2.5rem;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3)
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem
}

    .login-logo .ico {
        width: 42px;
        height: 42px;
        background: var(--accent);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 22px
    }

    .login-logo h1 {
        font-size: 20px;
        font-weight: 700;
        color: var(--text)
    }

    .login-logo span {
        font-size: 12px;
        color: var(--text2);
        display: block
    }

.role-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    background: var(--surface3);
    padding: 4px;
    border-radius: 8px
}

.role-tab {
    flex: 1;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    transition: all .2s
}

    .role-tab.active {
        background: var(--surface);
        color: var(--text);
        box-shadow: var(--shadow)
    }

.field {
    margin-bottom: 1rem
}

    .field label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text2);
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: .5px
    }

    .field input, .field select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 14px;
        background: var(--surface2);
        color: var(--text);
        outline: none;
        transition: border .2s
    }

        .field input:focus, .field select:focus {
            border-color: var(--accent);
            background: var(--surface)
        }

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.btn-primary {
    background: var(--accent);
    color: #fff
}

    .btn-primary:hover {
        background: #2563eb
    }

.btn-success {
    background: var(--accent-2);
    color: #fff;
    font-family: 'Roboto Condensed';
    padding: 6px;
    margin: 0px 10px;
}

    .btn-success:hover {
        background: #059669
    }

.btn-danger {
    background: var(--danger);
    color: #fff
}

    .btn-danger:hover {
        background: #dc2626
    }

.btn-ghost {
    border-radius: 7px !important;
    background: red;
    color: #ffffff;
    font-size: 14px !important;
    font-family: sans-serif;
    padding: 5px 6px !important;
    font-weight: 550;
    text-transform: uppercase;
}

    .btn-ghost:hover {
        background: var(--surface3)
    }

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 230px !important;
    background: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: 10px
}

    .sidebar-logo .ico {
        width: 34px;
        height: 34px;
        background: var(--accent);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px
    }

    .sidebar-logo span {
        font-size: 14px;
        font-weight: 700
    }

    .sidebar-logo small {
        font-size: 10px;
        opacity: .6;
        display: block
    }

.nav {
    flex: 1;
    padding: .75rem 0;
    overflow-y: auto
}


.nav-section {
    font-size: 10px;
    font-weight: 600;
    opacity: .4;
    padding: .5rem 1rem .25rem;
    text-transform: uppercase;
    letter-spacing: .8px
}


.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .625rem 1rem;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
    border-left: 3px solid transparent;
}

    .nav-item:hover {
        background: rgba(255,255,255,.06);
        opacity: 1
    }

    .nav-item.active {
        background: rgba(59,130,246,.2);
        opacity: 1;
        color: var(--accent)
    }


    .nav-item i {
        font-size: 16px;
        min-width: 20px
    }

.sidebar-user {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: 12px
}

    .sidebar-user .name {
        font-weight: 600;
        opacity: .9
    }

    .sidebar-user .role-badge {
        font-size: 10px;
        background: rgba(59,130,246,.3);
        color: #93c5fd;
        padding: 2px 8px;
        border-radius: 20px;
        display: inline-block;
        margin-top: 3px
    }

.content {
    margin-left: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50
}

    .topbar h2 {
        font-size: 17px;
        font-weight: 600
    }

.main {
    padding: 1.5rem;
    flex: 1
}

/* CARDS */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 20px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text)
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 1rem;
    margin-bottom: 1.5rem
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem
}

.stat-val {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1
}

.stat-lbl {
    font-size: 12px;
    color: var(--text2);
    margin-top: 4px
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: .75rem
}

.icon-blue {
    background: #dbeafe;
    color: #2563eb
}

.icon-green {
    background: #d1fae5;
    color: #059669
}

.icon-amber {
    background: #fef3c7;
    color: #d97706
}

.icon-red {
    background: #fee2e2;
    color: #dc2626
}

.icon-purple {
    background: #ede9fe;
    color: #7c3aed
}

/* TABLE */
.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th {
    text-align: left;
    padding: 10px 12px;
    background: var(--surface3);
    color: var(--text2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle
}

tr:hover td {
    background: var(--surface2)
}

tr:last-child td {
    border-bottom: none
}

.badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500
}

.badge-green {
    background: #d1fae5;
    color: #065f46
}

.badge-red {
    background: #fee2e2;
    color: #991b1b
}

.badge-amber {
    background: #fef3c7;
    color: #92400e
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af
}

.badge-gray {
    background: var(--surface3);
    color: var(--text2)
}

/* FORMS */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.form-grid-3 {
    grid-template-columns: 1fr 1fr 1fr
}

.span2 {
    grid-column: span 2
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px
}

    .form-group label {
        font-size: 12px;
        font-weight: 600;
        color: var(--text2);
        text-transform: uppercase;
        letter-spacing: .4px
    }

    .form-group input, .form-group select, .form-group textarea {
        padding: 9px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 13px;
        background: var(--surface);
        color: var(--text);
        outline: none;
        transition: border .2s;
        font-family: inherit
    }

        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            border-color: var(--accent)
        }

/* ATTENDANCE */
.att-grid {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 6px;
    margin-top: .75rem
}

.att-day {
    padding: 8px 4px;
    border-radius: 6px;
    text-align: center;
    font-size: 11px;
    border: 1px solid var(--border)
}

    .att-day.present {
        background: #d1fae5;
        border-color: #a7f3d0;
        color: #065f46
    }

    .att-day.absent {
        background: #fee2e2;
        border-color: #fecaca;
        color: #991b1b
    }

    .att-day.half {
        background: #fef3c7;
        border-color: #fde68a;
        color: #92400e
    }

    .att-day.weekend {
        background: var(--surface3);
        color: var(--text3)
    }

    .att-day.future {
        background: var(--surface2);
        color: var(--text3);
        border-style: dashed
    }

.att-day-num {
    font-weight: 600;
    font-size: 13px
}

.att-day-st {
    font-size: 9px;
    margin-top: 2px
}

/* SALARY SLIP */
.slip {
    max-width: 640px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden
}

.slip-header {
    background: var(--primary);
    color: #fff;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem
}

    .slip-header .company {
        font-size: 18px;
        font-weight: 700
    }

    .slip-header .sub {
        font-size: 12px;
        opacity: .7
    }

.slip-body {
    padding: 1.5rem
}

.slip-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden
}

.slip-section-head {
    background: var(--surface3);
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text2)
}

.slip-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px
}

    .slip-row:last-child {
        border-bottom: none
    }

.slip-total {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    border-radius: var(--radius)
}

.slip-employee-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: 1rem;
    font-size: 12px
}

.slip-info-row {
    display: flex;
    gap: 6px
}

    .slip-info-row .lbl {
        color: var(--text2);
        min-width: 110px
    }

/* BIOMETRIC */
.bio-punch {
    text-align: center;
    padding: 2rem
}

.bio-clock {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -2px;
    font-family: monospace
}

.bio-date {
    color: var(--text2);
    font-size: 14px;
    margin: .25rem 0 1.5rem
}

.punch-btns {
    display: flex;
    gap: 1rem;
    justify-content: center
}

.punch-btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-lg)
}

.finger-icon {
    font-size: 48px;
    color: var(--text3);
    margin: 1rem 0
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem
}

    .modal-header h3 {
        font-size: 16px;
        font-weight: 600
    }

.modal-footer {
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
    margin-top: 1.5rem
}

/* LEAVE */
.leave-status-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem
}

.leave-stat {
    flex: 1;
    background: var(--surface3);
    border-radius: var(--radius);
    padding: .875rem;
    text-align: center
}

.leave-stat-val {
    font-size: 24px;
    font-weight: 700
}

.leave-stat-lbl {
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px
}

/* ADVANCE */
.advance-summary {
    background: linear-gradient(135deg,#1e3a5f,#0f172a);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center
}

    .advance-summary .val {
        font-size: 26px;
        font-weight: 700
    }

    .advance-summary .lbl {
        font-size: 12px;
        opacity: .7
    }

/* ALERT */
.alert {
    padding: .875rem 1rem;
    border-radius: var(--radius);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0
}

.flex {
    display: flex
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.gap8 {
    gap: 8px
}

.gap12 {
    gap: 12px
}

.mb1 {
    margin-bottom: 1rem
}

.mt1 {
    margin-top: 1rem
}

.text-sm {
    font-size: 13px
}

.text-xs {
    font-size: 12px
}

.text-muted {
    color: var(--text2)
}

.font-bold {
    font-weight: 600
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0
}

@media print {
    .layout, .sidebar, .topbar, .btn, .modal-overlay {
        display: none !important
    }

    .slip {
        max-width: 100%;
        box-shadow: none
    }
}




.btn.btn-primary {
    background: linear-gradient(135deg, #007989, #02444d) !important;
    color: white !important;
    font-weight: 500;
    padding: 6px 10px;
    border: none !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Roboto Condensed';
}

    .btn.btn-primary:hover {
        background: linear-gradient(135deg, #4338ca, #4f46e5) !important;
        color: white !important;
        transform: translateY(-2px); /* Halka sa upar uthega */
        box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    }

    .btn.btn-primary:active {
        transform: translateY(0);
    }
