/* ==========================================================================
   NORIT CSS DESIGN SYSTEM - STYLED IN METICULOUS "FLUX" FRAME LAYOUT
   ========================================================================== */

/* Theme Variables Definition */
:root {
    /* Fonts */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Theme-independent layout tokens */
    --sidebar-collapsed-width: 86px;
    --sidebar-expanded-width: 270px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    --transition-spring: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* Outer canvas background matching the photo */
    --canvas-bg: #C3E9A2;
}

/* Dark Mode Tokens (Default) */
html[data-theme="dark"] {
    --bg-primary: #0f1013;      /* fondo1 (sleek dark matte gray) */
    --bg-secondary: #181a1f;    /* fondo2 (slate card background) */
    --bg-card-dark: #111216;    /* sleep/income card background */
    --text-primary: #FFFFFF;
    --text-secondary: #98a2b3;  /* clean neutral gray */
    
    /* Interactive Elements */
    --btn-positive: #B1DB13;    /* botones_aceptar (lime green accent) */
    --btn-negative: #98a2b3;    /* boton_cancelar */
    --btn-neutral: #242730;     /* botones_neutros (dark gray) */
    --text-success: #B1DB13;    /* lime green for dark mode contrast */
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: #B1DB13;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    
    /* Overlapping chart layers */
    --color-redes: #7f56d9;     /* Sophisticated violet-gray */
    --color-cctv: #344054;      /* Slate gray */
    --color-nube: #B1DB13;      /* Lime green */
    
    --input-bg: rgba(255, 255, 255, 0.04);
    --input-focus-border: rgba(177, 219, 19, 0.5);
}

/* Light Mode Tokens */
html[data-theme="light"] {
    --bg-primary: #E3DEE1;      /* fondo1 */
    --bg-secondary: #FFFFFF;    /* fondo2 (clean solid white card background for premium contrast) */
    --bg-card-dark: #E2DFB2;
    --text-primary: #000E39;
    --text-secondary: #5C5E6B;
    
    /* Interactive Elements */
    --btn-positive: #B1DB13;    /* botones_aceptar */
    --btn-negative: #8F8F54;    /* boton_cancelar (light) */
    --btn-neutral: #B1B187;     /* botones_neutros (light) */
    --text-success: #3b4b00;    /* Dark olive green for high contrast on light backgrounds */
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-accent: #8F8F54;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    
    /* Overlapping chart layers */
    --color-redes: #8D72E1;
    --color-cctv: #D2D2A2;
    --color-nube: #B1DB13;
    
    --input-bg: rgba(0, 0, 0, 0.03);
    --input-focus-border: rgba(143, 143, 84, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    background-color: var(--canvas-bg);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 0;
}

/* Frame Mockup Layout (Matches the screenshot with the thick dark border bezel) */
.browser-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background-color: #0c0d12; /* Bezel frame dark background */
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition-spring);
}

/* Dashboard Inner Wrapper */
.dashboard-wrapper {
    display: flex;
    background-color: var(--bg-primary);
    border-radius: 0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    position: relative;
    border: none;
}

/* ==========================================================================
   SIDEBAR (MENU LATERAL) STYLING - DETAILED COLLAPSIBLE & HOVER TRANSITION
   ========================================================================== */
.sidebar {
    width: var(--sidebar-collapsed-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-spring);
    overflow: hidden;
}

/* Sidebar Hover Expansion state */
.sidebar:hover {
    width: var(--sidebar-expanded-width);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

/* Sidebar Logo */
.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    margin-bottom: 30px;
    overflow: hidden;
}

.sidebar .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f2ffb3 0%, #b1db13 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000E39;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(177, 219, 19, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.sidebar .logo-icon svg {
    width: 22px;
    height: 22px;
}

.sidebar .logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), max-width 0.3s ease;
    white-space: nowrap;
    max-width: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
}

.sidebar:hover .logo-text {
    opacity: 1;
    transform: translateX(0);
    max-width: 200px;
    overflow: visible;
}

/* Sidebar Navigation Items */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
}

.sidebar-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    height: 48px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition-spring);
    padding: 0 12px;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-spring);
}

.sidebar-nav .nav-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-nav .nav-label {
    margin-left: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

/* Hover expansion activates labels */
.sidebar:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar navigation item states */
.sidebar-nav li.active .nav-item {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.sidebar-nav li.active .nav-icon {
    transform: scale(1.05);
}

.sidebar-nav li:not(.active) .nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Sidebar Badges (Dashboard notifications numbers) */
.sidebar-nav .nav-badge {
    position: absolute;
    right: 12px;
    background-color: var(--btn-positive);
    color: #000E39;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition-spring);
}

.sidebar-nav .nav-badge.neutral {
    background-color: var(--btn-neutral);
    color: #FFFFFF;
}

.sidebar:hover .nav-badge {
    opacity: 1;
    transform: scale(1);
}

/* Promo Card in Sidebar (Upgrade now in screenshot, customized for AI activation) */
.sidebar-promo {
    margin-top: auto;
    width: 100%;
    overflow: hidden;
    opacity: 0;
    height: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.35s ease, height 0.35s ease;
}

.sidebar:hover .sidebar-promo {
    opacity: 1;
    height: 160px;
    transform: translateY(0);
}

.promo-card {
    background: linear-gradient(135deg, #B1DB13 0%, #76A60B 100%);
    border-radius: 20px;
    padding: 16px;
    color: #000E39;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(177, 219, 19, 0.15);
}

.promo-content h3 {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.promo-content p {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
    line-height: 1.3;
    margin-bottom: 12px;
    max-width: 80%;
}

.promo-graphic {
    position: absolute;
    right: -10px;
    bottom: 25px;
    opacity: 0.18;
    transform: rotate(15deg);
    color: #000;
}

.promo-graphic svg {
    width: 60px;
    height: 60px;
}

.promo-btn {
    width: 100%;
    background-color: #000E39;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    height: 36px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-spring);
}

.promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    background-color: #09133a;
}


/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
    height: 100vh;
}

/* ==========================================================================
   TOPBAR STYLING
   ========================================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

/* User Profile (Left side of topbar in screenshot style) */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
}

.user-profile:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
}

.user-profile .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile .user-email {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.user-profile .user-arrow {
    color: var(--text-secondary);
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
}

.user-profile .user-arrow svg {
    width: 14px;
    height: 14px;
}

/* Topbar Actions Group */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Bar (Rounded text input) */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.search-bar .search-icon svg {
    width: 16px;
    height: 16px;
}

.search-bar input {
    width: 100%;
    height: 40px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 16px 0 40px;
    font-family: var(--font-primary);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-spring);
}

.search-bar input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 10px rgba(177, 219, 19, 0.15);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Round Icon Buttons (Notifications, Settings, Theme) */
.icon-btn {
    width: 40px;
    height: 40px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    transition: var(--transition-spring);
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: scale(1.03);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.icon-btn .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--btn-positive);
    color: #000E39;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

/* Date Selector Filter Widget */
.date-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    height: 40px;
    padding: 0 16px;
}

.date-selector .current-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.85;
}

.date-selector .select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background-color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
}

.date-selector .select-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.date-selector .select-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.date-selector .select-arrow {
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.date-selector .select-arrow svg {
    width: 12px;
    height: 12px;
}


/* ==========================================================================
   PAGE VIEWS & CONTAINERS
   ========================================================================== */
.page-container {
    display: none;
    animation: fadeIn 0.4s ease-out;
    position: relative;
    min-height: 100%;
}

.page-container.active {
    display: block;
    position: relative;
}

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

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-header p {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.8;
}


/* ==========================================================================
   DASHBOARD GRID & METRIC CARDS
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
}

/* Card Base Structure */
.card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-spring);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* Card Zoom/Maximized Focus Mode */
.card.maximized {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    z-index: 2000 !important;
    margin: 0 !important;
    background-color: var(--bg-secondary) !important;
    border: 2px solid var(--btn-positive) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    transform: none !important;
    transition: var(--transition-spring);
    animation: zoomInCard 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto !important;
}

.card.maximized #tech-map {
    height: 380px !important;
}

.card.maximized .action-dots-btn,
.card.maximized .card-header-actions .action-dots-btn {
    color: var(--btn-positive) !important;
}

.card.maximized .card-header-actions {
    padding-right: 50px !important;
}

@keyframes zoomInCard {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Card Header with three dots action */
.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-actions h2 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-title-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.action-dots-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    opacity: 0.6;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.action-dots-btn:hover {
    opacity: 1;
}

.action-dots-btn svg {
    width: 16px;
    height: 16px;
}

/* Badges for trends */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.badge-accent {
    background-color: var(--btn-positive);
    color: #000E39;
}

/* Large Sales Distribution Card (Energy Used) */
.card-large {
    grid-column: span 1;
    grid-row: span 2;
}

.chart-summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 24px;
}

.chart-summary .chart-total-value {
    color: var(--text-primary);
}

.chart-summary .chart-total-value .number {
    font-size: 28px;
    font-weight: 700;
}

.chart-summary .chart-total-value .unit {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
    margin-left: 2px;
}

/* ==========================================================================
   CSS MASTERCLASS: OVERLAPPING CIRCLES CHART (Identical to screenshot)
   ========================================================================== */
.donut-chart-container {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}

.overlapping-circles {
    position: relative;
    width: 180px;
    height: 180px;
}

/* Shared circle styles */
.circle-layer {
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.circle-layer:hover {
    transform: scale(1.05);
    z-index: 10;
}

.circle-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #FFFFFF;
}

.circle-inner .value {
    font-size: 20px;
    font-weight: 700;
}

.circle-inner .label {
    font-size: 9px;
    font-weight: 500;
    opacity: 0.75;
}

/* Violet Circle (Redes - Large) */
.layer-violet {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    left: 0;
    top: 10px;
    z-index: 1;
}

/* Dark Slate Circle (CCTV - Medium) */
.layer-dark {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #1b264f 0%, #0c132e 100%);
    right: 0;
    top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 2;
}

/* Lime Green Circle (Nube - Small) */
.layer-lime {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #B1DB13 0%, #85aa08 100%);
    bottom: 0;
    left: 54px;
    z-index: 3;
}

.layer-lime .circle-inner {
    color: #000E39;
}

/* Progress rows under chart */
.progress-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 90px;
}

.progress-bar-wrapper {
    flex: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
}

.bar-violet { background-color: #a29bfe; }
.bar-dark { background-color: #3b4269; }
.bar-lime { background-color: var(--btn-positive); }

.progress-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    width: 25px;
    text-align: right;
}

/* Column Gap layout for two smaller cards stacked */
.column-gap {
    display: flex;
    flex-direction: column;
    grid-gap: 20px;
}

/* Card Small Metrics (Heart rate, Activity) */
.card-small {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.citas-value-group, .actividad-value-group {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    margin-bottom: 10px;
}

.number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.unit {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 4px;
}

.citas-sub-value, .actividad-sub-value {
    text-align: right;
}

.citas-sub-value .label, .actividad-sub-value .label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.citas-sub-value .val, .actividad-sub-value .val {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Sparkline graphic for trend visual */
.sparkline-container {
    height: 35px;
    width: 100%;
    margin-top: auto;
}

.sparkline-chart {
    width: 100%;
    height: 100%;
}

.heart-icon {
    color: #FF5A5F !important;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Wellness Index (Calificación General - Grid Dots in photo) */
.card-wellness {
    grid-column: span 1;
}

.percentage-symbol {
    width: 24px;
    height: 24px;
    background-color: var(--btn-neutral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
}

.wellness-value-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.wellness-main-value .number {
    font-size: 34px;
}

/* Matrix Dot Chart Grid layout */
.dot-matrix-chart {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-gap: 8px;
    justify-content: space-between;
    margin-top: 10px;
}

.dot-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.06);
}

.dot.active {
    background-color: #A29BFE;
}

/* Column colors in dot matrix matching the mock index dots */
.dot-col:nth-child(even) .dot.active {
    background-color: #B1DB13;
}

.dot-col:nth-child(3) .dot.active, .dot-col:nth-child(8) .dot.active {
    background-color: #FFFFFF;
}


/* ==========================================================================
   SLEEP ANALYSIS CARD (Horizontal Deep Dark metric row - bottom right)
   ========================================================================== */
.card-sleep {
    grid-column: span 2;
    background-color: var(--bg-secondary);
}

.card-sleep h2 {
    color: var(--text-primary);
}

.sleep-select-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--text-primary);
}

.sleep-select-label {
    font-size: 11px;
    font-weight: 600;
}

.sleep-arrow svg {
    width: 10px;
    height: 10px;
}

.sleep-stats-wrapper {
    display: flex;
    gap: 40px;
    margin-top: 16px;
    margin-bottom: 24px;
}

.sleep-stat {
    display: flex;
    flex-direction: column;
}

.sleep-stat-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sleep-stat-heading .bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.bullet-lime { background-color: var(--btn-positive); }
.bullet-violet { background-color: #A29BFE; }

.sleep-stat-heading .label {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.85;
}

.sleep-stat-value {
    color: var(--text-primary);
}

.sleep-stat-value .number {
    font-size: 26px;
    color: var(--text-primary);
}

.sleep-stat-value .unit {
    color: var(--text-secondary);
}

.sleep-stat .sub-label {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
}

/* Bottom Bar Pillars Charts */
.bar-chart-container {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-secondary);
    opacity: 0.75;
    height: 100px;
    padding-bottom: 20px;
}

.bar-chart {
    flex: 1;
    display: flex;
    justify-content: space-between;
    height: 100px;
    align-items: flex-end;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 32px;
    gap: 8px;
}

.bar-group {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 70px;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    width: 6px;
    border-radius: 3px;
    transition: height 0.4s ease;
}

.bar-bg { background-color: rgba(162, 155, 254, 0.15); }
.bar-bg-2 { background-color: rgba(162, 155, 254, 0.08); }

.bar-lime { background-color: var(--btn-positive); box-shadow: 0 4px 10px rgba(177, 219, 19, 0.3); }
.bar-violet { background-color: #A29BFE; box-shadow: 0 4px 10px rgba(162, 155, 254, 0.3); }

.bar-label {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.bar-column.active .bar-label {
    opacity: 1;
    font-weight: 700;
    color: var(--text-primary);
}


/* ==========================================================================
   SUB-PAGES DETAILED STYLING - COTIZACIONES, CITAS, ASISTENCIA, FINANZAS, NOTIFICACIONES
   ========================================================================== */

/* Custom Inputs and Selects */
.custom-select, .custom-input {
    width: 100%;
    height: 40px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0 12px;
    font-family: var(--font-primary);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-spring);
}

.custom-select:focus, .custom-input:focus {
    border-color: var(--border-accent);
}

/* Cotizaciones View */
.cotizaciones-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-card {
    padding: 18px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cotizaciones-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-gap: 20px;
}

@media (max-width: 1024px) {
    .cotizaciones-grid {
        grid-template-columns: 1fr;
    }
}

.product-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.product-item-row:last-child {
    border-bottom: none;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 75%;
}

.product-meta .p-brand {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--btn-positive);
    letter-spacing: 0.5px;
}

.product-meta .p-model {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.product-meta .p-desc {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.8;
}

.product-price-action {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-price-action .p-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.add-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    background-color: var(--btn-neutral);
    color: #FFFFFF;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-spring);
}

.add-btn:hover {
    background-color: var(--btn-positive);
    color: #000E39;
    transform: scale(1.05);
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-primary);
}

.cart-item .qty {
    color: var(--btn-positive);
    font-weight: 700;
    margin-right: 6px;
}

.cart-item .name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}

.cart-item .cost {
    font-weight: 600;
}

/* Alert warning */
.alert-box {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.4;
}

.alert-warning {
    background-color: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.25);
    color: #FFAA00;
}

.cart-total-section {
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.total-row.bold {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.lime-text {
    color: var(--btn-positive) !important;
}

.red-text {
    color: #FF5A5F !important;
}

.freeze-note {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    text-align: center;
    margin-top: 8px;
}

/* Citas Layout */
.citas-layout {
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-gap: 20px;
}

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

.gps-widget-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.current-schedule-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.current-schedule-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.gps-coordinates {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-size: 12px;
    color: var(--text-primary);
}

.gps-actions-row {
    display: flex;
    gap: 12px;
}

.clockin-btn, .clockout-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-spring);
}

.clockin-btn {
    background-color: var(--btn-positive);
    color: #000E39;
}

.clockout-btn {
    background-color: var(--btn-negative);
    color: #000E39;
}

.clockin-btn:hover:not(:disabled), .clockout-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.clockin-btn:disabled, .clockout-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gps-log {
    font-size: 11px;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    min-height: 36px;
    display: flex;
    align-items: center;
}

/* Tables styling */
.citas-table-wrapper, .asistencia-table-wrapper, .fin-table-wrapper {
    overflow-x: auto;
}

.citas-table, .asistencia-table, .fin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.citas-table th, .citas-table td,
.asistencia-table th, .asistencia-table td,
.fin-table th, .fin-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-primary);
}

.citas-table th, .asistencia-table th, .fin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.c-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.badge-warning { background-color: rgba(255, 170, 0, 0.12); color: #FFAA00; }
.badge-progress { background-color: rgba(162, 155, 254, 0.15); color: #A29BFE; }
.badge-success { background-color: rgba(177, 219, 19, 0.12); color: var(--btn-positive); }

.badge-checked {
    font-size: 11px;
    font-weight: 600;
    color: var(--btn-positive);
}

/* RH & Asistencia View */
.hr-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .hr-stats-row {
        grid-template-columns: 1fr;
    }
}

.hr-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.hr-stat-card h3 {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hr-stat-card .val {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 6px;
}

.colab-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.colab-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.mono {
    font-family: monospace;
    font-size: 11px;
    opacity: 0.85;
}

.pay-btn {
    background-color: var(--btn-neutral);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-spring);
}

.pay-btn:hover {
    background-color: var(--btn-positive);
    color: #000E39;
    transform: translateY(-1px);
}

/* Finanzas Layout */
.finanzas-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .finanzas-stats-grid {
        grid-template-columns: 1fr;
    }
}

.fin-card {
    padding: 20px;
}

.fin-card h3 {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fin-card .val {
    font-size: 22px;
    font-weight: 700;
    margin-top: 6px;
}

.fin-card.income .val { color: var(--btn-positive); }
.fin-card.expenses .val { color: #FF5A5F; }

.trend {
    font-size: 10px;
    display: block;
    margin-top: 4px;
    opacity: 0.85;
}

.trend.positive { color: var(--btn-positive); }
.trend.negative { color: #FF5A5F; }

.type-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}

.type-badge.income { background-color: rgba(177, 219, 19, 0.12); color: var(--btn-positive); }
.type-badge.expense { background-color: rgba(255, 90, 95, 0.12); color: #FF5A5F; }
.type-badge.payroll { background-color: rgba(162, 155, 254, 0.15); color: #A29BFE; }

.view-doc-link {
    color: var(--text-secondary);
    text-decoration: underline;
    font-size: 12px;
}

.view-doc-link:hover {
    color: var(--text-primary);
}

/* Notificaciones Layout */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.alert-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: var(--border-radius-md);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    transition: var(--transition-spring);
}

.alert-item:hover {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.alert-item.unread {
    border-left: 3px solid var(--btn-positive);
    background-color: rgba(177, 219, 19, 0.02);
}

.alert-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.alert-icon-wrapper.warning { background-color: rgba(255, 170, 0, 0.1); color: #FFAA00; }
.alert-icon-wrapper.success { background-color: rgba(177, 219, 19, 0.1); color: var(--btn-positive); }

.alert-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.alert-body p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.alert-time {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 2px;
}


/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-sleep {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
        background-color: var(--bg-primary);
    }

    .browser-container {
        border-radius: 0;
        padding: 0;
        border: none;
    }

    .dashboard-wrapper {
        border-radius: 0;
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        width: 100% !important;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        overflow: visible !important;
    }

    .sidebar:hover {
        width: 100%;
    }

    .sidebar .logo-text, .sidebar-nav .nav-label, .sidebar-promo {
        display: none !important;
    }

    .sidebar-nav {
        overflow: visible !important;
    }

    .sidebar-nav ul {
        display: flex;
        justify-content: space-around;
        overflow: visible !important;
    }

    .sidebar-nav li {
        margin-bottom: 0;
        overflow: visible !important;
    }

    .sidebar-nav .nav-item {
        position: relative !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px !important;
        overflow: visible !important;
    }

    .sidebar-nav .nav-badge {
        opacity: 1 !important;
        transform: scale(1) !important;
        position: absolute !important;
        top: -6px !important;
        right: -8px !important;
        left: auto !important;
        width: 18px !important;
        height: 18px !important;
        font-size: 9px !important;
        border: 2px solid var(--bg-primary) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        z-index: 100 !important;
    }

    .main-content {
        padding: 16px;
        max-height: none;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .topbar-actions {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .search-bar {
        flex-grow: 1;
        width: auto;
        min-width: 120px;
    }

    .icon-btn {
        flex-shrink: 0 !important;
    }

    .date-selector {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        display: flex;
        align-items: center;
    }
    
    .date-selector .current-date {
        white-space: nowrap !important;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .card-large, .card-sleep {
        grid-column: span 1;
    }
}

/* ==========================================================================
   HIGH-CONTRAST TEXT & UI ACCENTS (SPEEDTEST, FINANCIALS & RH)
   ========================================================================== */
.card h2, 
.card h3,
.speedtest-results-card h2, 
.speedtest-main-card h2, 
.active-techs-card h2 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    opacity: 0.98 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.stats-list span {
    color: var(--text-primary) !important;
    font-weight: 500;
    opacity: 0.95;
}

.stats-list strong {
    font-weight: 700;
    opacity: 1;
}

#tech-realtime-list strong {
    color: var(--text-primary) !important;
    font-weight: 600;
    opacity: 0.98;
}

#tech-realtime-list span {
    font-weight: 700 !important;
}

/* Custom shadow glow for logo details */
.logo-text img {
    transition: filter 0.3s ease;
}
.sidebar:hover .logo-text img {
    filter: none !important;
}

/* ==========================================================================
   RESPONSIVE FORMS FOR CLIENT PROFILE & DOMICILIO (MOBILE-FIRST SYSTEM)
   ========================================================================== */
.responsive-form-row {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.responsive-form-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.responsive-gps-block {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 12px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.responsive-gps-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

@media (max-width: 768px) {
    .responsive-form-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .responsive-form-col {
        width: 100% !important;
        flex: none !important;
        min-width: 100% !important;
    }
    
    .responsive-gps-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .responsive-gps-row button {
        width: 100% !important;
        justify-content: center !important;
        height: 38px !important;
        font-size: 12px !important;
    }
    
    .responsive-gps-row div {
        text-align: center !important;
        width: 100% !important;
        margin-top: 2px !important;
        font-size: 11px !important;
        padding: 6px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.client-portal-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 15px;
    align-items: start;
    width: 100%;
}

@media (max-width: 768px) {
    .client-portal-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }
    
    .client-portal-layout > div {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   COTIZACIONES MOBILE RESPONSIVE SYSTEM
   ========================================================================== */
.mobile-cart-toggle-bar {
    display: none;
}

.add-btn {
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .mobile-cart-toggle-bar {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .cotizaciones-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    
    .cotizaciones-grid > .card-list {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .cotizaciones-grid > .card-cart {
        display: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Toggle state when showing budget summary / cart */
    .show-cart-mode .card-list,
    .show-cart-mode #equipos-filters-card,
    .show-cart-mode #mano-obra-filters-card {
        display: none !important;
    }
    
    .show-cart-mode .card-cart {
        display: flex !important;
    }
}

/* ==========================================================================
   AVANCE DE OBRA MOBILE LAYOUT & HELP SYSTEM
   ========================================================================== */
.avance-obra-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    align-items: start;
    width: 100%;
}

@media (max-width: 768px) {
    .avance-obra-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 15px !important;
    }
    
    .timeline-card {
        order: 2 !important;
        width: 100% !important;
    }
    
    .sidebar-info-card {
        order: 1 !important;
        width: 100% !important;
    }
}

.help-circle-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 210, 255, 0.15);
    color: #00D2FF;
    border: 1px solid rgba(0, 210, 255, 0.4);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

.help-circle-btn:hover {
    background: #00D2FF;
    color: #000E39;
}

/* AI Message Bubble Styling */
.ai-msg-assistant {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: #FFFFFF;
    border-radius: 8px;
    border-top-left-radius: 0;
    padding: 8px 10px;
    align-self: flex-start;
    max-width: 85%;
    line-height: 1.4;
    word-break: break-word;
}

.ai-msg-user {
    background: var(--btn-positive);
    color: #000E39;
    border-radius: 8px;
    border-top-right-radius: 0;
    padding: 8px 10px;
    align-self: flex-end;
    max-width: 85%;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.pulse-green {
    width: 6px;
    height: 6px;
    background-color: var(--btn-positive);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 1.2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.85); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0.5; }
}

/* Expanded Map & Route Details styling */
.map-card-expanded {
    position: fixed !important;
    top: 5% !important;
    left: 5% !important;
    width: 90% !important;
    height: 90% !important;
    z-index: 9999 !important;
    background: rgba(10, 16, 35, 0.96) !important;
    backdrop-filter: blur(25px) !important;
    border: 2px solid #00D2FF !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Theme-specific Payroll & HR Subtitle green colors */
.nomina-subtitle {
    color: #3b4b00; /* Dark green for light mode contrast */
}
html[data-theme="dark"] .nomina-subtitle {
    color: var(--btn-positive); /* Bright lime green for dark mode contrast */
}

/* Premium Responsive Login Page */
.login-responsive-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #E3E1E1;
    padding: 20px;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

.login-card-wrapper {
    width: 100%;
    max-width: 460px;
    background: rgba(13, 20, 38, 0.65);
    border: 1.5px solid rgba(0, 210, 255, 0.15);
    border-radius: 24px;
    padding: 35px 30px;
    box-sizing: border-box;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card-wrapper:hover {
    border-color: rgba(0, 210, 255, 0.3);
    box-shadow: 0 30px 65px rgba(0, 210, 255, 0.08), 0 20px 45px rgba(0, 0, 0, 0.7);
}

@media (max-width: 500px) {
    .login-card-wrapper {
        padding: 20px 15px;
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .login-responsive-container {
        background: #E3E1E1;
    }
}



/* ==========================================================================
   AUTOCOMPLETE DROPDOWN & SEARCH AUTO-SUGGEST LISTS
   ========================================================================== */
#autocomplete-dropdown, #mano-obra-dropdown {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    margin-top: 4px;
}

.autocomplete-item {
    color: var(--text-primary) !important;
    background-color: var(--bg-secondary) !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.autocomplete-item strong {
    color: var(--btn-positive) !important; /* Highlights model in lime green */
}

.autocomplete-item:hover {
    background-color: rgba(177, 219, 19, 0.1) !important; /* Premium soft lime background glow */
    color: var(--text-primary) !important;
    padding-left: 18px !important; /* Elegant micro-slide interaction */
}

.autocomplete-item:last-child {
    border-bottom: none !important;
}

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.8; }
}
