:root {
    --koryfi-bg: #0B0F19;
    --koryfi-card: #1E293B;
    --koryfi-hover: #263348;
    --koryfi-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--koryfi-bg);
    color: #F1F5F9;
    font-family: 'Inter', sans-serif;
}

.glass-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--koryfi-border);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.stat-widget {
    padding: 1.5rem;
}

.stat-widget .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-widget .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: #94A3B8;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-verde { background: #10B981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.status-amarillo { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.status-rojo { background: #F43F5E; box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); }

.progress-bar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 1s ease;
}

.alert-card {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid;
    margin-bottom: 0.75rem;
}

.alert-danger { border-color: #F43F5E; background: rgba(244, 63, 94, 0.08); }
.alert-warning { border-color: #F59E0B; background: rgba(245, 158, 11, 0.08); }
.alert-info { border-color: #38BDF8; background: rgba(56, 189, 248, 0.08); }
.alert-success { border-color: #10B981; background: rgba(16, 185, 129, 0.08); }

.badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--koryfi-border);
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-input, .form-select {
    background: var(--koryfi-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    color: #F1F5F9;
    width: 100%;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-input:focus, .form-select:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    margin-bottom: 0.375rem;
}

.btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #F43F5E, #E11D48);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94A3B8;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-ghost:hover {
    border-color: #10B981;
    color: #10B981;
}

.btn-ghost-danger {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94A3B8;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-ghost-danger:hover {
    border-color: #F43F5E;
    color: #F43F5E;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: #F1F5F9;
    background: rgba(255, 255, 255, 0.1);
}

.table-dark {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748B;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-dark td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #F1F5F9;
    font-size: 0.875rem;
}

.table-dark tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar {
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: #0F172A;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s;
    overflow: hidden;
    z-index: 40;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #94A3B8;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #F1F5F9;
}

.sidebar-link.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border-left: 3px solid #10B981;
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-link-text {
    display: none;
}

.main-content {
    margin-left: 260px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: 72px;
}

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

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in {
    animation: fadeIn 0.5s ease both;
}

.slide-up {
    animation: slideUp 0.4s ease both;
}

.skeleton {
    background: linear-gradient(90deg, #1E293B 25%, #263348 50%, #1E293B 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0B0F19;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .main-content.expanded {
        margin-left: 0;
    }
}
