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

@import 'tailwindcss';

/* ===== Design Tokens - Cibertronia Service ===== */
:root {
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Light mode colors */
    --bg-primary: #f0f4f8;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.2);

    /* Brand colors - Deep tech blues with neon accents */
    --color-primary: hsl(217, 91%, 60%);
    --color-primary-hover: hsl(217, 91%, 55%);
    --color-primary-glow: hsla(217, 91%, 60%, 0.4);
    --color-accent: hsl(183, 100%, 50%);
    --color-accent-glow: hsla(183, 100%, 50%, 0.3);
    --color-secondary: hsl(265, 89%, 66%);
    --color-secondary-glow: hsla(265, 89%, 66%, 0.3);

    /* Status colors */
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.3);
    --color-warning: #f59e0b;
    --color-warning-glow: rgba(245, 158, 11, 0.3);
    --color-danger: #ef4444;
    --color-danger-glow: rgba(239, 68, 68, 0.3);

    /* Glass effect - Light mode */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px var(--color-primary-glow);
}

/* ===== Dark mode - Premium Slate ===== */
.dark {
    /* Fondos basados en Slate de Tailwind para un look profesional y profundo */
    --bg-primary: #0a0f1a;
    /* Negro profundo con tinte azul */
    --bg-secondary: #0f1419;
    /* Sidebar ultra-oscuro */
    --bg-card: #1a202c;
    /* Tarjetas gris muy oscuro */
    --bg-elevated: #252d3a;
    /* Popups ligeramente más claros */

    /* Textos con alto contraste pero descansados */
    --text-primary: #ffffff;
    /* Blanco puro para títulos */
    --text-secondary: #e2e8f0;
    /* Slate 200 para cuerpo */
    --text-muted: #94a3b8;
    /* Slate 400 para meta */

    /* Bordes sutiles para definición */
    --border-color: rgba(255, 255, 255, 0.06);

    /* Glass effect refinado */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);

    /* Sombras más dramáticas para dar profundidad */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* Dark mode background gradient */
.dark body {
    background:
        radial-gradient(ellipse at 0% 0%, hsla(217, 91%, 60%, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, hsla(183, 100%, 50%, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, hsla(265, 89%, 66%, 0.03) 0%, transparent 50%),
        var(--bg-primary);
}

/* Light mode background */
body {
    background:
        radial-gradient(ellipse at 0% 0%, hsla(217, 91%, 60%, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, hsla(183, 100%, 50%, 0.03) 0%, transparent 50%),
        var(--bg-primary);
}

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

/* ===== Sidebar ===== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 40;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

/* Logo Area */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--color-primary-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--color-primary-glow);
}

.logo-container img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 1.5rem;
    color: white;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-item a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 10px;
}

.nav-item a:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

.nav-item.active a {
    color: white;
    /* Gradiente vibrante Cyan -> Blue para efecto 'pop' */
    background: linear-gradient(135deg, hsl(217, 91%, 60%), hsl(225, 80%, 55%));
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    font-weight: 600;
}

.nav-item.active a::before {
    opacity: 1;
    /* Borde brillante sutil interno usando el pseudo-elemento si se desea, o glow externo */
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    opacity: 0;
    /* Desactivamos el before sólido para usar el background directo del 'a' que es más limpio */
}

.nav-item .icon {
    font-size: 1.25rem;
    width: 1.75rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nav-item span:last-child {
    position: relative;
    z-index: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

/* ===== Top Bar ===== */
.top-bar {
    height: 70px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 30;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-btn {
    display: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.top-bar-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-bar-breadcrumb span {
    color: var(--text-secondary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Icon Button */
.btn-icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-icon.has-notification::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--color-danger);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-danger-glow);
    animation: pulse-notification 2s ease-in-out infinite;
}

@keyframes pulse-notification {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Profile */
.profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.profile:hover {
    background: var(--glass-bg-hover);
    border-color: var(--border-color);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

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

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===== Page Content ===== */
.page-content {
    flex: 1;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Stats Tags (Info Badges) ===== */
.stat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.stat-tag:hover {
    background: var(--glass-bg-hover);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.stat-tag-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Cards ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-shadow);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-glow);
}

/* Metric Cards */
.metric-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--card-glow, var(--color-primary-glow)) 0%, transparent 70%);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.metric-card:hover::before {
    opacity: 0.8;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: inherit;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

.metric-card:hover .metric-icon {
    transform: scale(1.05) rotate(-3deg);
}

.metric-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.metric-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.metric-change.positive {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.metric-change.negative {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ===== Tables ===== */
.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    width: 100%;
    margin-bottom: 1.5rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--glass-bg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.table td {
    font-size: 0.75rem;
    color: var(--text-primary);
}

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

.table tbody tr:hover {
    background: var(--glass-bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Cell Styles */
.cell-main {
    font-weight: 600;
    color: var(--text-primary);
}

.cell-secondary {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--color-warning);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-danger);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.12);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.badge-default {
    background: var(--glass-bg);
    color: var(--text-secondary);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), hsl(217, 91%, 55%));
    color: white;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-primary-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--color-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    box-shadow: 0 4px 15px var(--color-danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--color-danger-glow);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 14px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

/* Aliases for shorter class names */
.input,
select.input,
textarea.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.input:focus,
select.input:focus,
textarea.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-glow);
}

.input::placeholder {
    color: var(--text-muted);
}

/* ===== Filters ===== */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--color-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ===== Calendar ===== */
.calendar-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-name {
    text-align: center;
    padding: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    min-height: 90px;
    padding: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: var(--glass-bg-hover);
    border-color: var(--color-primary);
    transform: scale(1.02);
}

.calendar-day.today {
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 20px var(--color-primary-glow);
}

.calendar-day.selected {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.calendar-day.selected .calendar-day-number {
    color: white;
}

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.calendar-events {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.calendar-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.calendar-event-dot:hover {
    transform: scale(1.3);
}

/* Event Detail Panel */
.event-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: var(--glass-shadow);
}

.event-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.event-item {
    padding: 1rem;
    border-radius: 12px;
    background: var(--glass-bg);
    margin-bottom: 0.75rem;
    border-left: 3px solid;
    transition: all 0.2s ease;
}

.event-item:hover {
    background: var(--glass-bg-hover);
    transform: translateX(4px);
}

.event-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.event-item-client {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.event-item-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.9rem;
    max-width: 300px;
    margin: 0 auto;
}

/* ===== Notifications Dropdown ===== */
.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideDown 0.2s ease;
    z-index: 50;
}

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

.notifications-title {
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--glass-bg);
}

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

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.stat-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-tag-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Responsive ===== */
@media (max-width: 1280px) {
    .sidebar {
        width: 260px;
    }

    .main-content {
        margin-left: 260px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

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

    .page-content {
        padding: 1rem;
    }

    .top-bar {
        padding: 0 1rem;
    }

    .table-container {
        border-radius: 12px;
    }

    .profile-info {
        display: none;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

.animate-slideUp {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered animation for cards */
.cards-grid>* {
    opacity: 0;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cards-grid>*:nth-child(1) {
    animation-delay: 0.05s;
}

.cards-grid>*:nth-child(2) {
    animation-delay: 0.1s;
}

.cards-grid>*:nth-child(3) {
    animation-delay: 0.15s;
}

.cards-grid>*:nth-child(4) {
    animation-delay: 0.2s;
}

.cards-grid>*:nth-child(5) {
    animation-delay: 0.25s;
}

.cards-grid>*:nth-child(6) {
    animation-delay: 0.3s;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Selection ===== */
::selection {
    background: var(--color-primary);
    color: white;
}

/* ===== Focus Visible ===== */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {

    .sidebar,
    .top-bar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}