:root {
    --primary: #2563EB;
    --secondary: #38BDF8;
    --accent: #7C3AED;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F8FAFC;
    --bg-dark: #0F172A;
    --text: #0F172A;
    --text-muted: #64748B;
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.25);
    --nav-height: 72px;
    --radius: 24px;
    --gradient: linear-gradient(135deg, #2563EB, #4F46E5, #7C3AED);
}

[data-theme="dark"] {
    --bg: #0F172A;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(15, 23, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    min-height: 100vh;
}

/* Animated gradient background */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--gradient);
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
}

.animated-bg::before,
.animated-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: float 10s ease-in-out infinite;
}

.animated-bg::before {
    width: 320px;
    height: 320px;
    background: #38BDF8;
    top: 10%;
    left: 10%;
}

.animated-bg::after {
    width: 280px;
    height: 280px;
    background: #F472B6;
    bottom: 15%;
    right: 10%;
    animation-delay: -4s;
}

/* Employee mobile: coastal sky atmosphere */
.mobile-frame .animated-bg {
    animation: none;
    background:
        radial-gradient(ellipse 90% 55% at 0% 0%, rgba(125, 211, 252, 0.45), transparent 50%),
        radial-gradient(ellipse 70% 50% at 100% 20%, rgba(14, 165, 233, 0.35), transparent 48%),
        linear-gradient(165deg, #0C4A7A 0%, #1B6CA8 38%, #0EA5E9 78%, #38BDF8 100%);
}

.mobile-frame .animated-bg::before {
    background: #7DD3FC;
    top: -8%;
    left: -12%;
    opacity: 0.5;
    filter: blur(90px);
    animation-duration: 14s;
}

.mobile-frame .animated-bg::after {
    background: #38BDF8;
    bottom: 8%;
    right: -16%;
    opacity: 0.5;
    filter: blur(90px);
    animation-duration: 14s;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.08); }
}

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes countPulse {
    0% { transform: scale(0.9); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.anim-fade-in { animation: fadeIn 0.5s ease forwards; }
.anim-slide-up { animation: slideUp 0.55s ease forwards; }

/* Glass */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

[data-theme="dark"] .glass-strong {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn-gradient {
    background: var(--gradient);
    border: none;
    color: #fff !important;
    border-radius: 16px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover,
.btn-gradient:focus {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
    color: #fff !important;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease;
}

.btn-glass:hover {
    transform: scale(1.03);
    color: var(--text);
}

/* Inputs */
.form-floating > .form-control,
.input-glass {
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    color: var(--text);
    backdrop-filter: blur(10px);
}

.form-floating > .form-control:focus,
.input-glass:focus {
    background: rgba(255, 255, 255, 0.35);
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.25);
    color: var(--text);
}

.input-icon-wrap {
    position: relative;
}

.input-icon-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
}

.input-icon-wrap .form-control {
    padding-left: 44px;
}

.input-icon-wrap.has-toggle .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 4px 8px;
    cursor: pointer;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--text);
}

.password-toggle i {
    position: static;
    transform: none;
}

/* Mobile frame */
.mobile-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
}

.mobile-frame {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
}

@media (min-width: 768px) {
    .mobile-shell {
        padding: 24px 0;
        align-items: center;
        min-height: 100vh;
    }

    .mobile-frame {
        height: calc(100vh - 48px);
        height: calc(100dvh - 48px);
        min-height: 0;
        max-height: 900px;
        border-radius: 36px;
        border: 8px solid rgba(15, 23, 42, 0.85);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
        overflow: hidden;
    }

    .mobile-frame .animated-bg {
        border-radius: 28px;
    }
}

.mobile-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 18px 18px calc(var(--nav-height) + 28px);
    font-family: 'Outfit', 'Poppins', sans-serif;
}

/* Bottom nav */
.bottom-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50;
    border-radius: 24px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] .bottom-nav {
    background: rgba(15, 23, 42, 0.88) !important;
}

.bottom-nav a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.2s, transform 0.2s, background 0.2s;
    padding: 8px 14px;
    border-radius: 16px;
    min-width: 72px;
}

.bottom-nav a i {
    font-size: 1.28rem;
    line-height: 1;
}

.bottom-nav a.active {
    color: #0369A1;
    background: rgba(14, 165, 233, 0.14);
    transform: translateY(-1px);
}

.bottom-nav a:hover {
    color: #0284C7;
    transform: translateY(-2px);
}

[data-theme="dark"] .bottom-nav a.active {
    color: #7DD3FC;
    background: rgba(56, 189, 248, 0.16);
}

/* —— Employee home —— */
.emp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.emp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.emp-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    animation: pulseSoft 3.2s ease-in-out infinite;
}

.emp-brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.emp-brand-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
}

.emp-top-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.emp-top-avatar:hover {
    transform: scale(1.05);
}

.emp-top-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.emp-greeting {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.emp-greeting-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
}

.emp-greeting-name {
    margin: 2px 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.emp-time-chip {
    padding: 10px 14px;
    border-radius: 16px;
    text-align: right;
    min-width: 96px;
    animation: fadeIn 0.6s ease;
}

.emp-time-value {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.1;
}

.emp-time-date {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.emp-here {
    position: relative;
    overflow: hidden;
    padding: 20px 18px;
    margin-bottom: 26px;
    border-radius: 22px;
}

.emp-here-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    right: -40px;
    top: -50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
    pointer-events: none;
}

.emp-here-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.emp-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: livePulse 1.8s ease-out infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.emp-here-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.emp-here-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.emp-here-code {
    margin-top: 6px;
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
}

[data-theme="dark"] .emp-here-code {
    background: rgba(56, 189, 248, 0.15);
    color: #7DD3FC;
}

.emp-section-head {
    margin-bottom: 14px;
}

.emp-section-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.emp-section-sub {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.emp-search .form-control {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .emp-search .form-control {
    background: rgba(15, 23, 42, 0.72) !important;
}

.emp-dept-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Department cards */
.dept-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 14px 12px;
    margin-bottom: 0;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
    text-decoration: none;
    color: inherit;
    font: inherit;
    text-align: left;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.78);
}

.dept-card:hover,
.dept-card:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.dept-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

.dept-meta {
    flex: 1;
    min-width: 0;
}

.dept-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    color: var(--text);
}

.dept-code {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.dept-go {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.dept-card:hover .dept-go {
    background: #0EA5E9;
    color: #fff;
    transform: translateX(2px);
}

[data-theme="dark"] .dept-go {
    background: rgba(56, 189, 248, 0.15);
    color: #7DD3FC;
}

.dept-card .arrow {
    margin-left: auto;
    color: var(--text-muted);
}

.search-box {
    border-radius: 18px !important;
    padding: 0.95rem 1rem 0.95rem 2.75rem !important;
    font-size: 0.95rem;
}

.emp-empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--text-muted);
}

.emp-empty i {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.55;
    color: #0EA5E9;
}

.emp-empty p {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.emp-empty span {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
}

/* Employee page headers */
.emp-page-hero {
    margin-bottom: 20px;
}

.emp-page-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.emp-page-title {
    margin: 4px 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

.emp-page-sub {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

/* Profile */
.emp-profile-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 28px 18px 22px;
    margin-bottom: 16px;
}

.emp-profile-glow {
    position: absolute;
    inset: auto;
    width: 200px;
    height: 200px;
    left: 50%;
    top: -80px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent 70%);
    pointer-events: none;
}

.emp-photo-hint {
    margin: 12px 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.emp-profile-name {
    margin: 8px 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.emp-profile-id {
    margin: 2px 0 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.emp-info-card {
    padding: 6px 18px;
    margin-bottom: 14px;
}

.emp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 0.9rem;
}

.emp-info-row:last-child {
    border-bottom: none;
}

[data-theme="dark"] .emp-info-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.emp-info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.emp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.emp-action-btn {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 14px 16px !important;
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    font-weight: 600;
}

.emp-action-btn > i:first-child {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
    flex-shrink: 0;
}

.emp-action-btn > span {
    flex: 1;
}

.emp-action-chevron {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.emp-logout-btn {
    border-radius: 18px !important;
}

.location-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284C7;
    font-weight: 600;
    font-size: 0.88rem;
}

[data-theme="dark"] .location-pill {
    background: rgba(56, 189, 248, 0.15);
    color: var(--secondary);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, #0EA5E9, #2563EB);
    opacity: 0.45;
}

.timeline-item {
    position: relative;
    margin-bottom: 14px;
    padding: 16px 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -19px;
    top: 22px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0EA5E9;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

[data-theme="dark"] .timeline-item::before {
    border-color: #0F172A;
}

.timeline-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-to {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 6px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.timeline-from {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Admin layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

.admin-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-content {
    padding: 8px 28px 28px;
}

.stat-card {
    padding: 20px;
    height: 100%;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.3rem;
    background: var(--gradient);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    animation: countPulse 0.4s ease;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Office map — corporate floor plan */
.map-command {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    align-items: start;
}

@media (max-width: 1199px) {
    .map-command {
        grid-template-columns: 1fr;
    }
}

.map-brand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 22px;
    border-radius: 20px;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.85), rgba(124, 58, 237, 0.75));
    color: #fff;
    margin-bottom: 16px;
}

.map-brand-bar .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.map-brand-bar .brand-copy h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.map-brand-bar .brand-copy p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.82rem;
}

.map-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #bbf7d0;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

.map-live-pill .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: mapPulse 1.6s infinite;
}

@keyframes mapPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.map-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 1399px) {
    .map-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
    .map-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

.map-kpi {
    padding: 14px 16px;
    border-radius: 16px;
}

.map-kpi .kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.map-kpi .kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
}

.map-kpi .kpi-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.map-side-panel {
    padding: 16px;
    border-radius: 20px;
    max-height: calc(100vh - 220px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-side-panel .panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.map-directory {
    overflow-y: auto;
    flex: 1;
    margin-top: 12px;
    padding-right: 4px;
}

.map-dir-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
    margin-bottom: 6px;
}

.map-dir-item:hover,
.map-dir-item.active {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.18);
}

.map-dir-item img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.map-dir-item .dir-name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
}

.map-dir-item .dir-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.map-dir-item .dir-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94A3B8;
    flex-shrink: 0;
    margin-left: auto;
}

.map-dir-item .dir-status.online { background: #22C55E; }
.map-dir-item .dir-status.away { background: #F59E0B; }

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 10px 14px;
    margin-bottom: 12px;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-legend i.swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.office-map-wrap {
    padding: 14px;
    border-radius: 20px;
}

.office-map-wrap.is-fullscreen {
    border-radius: 0;
    padding: 20px 24px;
    background: var(--bg);
    overflow: auto;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.office-map-wrap.is-fullscreen .office-map-canvas {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
}

.office-map-wrap.is-fullscreen .map-room-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: minmax(240px, 1fr);
    gap: 18px;
    flex: 1;
    min-height: 0;
}

.office-map-wrap.is-fullscreen .map-floor-label {
    font-size: 0.95rem;
    padding: 12px 20px;
}

.office-map-wrap.is-fullscreen .map-room {
    min-height: 0;
    border-radius: 28px;
    border-top-width: 5px;
}

.office-map-wrap.is-fullscreen .map-room-header {
    padding: 16px 16px 12px;
}

.office-map-wrap.is-fullscreen .map-room-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 3;
}

.office-map-wrap.is-fullscreen .map-room-code {
    font-size: 0.78rem;
    margin-top: 6px;
}

.map-room-body {
    padding: 10px 12px 12px;
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: flex-start;
    align-items: stretch;
    gap: 8px;
}

.map-avatar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: var(--avatar-size, 42px);
    padding: 6px 10px 6px 6px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s, width 0.25s ease, height 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.85);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
}

.map-avatar:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    z-index: 3;
}

[data-theme="dark"] .map-avatar {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
    color: #F8FAFC;
}

.map-avatar img {
    width: var(--avatar-size, 42px);
    height: var(--avatar-size, 42px);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.map-avatar-name {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.72rem, 1.6cqi + 0.55rem, 1rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    text-align: left;
}

[data-theme="dark"] .map-avatar-name {
    color: #F8FAFC;
}

.map-avatar.moving {
    animation: pulseSoft 0.6s ease;
    z-index: 10;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45);
}

/* Fewer occupied rooms → larger photos */
.map-room-grid[data-rooms="1"] { --avatar-size: 72px; }
.map-room-grid[data-rooms="2"] { --avatar-size: 64px; }
.map-room-grid[data-rooms="3"] { --avatar-size: 58px; }
.map-room-grid[data-rooms="4"] { --avatar-size: 52px; }
.map-room-grid[data-rooms="5"],
.map-room-grid[data-rooms="6"] { --avatar-size: 48px; }
.map-room-grid[data-rooms="7"],
.map-room-grid[data-rooms="8"] { --avatar-size: 44px; }
.map-room-grid[data-rooms="9"],
.map-room-grid[data-rooms="10"],
.map-room-grid[data-rooms="11"],
.map-room-grid[data-rooms="12"] { --avatar-size: 40px; }

.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="1"] { --avatar-size: 96px; }
.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="2"] { --avatar-size: 84px; }
.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="3"] { --avatar-size: 72px; }
.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="4"] { --avatar-size: 64px; }
.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="5"],
.office-map-wrap.is-fullscreen .map-room-grid[data-rooms="6"] { --avatar-size: 56px; }

@container map-room (min-width: 320px) {
    .map-avatar img {
        width: max(var(--avatar-size, 42px), 52px);
        height: max(var(--avatar-size, 42px), 52px);
    }
}

@container map-room (min-width: 420px) {
    .map-avatar img {
        width: max(var(--avatar-size, 42px), 64px);
        height: max(var(--avatar-size, 42px), 64px);
    }
    .map-avatar-name {
        font-size: 0.95rem;
    }
}

@container map-room (min-width: 560px) {
    .map-avatar img {
        width: max(var(--avatar-size, 42px), 80px);
        height: max(var(--avatar-size, 42px), 80px);
    }
    .map-avatar-name {
        font-size: 1.05rem;
    }
}

.office-map-wrap.is-fullscreen .map-empty-room {
    font-size: 0.9rem;
    padding: 16px 0;
}

@media (max-width: 1200px) {
    .map-room-grid,
    .office-map-wrap.is-fullscreen .map-room-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-auto-rows: minmax(180px, auto);
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .map-room-grid,
    .office-map-wrap.is-fullscreen .map-room-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(160px, auto);
    }
}

.office-map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

/* Premium live floor canvas — 6 columns × 5 rows */
.office-map-canvas {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow:
        0 20px 50px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(56, 189, 248, 0.28), transparent 55%),
        radial-gradient(ellipse 70% 45% at 90% 10%, rgba(124, 58, 237, 0.22), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(37, 99, 235, 0.18), transparent 55%),
        linear-gradient(160deg, #EEF2FF 0%, #F8FAFC 40%, #E0F2FE 100%);
}

[data-theme="dark"] .office-map-canvas {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(56, 189, 248, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 45% at 90% 10%, rgba(124, 58, 237, 0.2), transparent 50%),
        linear-gradient(160deg, #0B1220 0%, #111827 50%, #0F172A 100%);
}

.office-map-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

.map-room-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-auto-rows: minmax(200px, 1fr);
    gap: 16px;
    width: 100%;
    min-height: 520px;
    align-content: stretch;
}

.map-grid-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 280px;
    color: var(--text-muted);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.map-grid-empty i {
    font-size: 2rem;
    opacity: 0.5;
}

.map-floor-label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    width: fit-content;
    margin: 0;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
    font-family: 'Poppins', sans-serif;
}

[data-theme="dark"] .map-floor-label {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

.map-floor-label .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: mapPulse 1.6s infinite;
}

.map-room {
    position: relative;
    width: auto;
    min-height: 0;
    height: 100%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-top: 3px solid var(--room-accent, #2563EB);
    padding: 0;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(255, 255, 255, 0.55) 100%
    );
    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    z-index: 2;
    color: var(--text);
    container-type: size;
    container-name: map-room;
}

[data-theme="dark"] .map-room {
    background: linear-gradient(
        165deg,
        rgba(30, 41, 59, 0.85) 0%,
        rgba(15, 23, 42, 0.7) 100%
    );
    border-color: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

.map-room:hover,
.map-room.highlighted {
    transform: translateY(-4px) scale(1.015);
    box-shadow:
        0 22px 44px rgba(37, 99, 235, 0.22),
        0 0 0 1px rgba(37, 99, 235, 0.25);
    z-index: 8;
}

.map-room.occupied {
    box-shadow:
        0 12px 32px rgba(34, 197, 94, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.map-room.at-capacity {
    box-shadow:
        0 12px 32px rgba(239, 68, 68, 0.16),
        0 0 0 1px rgba(239, 68, 68, 0.25);
}

.map-room-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
}

[data-theme="dark"] .map-room-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.map-room-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text) !important;
    font-family: 'Poppins', sans-serif;
}

.map-room-title i {
    color: var(--room-accent, #2563EB);
    margin-right: 4px;
}

.map-room-code {
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.map-room-count {
    flex-shrink: 0;
    min-width: 32px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff !important;
    padding: 0 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    font-family: 'Poppins', sans-serif;
}

.map-empty-room {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: normal;
    padding: 8px 0;
    font-family: 'Poppins', sans-serif;
}

.employee-detail-card .detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 0.85rem;
}

.employee-detail-card .detail-row:last-child {
    border-bottom: none;
}

.employee-detail-card .detail-label {
    color: var(--text-muted);
}

/* Tables */
.table-glass {
    --bs-table-bg: transparent;
}

.table-glass th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom-width: 1px;
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.badge-soft {
    border-radius: 10px;
    padding: 6px 10px;
    font-weight: 500;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

.page-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: none;
    cursor: pointer;
}

.notification-dropdown {
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 32px 28px;
}

.logo-mark {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: #fff;
}

@media (max-width: 991px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
    }

    .admin-sidebar.open {
        left: 0;
    }

    .admin-content,
    .admin-topbar {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Utility */
.text-white-soft { color: rgba(255, 255, 255, 0.9); }
.cursor-pointer { cursor: pointer; }
