@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-base: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-color-glow: rgba(37, 99, 235, 0.2);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --color-primary: #2563eb;
    --color-secondary: #7c3aed;
    --color-accent: #db2777;
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    --grad-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-dark: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

    --glass-blur: blur(8px);
    --shadow-main: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 8px -1px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 12px rgba(37, 99, 235, 0.1);
    
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(124, 58, 237, 0.02) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Glass panel style */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar backdrop overlay for mobile drawer view */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar Styling - Premium clean white sidebar with right border */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform 0.3s ease;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: var(--grad-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.brand-title h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-title span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-top: -2px;
}

/* Navigation Links */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-item.active a, .nav-item a:hover {
    color: var(--color-primary);
    background: #f1f5f9;
}

.nav-item.active a {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0%, rgba(124, 58, 237, 0.03) 100%);
    border-color: rgba(37, 99, 235, 0.15);
    font-weight: 600;
}

.nav-item.active a i {
    color: var(--color-primary);
    transform: scale(1.1);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Active User Info in Sidebar */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}

.user-badge-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.user-badge-info h4 {
    font-size: 13px;
    font-weight: 600;
}

.user-badge-info span {
    font-size: 11px;
    color: var(--color-primary);
    display: block;
}

/* Main Content Area */
.main-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Header Component */
.header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left h2 {
    font-size: 20px;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Premium Floating Role Switcher */
.role-switcher-container {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 16px 4px 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-switcher-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-left: 8px;
}

.role-select {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
}

.role-select option {
    background: #ffffff;
    color: var(--text-primary);
}

.notification-bell {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.notification-bell:hover {
    color: var(--text-primary);
    background: #e2e8f0;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* Dashboard Views Container */
.content-body {
    padding: 32px;
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

/* SPA Sections Transitions */
.view-section {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
    display: block;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card KPI Grids */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-details h5 {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.kpi-details h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.up {
    color: var(--color-success);
}
.kpi-trend.down {
    color: var(--color-danger);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--color-primary);
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.08);
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

/* General Layout Dashboard */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .dashboard-row {
        grid-template-columns: 1fr !important;
    }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.btn-card-action {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-card-action:hover {
    background: #f1f5f9;
    border-color: var(--color-primary);
}

/* Charts styles */
.chart-container {
    height: 280px;
    width: 100%;
    position: relative;
}

/* Table Style UI */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    background: #f8fafc;
}

.custom-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.custom-table tbody tr {
    transition: background 0.2s ease;
}

.custom-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

/* Badge styles */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-new { background: rgba(37, 99, 235, 0.08); color: var(--color-primary); border: 1px solid rgba(37, 99, 235, 0.15); }
.badge-contacted { background: rgba(124, 58, 237, 0.08); color: var(--color-secondary); border: 1px solid rgba(124, 58, 237, 0.15); }
.badge-interested { background: rgba(245, 158, 11, 0.08); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.15); }
.badge-followup { background: rgba(219, 39, 119, 0.08); color: var(--color-accent); border: 1px solid rgba(219, 39, 119, 0.15); }
.badge-admission { background: rgba(16, 185, 129, 0.08); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.15); }
.badge-nointerest, .badge-invalid { background: rgba(239, 68, 68, 0.08); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.15); }

/* Buttons Custom */
.btn-primary {
    background: var(--grad-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #f8fafc;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 40px 20px;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 580px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 28px;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Input Fields Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
    background: #ffffff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Lead CRM Dashboard layout split */
.crm-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

@media (max-width: 1000px) {
    .crm-layout {
        grid-template-columns: 1fr;
    }
}

.crm-filter-bar {
    padding: 20px;
    height: fit-content;
}

/* Interactive WhatsApp interface */
.whatsapp-grid {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    height: 600px;
    overflow: hidden;
}

@media (max-width: 1200px) {
    .whatsapp-grid {
        grid-template-columns: 280px 1fr;
    }
    .whatsapp-details-panel {
        display: none;
    }
}

.whatsapp-chat-list {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.whatsapp-details-panel {
    min-height: 0;
}

.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.chat-search-bar {
    position: relative;
    margin-top: 10px;
}

.chat-items {
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.chat-item:hover, .chat-item.active {
    background: #f8fafc;
}

.chat-item.active {
    border-left: 3px solid var(--color-primary);
    background: rgba(37, 99, 235, 0.04);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.chat-name-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.chat-name-time h4 {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-name-time span {
    font-size: 10px;
    color: var(--text-muted);
}

.chat-last-msg {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* WhatsApp Main Window */
.whatsapp-chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #f1f5f9;
}

.chat-window-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-active-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-active-actions {
    display: flex;
    gap: 12px;
    font-size: 18px;
    color: var(--text-secondary);
}

.chat-active-actions i {
    cursor: pointer;
    transition: color 0.2s;
}

.chat-active-actions i:hover {
    color: var(--color-primary);
}

.chat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.2s ease forwards;
}

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

.message-incoming {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.message-outgoing {
    align-self: flex-end;
    background: #dbeafe;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-bottom-right-radius: 2px;
    color: #1e3a8a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.message-time {
    display: block;
    text-align: right;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-input-bar {
    padding: 14px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-input-field {
    flex-grow: 1;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 13px;
}

.chat-input-actions {
    display: flex;
    gap: 12px;
    font-size: 18px;
    color: var(--text-secondary);
}

.chat-input-actions i {
    cursor: pointer;
}

.chat-input-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad-primary);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

/* Live GIS Tracking Module Map */
.map-canvas-container {
    width: 100%;
    height: 480px;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.map-mock-canvas {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
}

.map-sidebar-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    width: 250px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.map-search-employee {
    margin-bottom: 12px;
}

.map-employee-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 6px;
    font-size: 12px;
    transition: background 0.2s ease;
    color: var(--text-secondary);
}

.map-employee-item:hover, .map-employee-item.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--color-primary);
}

.map-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-success);
}

.map-status-dot.offline {
    background: var(--text-muted);
}

/* Selfie Attendance Web Camera Module */
.attendance-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .attendance-layout {
        grid-template-columns: 1fr;
    }
}

.webcam-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.webcam-viewport {
    width: 100%;
    max-width: 360px;
    height: 270px;
    border-radius: 12px;
    background: #e2e8f0;
    border: 2px dashed rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webcam-viewport.camera-active {
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.webcam-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: none;
}

.webcam-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

.webcam-placeholder i {
    font-size: 40px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.webcam-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    pointer-events: none;
    display: none;
}

.webcam-scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
    animation: scannerMotion 2s linear infinite;
    display: none;
}

@keyframes scannerMotion {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.attendance-logs {
    padding: 20px;
}

.selfie-thumbnail {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Leave Desk Gauge Balance UI */
.leave-gauges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 800px) {
    .leave-gauges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.leave-gauge-card {
    padding: 16px;
    text-align: center;
}

.gauge-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    position: relative;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-progress-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gauge-value {
    font-size: 20px;
    font-weight: 800;
}

.gauge-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Uploader UI Styles */
.file-upload-drag {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.file-upload-drag:hover {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, 0.02);
}

.file-upload-drag i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload-preview {
    display: none;
    margin-top: 14px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    align-items: center;
    justify-content: space-between;
}

/* Payslip dynamic PDF preview */
.payslip-preview-container {
    background: #ffffff;
    color: #1e293b;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: 'Plus Jakarta Sans', sans-serif;
    border: 1px solid #e2e8f0;
}

.payslip-preview-container h2, 
.payslip-preview-container h3, 
.payslip-preview-container h4 {
    color: #0f172a;
}

.payslip-header-pdf {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.payslip-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 13px;
    margin-bottom: 24px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 20px;
}

.payslip-meta-item strong {
    color: #475569;
}

.payslip-table-pdf {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.payslip-table-pdf th {
    background: #f1f5f9;
    padding: 10px;
    font-size: 12px;
    text-transform: uppercase;
    text-align: left;
    color: #475569;
}

.payslip-table-pdf td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.payslip-table-pdf tr.total-row {
    font-weight: 700;
}

.payslip-table-pdf tr.total-row td {
    border-top: 2px solid #e2e8f0;
    border-bottom: 2px double #e2e8f0;
}

.payslip-footer-pdf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    font-size: 12px;
    color: #64748b;
}

.payslip-sign {
    border-top: 1px solid #cbd5e1;
    width: 180px;
    text-align: center;
    padding-top: 8px;
    margin-top: 30px;
}

/* Kanban task lists */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    padding: 16px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.kanban-col-title {
    font-size: 14px;
    font-weight: 700;
}

.kanban-col-count {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    overflow-y: auto;
}

.kanban-card {
    padding: 14px;
    cursor: grab;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
}

.kanban-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.kanban-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
}

/* Floating Toast Notification Center */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    color: var(--text-primary);
}

@keyframes slideIn {
    to { transform: translateX(0); }
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.info { border-left: 4px solid var(--color-primary); }
.toast.warning { border-left: 4px solid var(--color-warning); }
.toast.danger { border-left: 4px solid var(--color-danger); }

.toast-content h5 {
    font-size: 13px;
    font-weight: 700;
}

.toast-content p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* General Page controls layout details */
.filter-row-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input-wrapper input {
    padding-left: 38px;
}

/* ==========================================
   CRM MOBILE RESPONSIVENESS OVERRIDES
   ========================================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        overflow-x: hidden;
    }
    
    .mobile-sidebar-toggle {
        display: block !important;
    }
    
    .header {
        padding: 0 16px !important;
    }
}

@media (max-width: 768px) {
    /* WhatsApp Mobile Stacking */
    .whatsapp-grid {
        grid-template-columns: 1fr !important;
        height: calc(100vh - 180px) !important;
        min-height: 480px !important;
    }
    
    .whatsapp-chat-window {
        display: none;
        height: 100% !important;
        min-height: 0 !important;
    }
    
    .whatsapp-grid.show-chat .whatsapp-chat-list {
        display: none !important;
    }
    
    .whatsapp-grid.show-chat .whatsapp-chat-window {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
    }
    
    .mobile-chat-back {
        display: flex !important;
    }
    
    .chat-messages-container {
        min-height: 0 !important;
    }
    
    .content-body {
        padding: 12px !important;
    }
    
    .role-switcher-label {
        display: none !important;
    }
    
    .role-switcher-container {
        padding: 4px 8px !important;
    }
    
    /* Login Overlay Responsive scaling */
    #login-overlay .glass-panel {
        padding: 24px 20px !important;
        width: 92% !important;
        margin: 0 auto;
    }
}

