/* ==========================================================================
   Davomad & KPI — premium dizayn tizimi
   ========================================================================== */

:root {
    --kpi-navy: #0b1220;
    --kpi-navy-2: #151f38;
    --kpi-primary: #4f46e5;
    --kpi-primary-dark: #3f37c9;
    --kpi-primary-light: #eef0ff;
    --kpi-success: #059669;
    --kpi-success-light: #e7f8f1;
    --kpi-warning: #d97706;
    --kpi-warning-light: #fef6e7;
    --kpi-danger: #e11d48;
    --kpi-danger-light: #fdedf0;
    --kpi-info: #0891b2;
    --kpi-info-light: #e7f7fa;
    --kpi-bg: #f3f5fa;
    --kpi-surface: #ffffff;
    --kpi-border: #e7e9f2;
    --kpi-text: #1c2233;
    --kpi-text-muted: #6b7280;
    --kpi-radius-lg: 18px;
    --kpi-radius: 14px;
    --kpi-radius-sm: 10px;
    --kpi-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --kpi-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -10px rgba(15, 23, 42, .14);
    --kpi-shadow-lg: 0 20px 44px -16px rgba(15, 23, 42, .28);
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--kpi-navy);
}

body {
    min-height: 100%;
    background: var(--kpi-bg);
    color: var(--kpi-text);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--kpi-primary); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; }

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--kpi-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .7);
    flex-shrink: 0;
}

#btnInstallApp {
    border-radius: 999px;
    font-weight: 700;
    font-size: .82rem;
}

.offcanvas-bottom {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Offcanvas/modal doimiy pastki panel (emp-bottom-nav) ustida ochilishi kerak */
.offcanvas { z-index: 1080 !important; }
.offcanvas-backdrop { z-index: 1075 !important; }
.modal { z-index: 1080 !important; }
.modal-backdrop { z-index: 1075 !important; }
.offcanvas-body { padding-bottom: calc(1rem + 92px + env(safe-area-inset-bottom)); }

/* ---------------- Cards ---------------- */
.card, .stat-card {
    border: none;
    border-radius: var(--kpi-radius);
    box-shadow: var(--kpi-shadow);
    background: var(--kpi-surface);
    color: var(--kpi-text);
}

.card-body { padding: 1.25rem 1.35rem; }

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--kpi-text);
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.icon-tint-primary { background: var(--kpi-primary-light); color: var(--kpi-primary); }
.icon-tint-success { background: var(--kpi-success-light); color: var(--kpi-success); }
.icon-tint-warning { background: var(--kpi-warning-light); color: var(--kpi-warning); }
.icon-tint-danger { background: var(--kpi-danger-light); color: var(--kpi-danger); }
.icon-tint-info { background: var(--kpi-info-light); color: var(--kpi-info); }

.section-title {
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}

.section-title i { color: var(--kpi-primary); }

/* ---------------- Buttons ---------------- */
.btn {
    border-radius: var(--kpi-radius-sm);
    font-weight: 600;
    letter-spacing: -.005em;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, filter .12s ease;
}

.btn:active { transform: scale(.98); }

.btn-primary {
    background: var(--kpi-primary);
    border-color: var(--kpi-primary);
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--kpi-primary-dark);
    border-color: var(--kpi-primary-dark);
}

.btn-success { background: var(--kpi-success); border-color: var(--kpi-success); box-shadow: 0 6px 16px -6px rgba(5, 150, 105, .5); }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-danger { background: var(--kpi-danger); border-color: var(--kpi-danger); box-shadow: 0 6px 16px -6px rgba(225, 29, 72, .5); }
.btn-danger:hover { background: #be123c; border-color: #be123c; }
.btn-outline-secondary { border-color: var(--kpi-border); color: var(--kpi-text-muted); }
.btn-outline-primary { color: var(--kpi-primary); border-color: var(--kpi-primary); }
.btn-outline-primary:hover { background: var(--kpi-primary); border-color: var(--kpi-primary); }

.checkin-btn {
    font-size: 1.15rem;
    font-weight: 800;
    padding: 20px 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}

/* ---------------- Forms ---------------- */
.form-control, .form-select {
    border-radius: var(--kpi-radius-sm);
    border-color: var(--kpi-border);
    padding: .55rem .85rem;
    font-size: .92rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--kpi-primary);
    box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15);
}

.form-label { font-weight: 600; font-size: .85rem; color: var(--kpi-text); margin-bottom: .35rem; }

/* ---------------- Tables ---------------- */
.table-responsive {
    background: var(--kpi-surface);
    border-radius: var(--kpi-radius);
    box-shadow: var(--kpi-shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table { margin-bottom: 0; }

.table thead th {
    background: #f8f9fd;
    color: var(--kpi-text-muted);
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .05em;
    font-weight: 700;
    border-bottom: 1px solid var(--kpi-border);
    padding: .85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--kpi-border);
    font-size: .9rem;
}

.table tbody tr:last-child td { border-bottom: none; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: #fbfbfe; }
.table tbody tr:hover > * { background-color: var(--kpi-primary-light); }

.table-clickable tbody tr { cursor: pointer; }

/* ---------------- Badges (soft chips) ---------------- */
.badge {
    font-weight: 700;
    font-size: .72rem;
    padding: .4em .7em;
    border-radius: 999px;
    letter-spacing: .01em;
}

.status-badge-present { background: var(--kpi-success-light) !important; color: var(--kpi-success) !important; }
.status-badge-late { background: var(--kpi-warning-light) !important; color: var(--kpi-warning) !important; }
.status-badge-early { background: var(--kpi-warning-light) !important; color: var(--kpi-warning) !important; }
.status-badge-absent { background: var(--kpi-danger-light) !important; color: var(--kpi-danger) !important; }

/* ---------------- Login ---------------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(79, 70, 229, .35), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(139, 92, 246, .3), transparent 45%),
        linear-gradient(160deg, var(--kpi-navy), var(--kpi-navy-2));
    padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}

.login-wrap { width: 100%; max-width: 420px; }

.login-card {
    border: none;
    border-radius: 22px;
    box-shadow: var(--kpi-shadow-lg);
    overflow: hidden;
}

.login-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--kpi-primary), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .6);
}

/* ---------------- Misc ---------------- */
.gps-status { font-size: .88rem; font-weight: 600; min-height: 1.3em; }

.session-row-time { font-variant-numeric: tabular-nums; font-weight: 600; }

.modal-content { border: none; border-radius: var(--kpi-radius); box-shadow: var(--kpi-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--kpi-border); }
.modal-footer { border-top: 1px solid var(--kpi-border); }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: #cfd4e4; border-radius: 8px; }

/* ==========================================================================
   Xodim uchun "field app" — to'q (dark) mobil dashboard
   ========================================================================== */

.emp-install-btn {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top));
    right: 14px;
    z-index: 1060;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.emp-dark-page {
    background: radial-gradient(circle at 12% 8%, rgba(34, 211, 238, .10), transparent 40%),
                radial-gradient(circle at 88% 18%, rgba(94, 234, 212, .08), transparent 40%),
                var(--kpi-navy);
    min-height: 100vh;
    color: #e6ebf5;
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
}

body.emp-dark-page > .container-fluid.app-content {
    padding-top: calc(1rem + env(safe-area-inset-top)) !important;
    padding-bottom: 1rem;
}

/* ---- Umumiy komponentlarni to'q tema uchun moslashtirish (admin + xodim) ---- */
.emp-dark-page .card,
.emp-dark-page .stat-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    color: #e6ebf5;
    backdrop-filter: blur(6px);
}

.emp-dark-page h1, .emp-dark-page h2, .emp-dark-page h3,
.emp-dark-page h4, .emp-dark-page h5, .emp-dark-page h6,
.emp-dark-page .stat-card .value {
    color: #fff;
}

.emp-dark-page .text-muted { color: rgba(255, 255, 255, .55) !important; }
.emp-dark-page .section-title { color: #fff; }
.emp-dark-page .section-title i { color: #5eead4; }

.emp-dark-page .table-responsive {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: none;
}

.emp-dark-page .table {
    --bs-table-bg: transparent;
    --bs-table-color: rgba(255, 255, 255, .85);
    --bs-table-striped-bg: rgba(255, 255, 255, .04);
    --bs-table-striped-color: rgba(255, 255, 255, .85);
    --bs-table-hover-bg: rgba(94, 234, 212, .08);
    --bs-table-hover-color: rgba(255, 255, 255, .95);
    --bs-table-active-bg: rgba(255, 255, 255, .06);
    --bs-table-active-color: rgba(255, 255, 255, .9);
    --bs-table-border-color: rgba(255, 255, 255, .08);
}

.emp-dark-page .table thead th {
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .5);
    border-bottom-color: rgba(255, 255, 255, .08);
}

.emp-dark-page .table tbody td {
    color: rgba(255, 255, 255, .85);
    border-bottom-color: rgba(255, 255, 255, .06);
}

.emp-dark-page .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255, 255, 255, .03); }
.emp-dark-page .table tbody tr:hover > * { background-color: rgba(94, 234, 212, .08); }

.emp-dark-page .form-control,
.emp-dark-page .form-select {
    background-color: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .14);
    color: #fff;
    color-scheme: dark;
}

.emp-dark-page .form-control::placeholder { color: rgba(255, 255, 255, .35); }

.emp-dark-page .form-control:focus,
.emp-dark-page .form-select:focus {
    background-color: rgba(255, 255, 255, .08);
    border-color: #5eead4;
    box-shadow: 0 0 0 .2rem rgba(94, 234, 212, .15);
    color: #fff;
}

.emp-dark-page .form-select option { color: #1c2233; }
.emp-dark-page .form-label { color: rgba(255, 255, 255, .8); }
.emp-dark-page .form-check-label { color: rgba(255, 255, 255, .8); }

.emp-dark-page .icon-tint-primary { background: rgba(79, 70, 229, .2); color: #a5b4fc; }
.emp-dark-page .icon-tint-success { background: rgba(5, 150, 105, .2); color: #6ee7b7; }
.emp-dark-page .icon-tint-warning { background: rgba(217, 119, 6, .2); color: #fcd34d; }
.emp-dark-page .icon-tint-danger { background: rgba(225, 29, 72, .2); color: #fda4af; }
.emp-dark-page .icon-tint-info { background: rgba(8, 145, 178, .2); color: #67e8f9; }

.emp-dark-page .btn-outline-secondary { border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .8); }
.emp-dark-page .btn-outline-secondary:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.emp-dark-page .btn-outline-primary { color: #5eead4; border-color: #5eead4; }
.emp-dark-page .btn-outline-primary:hover { background: #5eead4; border-color: #5eead4; color: #04202b; }
.emp-dark-page .btn-outline-danger { color: #fda4af; border-color: #fda4af; }
.emp-dark-page .btn-outline-danger:hover { background: #e11d48; border-color: #e11d48; color: #fff; }

.emp-dark-page .status-badge-present { background: rgba(5, 150, 105, .18) !important; color: #6ee7b7 !important; }
.emp-dark-page .status-badge-late,
.emp-dark-page .status-badge-early { background: rgba(217, 119, 6, .18) !important; color: #fcd34d !important; }
.emp-dark-page .status-badge-absent { background: rgba(225, 29, 72, .18) !important; color: #fda4af !important; }

.emp-dark-page .table-success { --bs-table-bg: rgba(5, 150, 105, .18); --bs-table-color: #6ee7b7; --bs-table-striped-bg: rgba(5, 150, 105, .18); --bs-table-striped-color: #6ee7b7; --bs-table-border-color: rgba(255, 255, 255, .08); color: #6ee7b7; }
.emp-dark-page .table-danger { --bs-table-bg: rgba(225, 29, 72, .18); --bs-table-color: #fda4af; --bs-table-striped-bg: rgba(225, 29, 72, .18); --bs-table-striped-color: #fda4af; --bs-table-border-color: rgba(255, 255, 255, .08); color: #fda4af; }
.emp-dark-page .table-warning { --bs-table-bg: rgba(217, 119, 6, .18); --bs-table-color: #fcd34d; --bs-table-striped-bg: rgba(217, 119, 6, .18); --bs-table-striped-color: #fcd34d; --bs-table-border-color: rgba(255, 255, 255, .08); color: #fcd34d; }
.emp-dark-page .table-info { --bs-table-bg: rgba(8, 145, 178, .18); --bs-table-color: #67e8f9; --bs-table-striped-bg: rgba(8, 145, 178, .18); --bs-table-striped-color: #67e8f9; --bs-table-border-color: rgba(255, 255, 255, .08); color: #67e8f9; }

.emp-dark-page .alert-success { background: rgba(5, 150, 105, .15); color: #6ee7b7; border-color: rgba(5, 150, 105, .3); }
.emp-dark-page .alert-danger { background: rgba(225, 29, 72, .15); color: #fda4af; border-color: rgba(225, 29, 72, .3); }
.emp-dark-page .alert-warning { background: rgba(217, 119, 6, .15); color: #fcd34d; border-color: rgba(217, 119, 6, .3); }
.emp-dark-page .alert-info { background: rgba(8, 145, 178, .15); color: #67e8f9; border-color: rgba(8, 145, 178, .3); }

.emp-dark-page .form-check-input { background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.emp-dark-page .form-check-input:checked { background-color: var(--kpi-primary); border-color: var(--kpi-primary); }

.emp-dark-page .nav-pills .nav-link { color: rgba(255, 255, 255, .65); background: rgba(255, 255, 255, .05); border-radius: var(--kpi-radius-sm); }
.emp-dark-page .nav-pills .nav-link.active { background: var(--kpi-primary); color: #fff; }

.emp-dark-page .modal-content { background: #101a30; color: #e6ebf5; border: 1px solid rgba(255, 255, 255, .08); }
.emp-dark-page .modal-header, .emp-dark-page .modal-footer { border-color: rgba(255, 255, 255, .08); }
.emp-dark-page .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.emp-dark-page .offcanvas { background: #101a30; color: #e6ebf5; }
.emp-dark-page .offcanvas-header,
.emp-dark-page .list-group-item {
    background: transparent;
    color: #e6ebf5;
    border-color: rgba(255, 255, 255, .08);
}
.emp-dark-page .list-group-item-action:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.emp-dark-page .list-group-item.active { background: rgba(94, 234, 212, .15); color: #5eead4; border-color: rgba(94, 234, 212, .3); }

.emp-dark-page a { color: #5eead4; }
.emp-dark-page #locationMap { border: 1px solid rgba(255, 255, 255, .12); }

.emp-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
}

.emp-card-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .55);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.emp-hero {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.emp-avatar {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: linear-gradient(135deg, #22d3ee, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #04121a;
    flex-shrink: 0;
    box-shadow: 0 8px 20px -6px rgba(34, 211, 238, .5);
}

.emp-hero-name { font-weight: 800; font-size: 1.05rem; color: #fff; }
.emp-hero-sub { font-size: .8rem; color: rgba(255, 255, 255, .5); }
.emp-hero-info { flex: 1; min-width: 0; }
.emp-hero-balance { text-align: right; flex-shrink: 0; }
.emp-hero-balance-label { font-size: .62rem; color: rgba(255, 255, 255, .45); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.emp-hero-balance-value { font-size: .95rem; font-weight: 800; }

.rings-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    text-align: center;
}

.ring-wrap { position: relative; width: 100px; height: 100px; margin: 0 auto; }
.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ring-value { font-size: 1.1rem; font-weight: 800; color: #fff; }
.ring-label { font-size: .72rem; color: rgba(255, 255, 255, .55); margin-top: .4rem; font-weight: 600; }

.kpi-bar-row { margin-bottom: .8rem; }
.kpi-bar-row:last-child { margin-bottom: 0; }
.kpi-bar-labels { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: .35rem; }
.kpi-bar-labels .name { color: rgba(255, 255, 255, .75); font-weight: 600; }
.kpi-bar-labels .pct { color: #fff; font-weight: 700; }
.kpi-bar-track { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.kpi-bar-fill { height: 100%; border-radius: 999px; }

.emp-sessions-table { width: 100%; font-size: .82rem; color: rgba(255, 255, 255, .8); }
.emp-sessions-table th { color: rgba(255, 255, 255, .45); font-weight: 600; text-transform: uppercase; font-size: .65rem; letter-spacing: .04em; padding-bottom: .4rem; }
.emp-sessions-table td { padding: .3rem 0; border-top: 1px solid rgba(255, 255, 255, .06); }

/* ---- Davomad kalendari (oy panjarasi) ---- */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.cal-nav-title { font-weight: 800; font-size: .95rem; color: #fff; }
.cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.cal-nav-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.cal-legend { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem; font-size: .68rem; color: rgba(255, 255, 255, .6); }
.cal-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.cal-legend i { font-size: .6rem; }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.cal-dow {
    text-align: center;
    font-size: .62rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .4);
    text-transform: uppercase;
    padding-bottom: 3px;
}
.cal-cell {
    position: relative;
    min-height: 54px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 4px 3px;
    display: flex;
    flex-direction: column;
}
.cal-empty { background: transparent; border-color: transparent; }
.cal-future { opacity: .3; }
.cal-today { border-color: #5eead4; box-shadow: 0 0 0 1px #5eead4 inset; }
.cal-day-num { font-size: .68rem; font-weight: 700; color: rgba(255, 255, 255, .8); }

.cal-agg { display: flex; flex-direction: column; gap: 1px; margin-top: auto; font-size: .58rem; font-weight: 700; }
.cal-agg-present { color: #6ee7b7; }
.cal-agg-absent { color: #fda4af; }

.cal-status-full { background: rgba(5, 150, 105, .14); border-color: rgba(5, 150, 105, .3); }
.cal-status-partial { background: rgba(217, 119, 6, .14); border-color: rgba(217, 119, 6, .3); }
.cal-status-absent { background: rgba(225, 29, 72, .14); border-color: rgba(225, 29, 72, .3); }
.cal-status-not_workday { background: rgba(255, 255, 255, .015); opacity: .45; }

.cal-status-text { font-size: .56rem; color: rgba(255, 255, 255, .8); margin-top: auto; line-height: 1.15; font-weight: 600; }

.cal-penalty-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    background: none;
    border: none;
    color: #fbbf24;
    font-size: .75rem;
    padding: 2px;
    line-height: 1;
}

/* ---- Davr tanlash (period) pill'lari -- gorizontal skroll ---- */
.period-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .2rem;
    scrollbar-width: none;
}
.period-scroll::-webkit-scrollbar { display: none; }
.period-pill {
    flex-shrink: 0;
    padding: .45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .7);
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.period-pill:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.period-pill.active {
    background: var(--kpi-primary);
    border-color: var(--kpi-primary);
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(79, 70, 229, .6);
}

/* ---- Xodim bosh sahifasidagi aniq statistika kartochkalari (foiz emas) ---- */
.emp-stat-tile {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 1rem .6rem;
    text-align: center;
    height: 100%;
}
.emp-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .5rem;
    font-size: 1rem;
}
.emp-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
    line-height: 1.15;
}
.emp-stat-label {
    font-size: .66rem;
    color: rgba(255, 255, 255, .5);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: .3rem;
}

/* ---- Suzuvchi pastki panel (floating pill nav) ---- */
.emp-bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 1050;
    background: linear-gradient(160deg, #16233f, #0b1220);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 26px;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6);
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 10px 10px 8px;
    width: calc(100% - 28px);
    max-width: 420px;
}

.emp-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    color: rgba(255, 255, 255, .5);
    text-decoration: none;
    font-size: .64rem;
    font-weight: 700;
    padding: 4px 0;
}

.emp-tab i { font-size: 1.25rem; }
.emp-tab.active, .emp-tab:hover { color: #5eead4; }

.emp-center-btn {
    position: relative;
    top: -22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #04222b;
    font-size: 1.5rem;
    border: 4px solid #0b1220;
    flex-shrink: 0;
    background: radial-gradient(circle at 32% 28%, #6ee7f9, #0891b2 75%);
    box-shadow: 0 0 0 6px rgba(34, 211, 238, .14), 0 10px 22px -6px rgba(8, 145, 178, .7);
    animation: emp-pulse-checkin 2.2s ease-in-out infinite;
}

.emp-center-btn.state-checkout {
    background: radial-gradient(circle at 32% 28%, #fca5a5, #e11d48 75%);
    box-shadow: 0 0 0 6px rgba(225, 29, 72, .14), 0 10px 22px -6px rgba(225, 29, 72, .7);
    animation: emp-pulse-checkout 2.2s ease-in-out infinite;
}

.emp-center-label {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .62rem;
    font-weight: 800;
    white-space: nowrap;
    color: rgba(255, 255, 255, .7);
}

@keyframes emp-pulse-checkin {
    0%, 100% { box-shadow: 0 0 0 6px rgba(34, 211, 238, .14), 0 10px 22px -6px rgba(8, 145, 178, .7); }
    50% { box-shadow: 0 0 0 10px rgba(34, 211, 238, .05), 0 10px 22px -6px rgba(8, 145, 178, .7); }
}
@keyframes emp-pulse-checkout {
    0%, 100% { box-shadow: 0 0 0 6px rgba(225, 29, 72, .14), 0 10px 22px -6px rgba(225, 29, 72, .7); }
    50% { box-shadow: 0 0 0 10px rgba(225, 29, 72, .05), 0 10px 22px -6px rgba(225, 29, 72, .7); }
}

/* ---- Dumaloq (Face ID uslubidagi) selfie kamera oynasi ---- */
.emp-selfie-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(6, 10, 20, .97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 20px;
}

.emp-selfie-frame {
    width: min(70vw, 280px);
    height: min(70vw, 280px);
    border-radius: 50%;
    overflow: hidden;
    background: #000;
    border: 4px solid #5eead4;
    box-shadow: 0 0 0 8px rgba(94, 234, 212, .15), 0 25px 60px -20px rgba(0, 0, 0, .9);
    animation: emp-selfie-pulse 2.4s ease-in-out infinite;
}

.emp-selfie-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes emp-selfie-pulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(94, 234, 212, .15), 0 25px 60px -20px rgba(0, 0, 0, .9); }
    50% { box-shadow: 0 0 0 14px rgba(94, 234, 212, .06), 0 25px 60px -20px rgba(0, 0, 0, .9); }
}

.emp-selfie-hint {
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
}

.emp-selfie-capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #6ee7f9, #0891b2 75%);
    border: 4px solid #fff;
    color: #04222b;
    font-size: 1.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(8, 145, 178, .7);
}

.emp-selfie-capture-btn:active { transform: scale(.94); }

.emp-selfie-cancel-btn {
    position: absolute;
    top: calc(18px + env(safe-area-inset-top));
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.emp-gps-toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(108px + env(safe-area-inset-bottom));
    z-index: 1051;
    background: #0b1220;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: .5rem .9rem;
    font-size: .8rem;
    font-weight: 600;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
}

/* ---------------- Mobile ---------------- */
@media (max-width: 768px) {
    .container-fluid { padding-left: 14px; padding-right: 14px; }
    .card-body { padding: 1rem; }
    .stat-card .value { font-size: 1.4rem; }
    #locationMap { height: 240px !important; }
}

@media (max-width: 576px) {
    .checkin-btn { font-size: 1rem; padding: 16px 0; border-radius: 14px; }
    .table thead th, .table tbody td { padding: .6rem .7rem; font-size: .82rem; }
    .login-card .card-body { padding: 1.5rem 1.25rem !important; }
    h5 { font-size: 1.05rem; }
    .stat-card .value { font-size: 1.25rem; }
    /* Uzun formali modallar (masalan xodim qo'shish) mobilda ekran balandligidan
       oshib ketganda Bootstrap ularni tepaga yopishtirib qo'yadi -- bu esa
       telefon soat/signal/batareya panelining ustiga chiqib ketishiga sabab
       bo'ladi. Shu sababli modalga har doim xavfsiz zona (notch) uchun
       qo'shimcha tepa bo'shliq beriladi. */
    .modal-dialog { margin-top: calc(0.75rem + env(safe-area-inset-top)); margin-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
}

/* ---- Jadvallarni mobilda chap-o'ngga surmasdan, karta ko'rinishida to'liq ko'rsatish ---- */
@media (max-width: 767.98px) {
    .table-responsive { overflow-x: visible; }

    .rtable { width: 100%; }
    .rtable thead { display: none; }
    .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }

    .rtable tr {
        margin-bottom: .7rem;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 14px;
        padding: .3rem .85rem;
        background: rgba(255, 255, 255, .025);
        overflow: hidden;
        --bs-table-accent-bg: transparent;
        --bs-table-bg: transparent;
    }
    .rtable tr:last-child { margin-bottom: 0; }
    .rtable td { background-color: transparent !important; box-shadow: none !important; }

    .rtable td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .6rem;
        padding: .55rem 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
        text-align: right;
        white-space: normal;
    }
    .rtable td:last-child { border-bottom: none !important; }

    .rtable td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: .66rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: rgba(255, 255, 255, .45);
        text-align: left;
        flex-shrink: 0;
        margin-right: .5rem;
    }

    .rtable td:empty::before { display: none; }
}
