/* =============================================
   KVC OS - PREMIUM LIGHT DESIGN SYSTEM
   Brand: Kelly Valle Coach
   Theme: Clean Light + Cyan Accent
   ============================================= */

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

/* =============================================
   CSS VARIABLES - KVC LIGHT THEME
   ============================================= */
:root {
    /* --- KVC Brand Palette --- */
    --kvc-cyan:        #00ADDA;
    --kvc-cyan-dark:   #0092BB;
    --kvc-cyan-deeper: #006D8F;
    --kvc-cyan-light:  rgba(0, 173, 218, 0.10);
    --kvc-cyan-glow:   rgba(0, 173, 218, 0.20);
    --kvc-teal:        #327498;
    --kvc-teal-light:  rgba(50, 116, 152, 0.10);
    --kvc-navy:        #1A3545;

    /* --- Light Surface Palette --- */
    --bg-main:        #F0F8FC;   /* Ice-blue main background */
    --bg-card:        #FFFFFF;   /* Pure white cards */
    --bg-elevated:    #F5FAFD;   /* Slightly raised surfaces */
    --bg-glass:       rgba(255, 255, 255, 0.90);
    --bg-sidebar:     #FFFFFF;

    /* --- Borders --- */
    --border-color:   rgba(0, 173, 218, 0.15);
    --border-subtle:  rgba(50, 116, 152, 0.08);
    --border-strong:  rgba(0, 173, 218, 0.30);

    /* --- Text --- */
    --text-primary:   #0F2A3A;   /* Deep navy */
    --text-secondary: #4A7A95;   /* KVC teal */
    --text-muted:     #8AAFC4;   /* Soft blue-grey */

    /* --- Semantic --- */
    --primary:        var(--kvc-cyan);
    --primary-hover:  var(--kvc-cyan-dark);
    --primary-light:  var(--kvc-cyan-light);
    --secondary:      var(--kvc-teal);

    --success:  #059669;
    --warning:  #d97706;
    --danger:   #dc2626;
    --info:     #2563eb;

    /* --- Typography --- */
    --font-family: 'Inter', system-ui, sans-serif;

    --shadow-sm:  0 1px 3px rgba(15, 42, 58, 0.06), 0 1px 2px rgba(15, 42, 58, 0.04);
    --shadow-md:  0 4px 12px rgba(15, 42, 58, 0.08), 0 2px 6px rgba(15, 42, 58, 0.04);
    --shadow-lg:  0 12px 32px rgba(15, 42, 58, 0.12), 0 4px 12px rgba(15, 42, 58, 0.06);
    --shadow-cyan: 0 4px 16px rgba(0, 173, 218, 0.25);
    --glass-blur: blur(16px);

    --transition-fast:   0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    /* Subtle KVC background gradient */
    background-image:
        radial-gradient(ellipse at 10% 0%,   rgba(0, 173, 218, 0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 100%, rgba(50, 116, 152, 0.05) 0%, transparent 45%);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--kvc-cyan-dark); }

/* =============================================
   GLASSMORPHISM UTILITY
   ============================================= */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-bounce);
    outline: none;
    font-family: var(--font-family);
    letter-spacing: 0.2px;
    white-space: nowrap;
    transform-origin: center;
}
.btn:hover {
    transform: translateY(-2px) scale(1.02);
}
.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-large { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm    { padding: 6px 14px; font-size: 12px; }

.btn-primary {
    background: linear-gradient(135deg, var(--kvc-cyan) 0%, var(--kvc-cyan-dark) 100%);
    color: #fff;
    border-color: var(--kvc-cyan-dark);
    box-shadow: 0 3px 12px rgba(0, 173, 218, 0.30);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1AC0E8 0%, var(--kvc-cyan) 100%);
    box-shadow: 0 8px 24px rgba(0, 173, 218, 0.45);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-strong);
    color: var(--kvc-teal);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.20);
}
.btn-danger:hover {
    background: rgba(220, 38, 38, 0.14);
    transform: translateY(-1px);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
    flex-shrink: 0;
}
.btn-icon:hover {
    background: var(--kvc-cyan-light);
    color: var(--kvc-cyan);
    transform: scale(1.1) rotate(5deg);
}
.btn-icon:active {
    transform: scale(0.95);
}
.btn-icon i { font-size: 18px; transition: transform var(--transition-bounce); }

/* =============================================
   CHIPS / FILTERS
   ============================================= */
.filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-bounce);
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(15, 42, 58, 0.02);
}
.filter-chip:hover {
    background: var(--bg-elevated);
    border-color: rgba(0, 173, 218, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 173, 218, 0.08);
}
.filter-chip:active {
    transform: translateY(0) scale(0.98);
}
.filter-chip.active {
    background: var(--kvc-cyan-light);
    border-color: var(--kvc-cyan);
    color: var(--kvc-cyan-dark);
    box-shadow: 0 2px 6px rgba(0, 173, 218, 0.15);
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--kvc-cyan);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    height: 15px;
    min-width: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-card);
}

/* =============================================
   FORMS & INPUTS
   ============================================= */
/* Premium Custom Select */
.custom-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.custom-select-wrapper::after {
    content: '\25BC'; /* Down arrow */
    position: absolute;
    right: 12px;
    font-size: 10px;
    color: var(--text-muted);
    pointer-events: none;
    transition: transform var(--transition-fast);
}
.custom-select-wrapper:hover::after {
    color: var(--kvc-cyan);
}
.custom-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 32px 8px 14px;
    border-radius: 20px;
    font-family: var(--font-family);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(15, 42, 58, 0.03);
}
.custom-select:hover {
    border-color: rgba(0, 173, 218, 0.4);
    box-shadow: 0 3px 6px rgba(0, 173, 218, 0.08);
}
.custom-select:focus {
    border-color: var(--kvc-cyan);
    box-shadow: 0 0 0 3px rgba(0, 173, 218, 0.15);
}
.form-group { margin-bottom: 18px; }

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

.form-control {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 14px;
    transition: all var(--transition-fast);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    outline: none;
    border-color: var(--kvc-cyan);
    box-shadow: 0 0 0 3px rgba(0, 173, 218, 0.12);
    background: #fff;
}

/* =============================================
   LAYOUT
   ============================================= */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    width: 256px;
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(15, 42, 58, 0.06);
    transition: width 0.3s ease, margin-left 0.3s ease, opacity 0.3s ease;
}

.app-container.sidebar-collapsed .sidebar {
    margin-left: -256px;
    opacity: 0;
    overflow: hidden;
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F8FC 100%);
}

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

.logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .logo-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--kvc-navy);
    letter-spacing: 0.2px;
}

.logo-text .logo-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--kvc-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 14px 12px 6px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13.5px;
    transition: all var(--transition-bounce);
    cursor: pointer;
    border: 1px solid transparent;
    transform-origin: left center;
}
.nav-item i { font-size: 19px; flex-shrink: 0; transition: transform var(--transition-bounce); }

.nav-item:hover {
    color: var(--kvc-teal);
    background: var(--kvc-teal-light);
    transform: translateX(4px);
}
.nav-item:hover i {
    transform: scale(1.1) rotate(-5deg);
}

.nav-item.active {
    color: var(--kvc-cyan-dark);
    background: var(--kvc-cyan-light);
    border-color: rgba(0, 173, 218, 0.18);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--bg-elevated);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kvc-cyan) 0%, var(--kvc-teal) 100%);
    border: 2px solid rgba(0, 173, 218, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 173, 218, 0.20);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10px;
    font-weight: 700;
    color: var(--kvc-cyan-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-main);
}

/* =============================================
   TOP HEADER
   ============================================= */
.top-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    z-index: 5;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 8px 18px;
    gap: 10px;
    width: 300px;
    transition: all var(--transition-fast);
}
.header-search:focus-within {
    border-color: var(--kvc-cyan);
    box-shadow: 0 0 0 3px rgba(0, 173, 218, 0.10);
    width: 360px;
    background: #fff;
}
.header-search i { color: var(--text-muted); font-size: 16px; }
.header-search input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-family: var(--font-family);
    font-size: 14px;
}
.header-search input::placeholder { color: var(--text-muted); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =============================================
   VIEW CONTAINER
   ============================================= */
.view-container {
    flex: 1;
    padding: 18px 32px;
    overflow-y: auto;
    position: relative;
}

.view-container::-webkit-scrollbar { width: 6px; }
.view-container::-webkit-scrollbar-track { background: transparent; }
.view-container::-webkit-scrollbar-thumb {
    background: rgba(0, 173, 218, 0.20);
    border-radius: 3px;
}
.view-container::-webkit-scrollbar-thumb:hover { background: rgba(0, 173, 218, 0.40); }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.section-title h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.section-title p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* =============================================
   CARDS & GRID
   ============================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(0, 173, 218, 0.40);
    box-shadow: var(--shadow-md), 0 8px 24px rgba(0, 173, 218, 0.12);
}
.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: transform var(--transition-bounce);
}
.stat-icon.primary { background: rgba(0, 173, 218, 0.10); color: var(--kvc-cyan-dark); }
.stat-icon.success { background: rgba(5, 150, 105, 0.10);  color: var(--success); }
.stat-icon.warning { background: rgba(217, 119, 6, 0.10);  color: var(--warning); }
.stat-icon.info    { background: rgba(37, 99, 235, 0.10);  color: var(--info); }

.stat-info h3 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}
.stat-info p {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

/* =============================================
   TABLES
   ============================================= */
.table-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

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

th {
    background: rgba(0, 173, 218, 0.06);
    padding: 12px 20px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--kvc-teal);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13.5px;
    color: var(--text-primary);
}

tr:last-child td { border-bottom: none; }
tr { transition: background var(--transition-fast), transform var(--transition-bounce); }
tr:hover td { background: rgba(0, 173, 218, 0.04); }

/* =============================================
   STATUS & IMPORTANCE PILLS
   ============================================= */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active    { background: rgba(5, 150, 105, 0.10); color: var(--success); border: 1px solid rgba(5, 150, 105, 0.20); }
.status-pending   { background: rgba(217, 119, 6, 0.10); color: var(--warning); border: 1px solid rgba(217, 119, 6, 0.20); }
.status-completed { background: rgba(0, 173, 218, 0.10); color: var(--kvc-cyan-dark); border: 1px solid rgba(0, 173, 218, 0.25); }
.status-inactive  { background: rgba(220, 38, 38, 0.08); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.20); }

.importance-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.importance-alta  { background: rgba(220, 38, 38, 0.10); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.25); }
.importance-media { background: rgba(217, 119, 6, 0.10); color: #b45309; border: 1px solid rgba(217, 119, 6, 0.25); }
.importance-baja  { background: rgba(5, 150, 105, 0.10); color: #047857; border: 1px solid rgba(5, 150, 105, 0.20); }

/* =============================================
   OVERLAYS & AUTH CARD
   ============================================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 42, 58, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}
.overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Auth Card */
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.98);
    transition: transform var(--transition-bounce), box-shadow var(--transition-bounce);
    position: relative;
    overflow: hidden;
}
/* Top cyan accent line */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--kvc-cyan), var(--kvc-teal), transparent);
}

.overlay.active .auth-card { 
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 40px rgba(0, 173, 218, 0.15);
}

.auth-card .logo-container {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.auth-card .logo-container img {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.auth-card .logo-container h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* =============================================
   MODALS
   ============================================= */
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-bounce);
    overflow: hidden;
}
.overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 173, 218, 0.04);
}
.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 65vh;
    overflow-y: auto;
}
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--bg-elevated);
}

/* =============================================
   FLOATING SYNC BUTTON (FAB)
   ============================================= */
.fab-sync {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kvc-cyan) 0%, var(--kvc-cyan-dark) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 173, 218, 0.40);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    animation: fab-pulse 3s ease-in-out infinite;
}
@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 173, 218, 0.40), 0 0 0 0 rgba(0, 173, 218, 0.15); }
    50%       { box-shadow: 0 4px 20px rgba(0, 173, 218, 0.40), 0 0 0 10px rgba(0, 173, 218, 0); }
}
.fab-sync:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 28px rgba(0, 173, 218, 0.55);
    animation: none;
}
.fab-sync svg { transition: transform 0.5s ease; }
.fab-sync:hover svg { transform: rotate(180deg); }

/* =============================================
   LOADER & SPINNER
   ============================================= */
.loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(0, 173, 218, 0.15);
    border-top-color: var(--kvc-cyan);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(110%);
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: all;
    min-width: 260px;
    font-size: 13px;
    font-weight: 500;
}
.toast.show { transform: translateX(0); opacity: 1; }

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--info); }

.toast.success i { color: var(--success); font-size: 18px; }
.toast.error   i { color: var(--danger);  font-size: 18px; }
.toast.info    i { color: var(--info);    font-size: 18px; }

/* =============================================
   DETAIL PANELS
   ============================================= */
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    min-width: 100px;
    padding-top: 2px;
    flex-shrink: 0;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.5;
}

/* =============================================
   DRIVE ITEM CARDS (event detail)
   ============================================= */
.drive-item-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    gap: 10px;
}
.empty-state i {
    font-size: 44px;
    color: rgba(0, 173, 218, 0.25);
}
.empty-state h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
}
.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.6;
    margin: 0;
}

/* =============================================
   DETAIL PANELS
   ============================================= */
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    min-width: 110px;
    padding-top: 1px;
}
.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.5;
}

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}
.empty-state i {
    font-size: 48px;
    color: rgba(0, 173, 218, 0.30);
    margin-bottom: 4px;
}
.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}
.empty-state p {
    font-size: 13px;
    max-width: 300px;
    line-height: 1.6;
}

/* --- Sincronizador Tabs --- */
.tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}
.tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tab:hover {
    color: var(--text-main);
}
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content {
    display: none;
    padding-top: 20px;
}
.tab-content.active {
    display: block;
}
.badge {
    background: var(--bg-main);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

#notif-panel {
    animation: slideDownNotif 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDownNotif {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* =============================================
   VIEW TRANSITIONS (SPA)
   ============================================= */
#view-container {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-transition-out {
    opacity: 0;
    transform: translateY(5px);
}

.view-transition-in {
    opacity: 1;
    transform: translateY(0);
}

.view-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 16px;
    color: var(--text-muted);
}

/* ── Estilos para Plantilla Dinámica (Tree View) ── */
.tree-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    user-select: none;
    margin-top: 8px;
}
.tree-node {
    display: flex;
    flex-direction: column;
}
.tree-row {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    border: 1px solid transparent;
}
.tree-row:hover {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
}
.tree-row.drag-over {
    border: 2px dashed var(--primary);
    background: rgba(99, 102, 241, 0.05);
}
.tree-indent {
    width: 20px;
    height: 100%;
    display: inline-block;
    border-left: 1px solid var(--border-color);
    margin-left: 10px;
}
.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
}
.tree-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.tree-icon {
    font-size: 16px;
    margin-right: 8px;
    margin-left: 4px;
}
.tree-icon.folder { color: #f59e0b; }
.tree-icon.bitacora { color: #10b981; }
.tree-icon.doc { color: #3b82f6; }
.tree-icon.sheet { color: #10b981; }
.tree-icon.form { color: #8b5cf6; }
.tree-icon.file { color: #64748b; }

.tree-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
}
.tree-name-input {
    background: transparent;
    border: 1px solid transparent;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
    transition: all 0.2s;
}
.tree-name-input:hover {
    border-color: var(--border-subtle);
}
.tree-name-input:focus {
    border-color: var(--primary);
    background: var(--bg-main);
    outline: none;
}
.tree-name-input.locked {
    pointer-events: none;
    color: var(--text-muted);
    font-weight: 600;
}
.tree-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.tree-row:hover .tree-actions {
    opacity: 1;
}
.tree-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tree-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.tree-btn.delete:hover {
    color: var(--danger);
    background: var(--danger-alpha);
}
.tree-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
}
