/* ============================================================
   FAMILY CENTER ERP - DESIGN SYSTEM
   Premium UI inspired by high-contrast zinc/yellow aesthetic
   ============================================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f4f4f5;
    color: #18181b;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== CSS VARIABLES ========== */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --navbar-height: 64px;
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-2xl: 2.5rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 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);
    }
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background-color: #d4d4d8;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a1a1aa;
}

/* ========== APP LAYOUT ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #3f3f46, #18181b);
    color: #a1a1aa;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s ease;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--color-primario, #eab308);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18181b;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.sidebar-brand {
    display: block;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sidebar-sub {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #a1a1aa;
    margin-top: 2px;
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    color: #d4d4d8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
    margin-bottom: 0.25rem;
}

.sidebar-link i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-link.active {
    background: var(--color-primario, #eab308);
    color: #18181b;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.25);
    transform: scale(1.02);
    border-color: rgba(234, 179, 8, 0.3);
    font-weight: 800;
}

.sidebar-link.active i {
    color: #18181b;
}

/* Submenu */
.sidebar-item-group {
    margin-bottom: 0.25rem;
}

.sidebar-link.has-submenu {
    cursor: pointer;
}

/* Sidebar Section Labels */
.sidebar-section-label {
    padding: 1.25rem 1rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-section-label span {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.sidebar-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sidebar-item-group.open .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: 1.5rem;
    margin-top: 0.25rem;
}

.sidebar-submenu .sub-link {
    font-size: 0.75rem;
    padding: 0.65rem 1rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eab308, #ca8a04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18181b;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

.sidebar-user-role {
    display: block;
    color: #71717a;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-logout {
    color: #fca5a5 !important;
}

.sidebar-logout:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ========== TOP NAVBAR ========== */
.top-navbar {
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-toggle-sidebar {
    width: 38px;
    height: 38px;
    border: 1.5px solid #e4e4e7;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #71717a;
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-toggle-sidebar:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
    color: #18181b;
}

/* Navbar Breadcrumb */
.navbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.25rem;
}

.breadcrumb-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #71717a;
}

.breadcrumb-sep {
    font-size: 0.55rem;
    color: #d4d4d8;
}

.breadcrumb-page {
    font-size: 0.8rem;
    font-weight: 700;
    color: #18181b;
}

/* Navbar Icon Button (theme, notifications) */
.btn-navbar-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1.5px solid #e4e4e7;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #71717a;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-navbar-icon:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
    color: #18181b;
}

.btn-navbar-icon:active {
    transform: scale(0.95);
}

/* Keep old class for backwards compatibility */
.btn-theme-toggle {
    width: 38px;
    height: 38px;
    border: 1.5px solid #e4e4e7;
    border-radius: var(--radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #71717a;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    background: #f4f4f5;
    border-color: var(--color-primario);
    color: var(--color-primario);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* Navbar Search */
.navbar-search {
    display: flex;
    align-items: center;
    position: relative;
    background: #f4f4f5;
    border: 1.5px solid #e4e4e7;
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    gap: 0.5rem;
    height: 38px;
    min-width: 200px;
    max-width: 280px;
    transition: var(--transition);
}

.navbar-search:focus-within {
    border-color: var(--color-primario);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.navbar-search i {
    font-size: 0.85rem;
    color: #a1a1aa;
    flex-shrink: 0;
}

.navbar-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.8rem;
    font-weight: 500;
    color: #18181b;
    width: 100%;
    padding: 0;
}

.navbar-search input::placeholder {
    color: #a1a1aa;
}

.search-shortcut {
    font-size: 0.6rem;
    font-weight: 600;
    color: #a1a1aa;
    background: #e4e4e7;
    border: 1px solid #d4d4d8;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Navbar Divider */
.navbar-divider {
    width: 1px;
    height: 24px;
    background: #e4e4e7;
    margin: 0 0.25rem;
}

/* Navbar Avatar */
.navbar-avatar {
    display: flex;
    align-items: center;
}

.avatar-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.avatar-trigger:hover {
    background: #f4f4f5;
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primario, #eab308), #ca8a04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: #18181b;
    flex-shrink: 0;
    border: 2px solid rgba(234, 179, 8, 0.3);
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.2);
}

.avatar-img.avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.avatar-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.avatar-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: #18181b;
}

.avatar-role {
    font-size: 0.6rem;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.avatar-chevron {
    font-size: 0.65rem;
    color: #a1a1aa;
    transition: transform 0.2s ease;
}

.navbar-avatar.show .avatar-chevron {
    transform: rotate(180deg);
}

/* Dropdown Premium */
.dropdown-fc {
    border-radius: 16px !important;
    border: 1px solid #e4e4e7 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    padding: 0.5rem !important;
    min-width: 220px;
    animation: slideDown 0.2s ease-out;
    overflow: hidden;
}

.dropdown-header-fc {
    padding: 0.75rem 0.75rem 0.5rem;
}

.dropdown-user-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-user-preview strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #18181b;
}

.dropdown-user-preview small {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-fc .dropdown-item {
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
    color: #52525b;
    transition: var(--transition);
}

.dropdown-fc .dropdown-item:hover {
    background: #f4f4f5;
    color: #18181b;
}

.dropdown-fc .dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #ef4444;
}

.dropdown-fc .dropdown-divider {
    margin: 0.35rem 0.5rem;
    border-color: #f4f4f5;
}

/* ========== PAGE CONTENT ========== */
.page-content {
    flex: 1;
    padding: 2rem;
    background-color: #f4f4f5;
    background-image: linear-gradient(to right, rgba(24, 24, 27, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(24, 24, 27, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ========== FOOTER ========== */
.main-footer {
    padding: 1rem 2rem;
    background: #fff;
    border-top: 1px solid #e4e4e7;
    text-align: center;
    font-size: 0.75rem;
    color: #a1a1aa;
    font-weight: 500;
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-2xl);
    border: 1px solid #d4d4d8;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.page-header h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #18181b;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0;
}

.page-header p {
    color: #71717a;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0.25rem 0 0;
}

/* ========== CARD SYSTEM ========== */
.card-fc {
    background: #fff;
    border-radius: var(--radius-2xl);
    border: 1px solid #d4d4d8;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card-fc .card-header-fc {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fafafa;
}

.card-fc .card-body-fc {
    padding: 0;
}

/* ========== TABLE SYSTEM ========== */
.table-fc {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.table-fc thead tr {
    background: #fafafa;
    border-bottom: 2px solid #d4d4d8;
}

.table-fc thead th {
    padding: 1rem 2rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-right: 1px solid #e4e4e7;
    white-space: nowrap;
}

.table-fc thead th:last-child {
    border-right: none;
}

.table-fc tbody tr {
    border-bottom: 1px solid #e4e4e7;
    transition: background 0.15s;
}

.table-fc tbody tr:hover {
    background: #fefce8;
}

.table-fc tbody td {
    padding: 1rem 2rem;
    font-size: 0.85rem;
    border-right: 1px solid #f4f4f5;
    vertical-align: middle;
}

.table-fc tbody td:last-child {
    border-right: none;
}

/* ========== BUTTONS ========== */
.btn-primary-fc {
    background: #36b902;
    color: #fff;
    border: 2px solid transparent;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.btn-primary-fc:hover {
    background: var(--color-primario, #eab308);
    color: #18181b;
    transform: scale(0.98);
}

.btn-action {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 2px solid #e4e4e7;
    background: #fff;
    color: #a1a1aa;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-action:hover {
    color: #18181b;
    border-color: #a1a1aa;
}

.btn-action.btn-view:hover {
    color: #18181b;
    border-color: #18181b;
}

.btn-action.btn-edit:hover {
    color: #3b82f6;
    border-color: #93c5fd;
}

.btn-action.btn-delete:hover {
    color: #ef4444;
    border-color: #fca5a5;
}

/* ========== BADGES / STATUS ========== */
.badge-fc {
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid;
    letter-spacing: 0.05em;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.badge-pending {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* ========== SEARCH BAR ========== */
.search-bar-fc {
    position: relative;
    flex: 1;
}

.search-bar-fc i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 1.1rem;
}

.search-bar-fc input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: #fff;
    border: 2px solid #d4d4d8;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    color: #18181b;
    box-shadow: var(--shadow-sm);
}

.search-bar-fc input::placeholder {
    color: #a1a1aa;
}

.search-bar-fc input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.1);
}

/* ========== FORM INPUTS ========== */
.form-control-fc {
    width: 100%;
    background: #fff;
    border: 2px solid #d4d4d8;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: #18181b;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.form-control-fc:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.1);
}

.form-control-fc:disabled {
    background: #f4f4f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-control-fc::placeholder {
    color: #a1a1aa;
}

.select-fc {
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}

.form-label-fc {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.input-group-fc {
    position: relative;
}

.input-group-fc i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    z-index: 1;
    transition: color 0.2s;
}

.input-group-fc:focus-within i {
    color: var(--color-primario);
}

/* ========== MODALS ========== */
.modal-content {
    border-radius: var(--radius-2xl) !important;
    border: 1px solid #d4d4d8 !important;
    overflow: hidden;
    box-shadow: var(--shadow-xl) !important;
}

.modal-header-fc {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e4e4e7;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-fc .modal-icon {
    width: 50px;
    height: 50px;
    background: #18181b;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primario);
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.modal-header-fc h5 {
    font-size: 1.25rem;
    font-weight: 900;
    color: #18181b;
    letter-spacing: -0.02em;
    margin: 0;
}

.modal-header-fc .modal-subtitle {
    font-size: 0.6rem;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.modal-body-fc {
    padding: 2rem 2.5rem;
}

.modal-footer-fc {
    padding: 1.5rem 2.5rem;
    background: #fff;
    border-top: 1px solid #e4e4e7;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Delete Modal */
.modal-delete-content {
    text-align: center;
}

.modal-delete-header {
    background: #ef4444;
    padding: 3rem;
    color: #fff;
}

.modal-delete-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.modal-delete-title {
    font-weight: 900;
    font-size: 1.5rem;
    margin: 0;
}

.modal-delete-subtitle {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.delete-item-preview {
    padding: 1.25rem;
    background: #fff;
    border: 2px solid #fecaca;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
}

/* ========== PRELOADER ========== */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e4e4e7;
    border-top-color: var(--color-primario);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast-fc {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease-out;
    min-width: 300px;
    max-width: 450px;
}

.toast-fc.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.toast-fc.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.toast-fc.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.toast-fc.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ========== LOGIN PAGE ========== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    padding: 1rem;
    position: relative;
    overflow: auto;
}

.login-bg-pattern {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(24, 24, 27, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(24, 24, 27, 0.05) 1px, transparent 1px);
    opacity: 0.4;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    position: relative;
    z-index: 1;
    border: 1px solid #e4e4e7;
    min-height: 700px;
}

.login-branding {
    width: 42%;
    background: linear-gradient(135deg, #52525b, #18181b);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.login-branding-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    opacity: 0.05;
}

.login-branding-content {
    position: relative;
    z-index: 1;
}

.login-brand-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.login-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--color-primario, #eab308);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #18181b;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.login-brand-name {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.1;
}

.login-brand-sub {
    display: block;
    font-size: 0.6rem;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.login-brand-hero h2 {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.login-brand-hero .text-gradient {
    background: linear-gradient(to right, #eab308, #ca8a04);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-brand-hero p {
    color: #a1a1aa;
    font-size: 1rem;
    line-height: 1.6;
}

.login-features {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primario);
    flex-shrink: 0;
}

.login-feature-icon.icon-blue {
    color: #60a5fa;
}

.login-feature-icon.icon-green {
    color: #4ade80;
}

.login-feature h4 {
    font-weight: 700;
    font-size: 0.85rem;
    margin: 0;
    color: #fff;
}

.login-feature p {
    font-size: 0.75rem;
    color: #a1a1aa;
    margin: 0;
}

.login-branding-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

.login-branding-footer p {
    margin: 0;
    color: #71717a;
}

/* Login Form Panel */
.login-form-panel {
    width: 58%;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-form-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #18181b;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.login-form-header p {
    color: #71717a;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
}

.form-floating-group {
    margin-bottom: 1.5rem;
}

.form-floating-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #3f3f46;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 1.15rem;
    transition: color 0.2s;
}

.input-icon-wrapper:focus-within i {
    color: var(--color-primario);
}

.form-control-login {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: #fafafa;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: #18181b;
    outline: none;
    transition: var(--transition);
}

.form-control-login:focus {
    border-color: var(--color-primario);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.form-control-login::placeholder {
    color: #a1a1aa;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #18181b;
    color: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
    margin-top: 1.5rem;
}

.btn-login:hover {
    background: var(--color-primario);
    color: #18181b;
}

.btn-login:active {
    transform: scale(0.99);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alert-login-error {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.5rem;
    animation: slideUp 0.3s ease-out;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 2.5rem 0 1.5rem;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e4e4e7;
}

.login-divider span {
    position: relative;
    background: #fff;
    padding: 0 1rem;
    color: #a1a1aa;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.login-quick-access {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.25rem;
}

.quick-access-btn:hover {
    background: #fafafa;
    border-color: #a1a1aa;
}

.quick-access-btn i {
    font-size: 1.25rem;
    color: #52525b;
}

.quick-access-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #18181b;
}

/* ========== DASHBOARD STAT CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid #e4e4e7;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4d4d8;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: #d4d4d8;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, #fef9c3, #fde68a);
    color: #92400e;
    border: 1px solid #fde047;
}

.stat-icon.green {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.stat-icon.zinc {
    background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
    color: #3f3f46;
    border: 1px solid #d4d4d8;
}

.stat-icon.red {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #6b21a8;
    border: 1px solid #c4b5fd;
}

/* Accent bars per color */
.stat-card.accent-yellow::before {
    background: linear-gradient(90deg, #eab308, #fbbf24);
}

.stat-card.accent-blue::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.stat-card.accent-green::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.stat-card.accent-red::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.stat-card.accent-zinc::before {
    background: linear-gradient(90deg, #52525b, #71717a);
}

.stat-card.accent-purple::before {
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

/* Hover glow per accent */
.stat-card.accent-yellow:hover {
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.15);
}

.stat-card.accent-blue:hover {
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

.stat-card.accent-green:hover {
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15);
}

.stat-card.accent-red:hover {
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.15);
}

.stat-card.accent-zinc:hover {
    box-shadow: 0 8px 30px rgba(82, 82, 91, 0.1);
}

.stat-card.accent-purple:hover {
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.stat-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: #18181b;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #a1a1aa;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    margin-top: 0.25rem;
    width: fit-content;
}

.stat-trend.up {
    background: #dcfce7;
    color: #166534;
}

.stat-trend.down {
    background: #fee2e2;
    color: #991b1b;
}

.stat-trend.neutral {
    background: #f4f4f5;
    color: #71717a;
}


/* ========== UNDER CONSTRUCTION ========== */
.construction-page {
    text-align: center;
    padding: 5rem 2rem;
}

.construction-icon {
    width: 100px;
    height: 100px;
    background: #fef9c3;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: #854d0e;
    border: 2px solid #fde047;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #a1a1aa;
}

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

/* ========== SIDEBAR COLLAPSED (DESKTOP) ========== */
.sidebar .sidebar-link-text,
.sidebar .sidebar-logo-text,
.sidebar .sidebar-user-info,
.sidebar .sidebar-arrow {
    transition: opacity 0.2s ease, width 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-link-text,
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-label span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-label {
    padding: 0.75rem 0.5rem 0.25rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-section-label::after {
    flex: none;
    width: 24px;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.5rem 0.75rem;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

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

.sidebar.collapsed .sidebar-submenu {
    display: none !important;
}

.sidebar.collapsed .sidebar-user-card {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-link.sidebar-logout {
    justify-content: center;
}

.sidebar.collapsed+.main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Tooltip on hover for collapsed sidebar items */
.sidebar.collapsed .sidebar-link {
    position: relative;
}

.sidebar.collapsed .sidebar-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #18181b;
    color: #fff;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    letter-spacing: 0;
    text-transform: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .sidebar.collapsed .sidebar-link-text,
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .sidebar-user-info,
    .sidebar.collapsed .sidebar-arrow {
        opacity: 1;
        width: auto;
    }

    .sidebar.collapsed .sidebar-header {
        padding: 1.5rem;
    }

    .sidebar.collapsed .sidebar-logo {
        justify-content: flex-start;
    }

    .sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 0.85rem 1rem;
    }

    .sidebar.collapsed .sidebar-user-card {
        justify-content: flex-start;
        padding: 0.75rem;
    }

    .sidebar.collapsed .sidebar-link.sidebar-logout {
        justify-content: flex-start;
    }

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

    .sidebar.collapsed+.main-content {
        margin-left: 0;
    }

    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-branding {
        width: 100%;
        padding: 1.25rem 1.5rem;
    }

    .login-brand-header {
        margin-bottom: 1rem;
    }

    .login-form-panel {
        width: 100%;
        padding: 1.5rem;
    }

    .login-brand-hero h2 {
        font-size: 1.25rem;
    }

    .login-brand-hero p {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .login-features {
        display: none;
    }

    .page-content {
        padding: 1rem;
    }

    .page-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .page-header h2 {
        font-size: 1.5rem;
    }

    .login-branding {
        padding: 1rem 1.25rem;
    }

    .login-brand-hero {
        display: none;
    }

    .table-fc thead th,
    .table-fc tbody td {
        padding: 0.75rem 1rem;
    }

    .modal-body-fc {
        padding: 1.5rem;
    }
}

/* ========== DARK THEME ========== */
[data-theme="dark"] {
    --bg: #09090b;
    --bg-card: #18181b;
    --border: #27272a;
    --text: #fafafa;
    --text-muted: #a1a1aa;
}

[data-theme="dark"] body {
    background: #09090b;
    color: #fafafa;
}

[data-theme="dark"] .page-content {
    background-color: #09090b;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* Navbar dark */
[data-theme="dark"] .top-navbar {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] .btn-toggle-sidebar {
    border-color: #3f3f46;
    color: #a1a1aa;
}

[data-theme="dark"] .btn-toggle-sidebar:hover {
    background: #27272a;
    border-color: #52525b;
    color: #fafafa;
}

[data-theme="dark"] .breadcrumb-label {
    color: #71717a;
}

[data-theme="dark"] .breadcrumb-sep {
    color: #3f3f46;
}

[data-theme="dark"] .breadcrumb-page {
    color: #fafafa;
}

[data-theme="dark"] .btn-navbar-icon {
    border-color: #3f3f46;
    color: #a1a1aa;
}

[data-theme="dark"] .btn-navbar-icon:hover {
    background: #27272a;
    border-color: #52525b;
    color: #fafafa;
}

[data-theme="dark"] .btn-theme-toggle {
    border-color: #3f3f46;
    color: #fbbf24;
}

[data-theme="dark"] .btn-theme-toggle:hover {
    background: #27272a;
    border-color: #fbbf24;
}

[data-theme="dark"] .navbar-search {
    background: #27272a;
    border-color: #3f3f46;
}

[data-theme="dark"] .navbar-search:focus-within {
    border-color: var(--color-primario);
    background: #18181b;
}

[data-theme="dark"] .navbar-search input {
    color: #fafafa;
}

[data-theme="dark"] .navbar-search input::placeholder {
    color: #71717a;
}

[data-theme="dark"] .search-shortcut {
    background: #3f3f46;
    border-color: #52525b;
    color: #a1a1aa;
}

[data-theme="dark"] .navbar-divider {
    background: #3f3f46;
}

[data-theme="dark"] .notification-badge {
    border-color: #18181b;
}

[data-theme="dark"] .avatar-trigger:hover {
    background: #27272a;
}

[data-theme="dark"] .avatar-img {
    border-color: rgba(234, 179, 8, 0.2);
}

[data-theme="dark"] .avatar-name {
    color: #fafafa;
}

[data-theme="dark"] .avatar-role {
    color: #71717a;
}

[data-theme="dark"] .avatar-chevron {
    color: #71717a;
}

/* Dropdown dark */
[data-theme="dark"] .dropdown-fc {
    background: #18181b !important;
    border-color: #27272a !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .dropdown-user-preview strong {
    color: #fafafa;
}

[data-theme="dark"] .dropdown-user-preview small {
    color: #71717a;
}

[data-theme="dark"] .dropdown-fc .dropdown-item {
    color: #d4d4d8;
}

[data-theme="dark"] .dropdown-fc .dropdown-item:hover {
    background: #27272a;
    color: #fafafa;
}

[data-theme="dark"] .dropdown-fc .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .dropdown-fc .dropdown-divider {
    border-color: #27272a;
}

[data-theme="dark"] .dropdown-menu {
    background: #18181b !important;
    border-color: #27272a !important;
}

[data-theme="dark"] .dropdown-item {
    color: #d4d4d8;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #27272a;
    color: #fafafa;
}

[data-theme="dark"] .dropdown-header {
    color: #a1a1aa !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #27272a;
}

/* Cards / Tables / Page dark */
[data-theme="dark"] .card-fc {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] .card-fc .card-header-fc {
    background: #0a0a0a;
    border-color: #27272a;
}

[data-theme="dark"] .table-fc thead tr {
    background: #0a0a0a;
    border-color: #27272a;
}

[data-theme="dark"] .table-fc thead th {
    color: #71717a;
    border-color: #27272a;
}

[data-theme="dark"] .table-fc tbody tr {
    border-color: #27272a;
}

[data-theme="dark"] .table-fc tbody tr:hover {
    background: rgba(234, 179, 8, 0.05);
}

[data-theme="dark"] .table-fc tbody td {
    border-color: #1a1a1d;
    color: #d4d4d8;
}

[data-theme="dark"] .page-header {
    background: rgba(24, 24, 27, 0.5);
    border-color: #27272a;
}

[data-theme="dark"] .page-header h2 {
    color: #fafafa;
}

[data-theme="dark"] .page-header p {
    color: #71717a;
}

[data-theme="dark"] .stat-card {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] .stat-value {
    color: #fafafa;
}

[data-theme="dark"] .main-footer {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] .search-bar-fc input {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}

[data-theme="dark"] .form-control-fc {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}

[data-theme="dark"] .form-label-fc {
    color: #a1a1aa;
}

[data-theme="dark"] .select-fc {
    color: #fafafa;
}

/* Modals dark */
[data-theme="dark"] .modal-content {
    background: #18181b !important;
    border-color: #27272a !important;
}

[data-theme="dark"] .modal-header-fc {
    background: #0a0a0a;
    border-color: #27272a;
}

[data-theme="dark"] .modal-header-fc h5 {
    color: #fafafa;
}

[data-theme="dark"] .modal-body-fc {
    color: #d4d4d8;
}

[data-theme="dark"] .modal-footer-fc {
    background: #18181b;
    border-color: #27272a;
}

/* Profile page dark */
[data-theme="dark"] .profile-card {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] .profile-section-title {
    color: #fafafa;
}

[data-theme="dark"] .profile-info-label {
    color: #71717a;
}

[data-theme="dark"] .profile-info-value {
    color: #d4d4d8;
}

/* Sidebar collapsed dark tooltip */
[data-theme="dark"] .sidebar.collapsed .sidebar-link:hover::after {
    background: #fafafa;
    color: #18181b;
}

/* ============================================================
   CATÁLOGO DE PRODUCTOS
   ============================================================ */

/* Filtros */
.catalogo-filtros {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.catalogo-buscar {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.catalogo-buscar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 1rem;
}

.catalogo-buscar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: #fff;
    border: 2px solid #d4d4d8;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    transition: var(--transition);
    color: #18181b;
    box-shadow: var(--shadow-sm);
}

.catalogo-buscar input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.1);
}

.catalogo-select {
    padding: 0.75rem 2rem 0.75rem 1rem;
    background: #fff;
    border: 2px solid #d4d4d8;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 700;
    color: #18181b;
    outline: none;
    cursor: pointer;
    appearance: none;
    min-width: 180px;
    transition: var(--transition);
}

.catalogo-select:focus {
    border-color: var(--color-primario);
}

.catalogo-orden-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    background: #18181b;
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.catalogo-orden-btn:hover {
    background: var(--color-primario);
    color: #18181b;
}

/* Grid de Cards */
.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.catalogo-loading,
.catalogo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #a1a1aa;
}

.catalogo-loading .preloader-spinner {
    margin: 0 auto 1rem;
}

.catalogo-empty i {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Product Card */
.pcard {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 2px solid #e4e4e7;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.pcard:hover {
    border-color: var(--color-primario);
    box-shadow: 0 8px 30px rgba(234, 179, 8, 0.12);
    transform: translateY(-2px);
}

.pcard.pcard-in-cart {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.15);
}

/* Card Image */
.pcard-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f4f4f5;
    overflow: hidden;
}

.pcard-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pcard:hover .pcard-img img {
    transform: scale(1.05);
}

.pcard-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4d4d8;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
}

.pcard-descuento {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Card Body */
.pcard-body {
    padding: 1rem 1.25rem 0.75rem;
    flex: 1;
}

.pcard-categoria {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primario);
    margin-bottom: 0.25rem;
}

.pcard-nombre {
    font-size: 0.95rem;
    font-weight: 800;
    color: #18181b;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pcard-precios {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pcard-precio {
    font-size: 1.15rem;
    font-weight: 900;
    color: #18181b;
    letter-spacing: -0.02em;
}

.pcard-precio-lista {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a1a1aa;
    text-decoration: line-through;
}

.pcard-descuento-inline {
    font-size: 0.65rem;
    font-weight: 800;
    color: #ef4444;
    background: #fee2e2;
    padding: 0.1rem 0.4rem;
    border-radius: 50px;
}

/* Card Button */
.pcard-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    margin: 0.5rem 1rem 1rem;
    background: #18181b;
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
}

.pcard-btn:hover {
    background: var(--color-primario);
    color: #18181b;
    transform: scale(0.98);
}

.pcard-btn.pcard-btn-added {
    background: var(--color-primario);
    color: #18181b;
}

.pcard-btn i {
    font-size: 1rem;
}

/* ============================================================
   CARRITO FLOTANTE
   ============================================================ */

/* FAB Button */
.carrito-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #18181b;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    transition: var(--transition);
}

.carrito-fab:hover {
    background: var(--color-primario);
    color: #18181b;
    transform: scale(1.08);
}

.carrito-fab-pulse {
    animation: cartPulse 0.4s ease;
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.carrito-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Overlay */
.carrito-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.carrito-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.carrito-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.1);
}

.carrito-panel.open {
    right: 0;
}

.carrito-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e4e4e7;
    flex-shrink: 0;
}

.carrito-panel-header h5 {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.carrito-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #e4e4e7;
    background: transparent;
    color: #71717a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.carrito-close:hover {
    background: #f4f4f5;
    color: #18181b;
}

/* Panel Body */
.carrito-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    min-height: 0;
}

.carrito-vacio {
    text-align: center;
    padding: 3rem 1rem;
    color: #a1a1aa;
}

.carrito-vacio i {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.carrito-vacio p {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.carrito-vacio small {
    font-size: 0.75rem;
}

/* Cart Item */
.carrito-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f4f4f5;
}

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

.carrito-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.carrito-item-info strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #18181b;
    line-height: 1.3;
}

.carrito-item-precio {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--color-primario);
}

.carrito-item-del {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.carrito-item-del:hover {
    background: #ef4444;
    color: #fff;
}

.carrito-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.carrito-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.carrito-qty button {
    width: 32px;
    height: 32px;
    background: #f4f4f5;
    border: none;
    color: #18181b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.carrito-qty button:hover {
    background: var(--color-primario);
}

.carrito-qty span {
    width: 36px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #18181b;
}

.carrito-item-unit {
    font-size: 0.65rem;
    font-weight: 600;
    color: #a1a1aa;
}

/* Observation input */
.carrito-obs-wrap {
    margin-top: 0.25rem;
}

.carrito-obs {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e4e4e7;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: #52525b;
    outline: none;
    transition: var(--transition);
    background: #fafafa;
}

.carrito-obs:focus {
    border-color: var(--color-primario);
    background: #fff;
}

.carrito-obs::placeholder {
    color: #a1a1aa;
    font-style: italic;
}

/* Client Section */
.carrito-cliente-section {
    border-top: 1px solid #e4e4e7;
    flex-shrink: 1;
    overflow-y: auto;
    min-height: 0;
}

.carrito-cliente-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    color: #18181b;
    transition: background 0.15s;
}

.carrito-cliente-toggle:hover {
    background: #fafafa;
}

.carrito-cliente-toggle i:first-child {
    color: var(--color-primario);
}

.carrito-cliente-form {
    padding: 0 1.5rem 1rem;
}

.carrito-campo {
    margin-bottom: 0.75rem;
}

.carrito-campo label {
    display: block;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #71717a;
    margin-bottom: 0.3rem;
}

.carrito-campo input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #18181b;
    outline: none;
    transition: var(--transition);
}

.carrito-campo input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.carrito-campo input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.carrito-campo select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: #18181b;
    outline: none;
    background: #fff;
    transition: var(--transition);
    cursor: pointer;
}

.carrito-campo select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

/* Delivery / Retiro toggle buttons */
.carrito-radio-opt {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    border: 2px solid #e4e4e7;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    color: #71717a;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.carrito-radio-opt:hover {
    border-color: var(--color-primario);
    color: #18181b;
}

.carrito-radio-opt.active {
    background: var(--color-primario);
    border-color: var(--color-primario);
    color: #18181b;
}

/* Panel Footer */
.carrito-panel-footer {
    padding: 1.25rem 1.5rem;
    border-top: 2px solid #e4e4e7;
    background: #fafafa;
    flex-shrink: 0;
}

.carrito-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.carrito-total-row span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #71717a;
}

.carrito-total-row strong {
    font-size: 1.3rem;
    font-weight: 900;
    color: #18181b;
    letter-spacing: -0.02em;
}

.carrito-enviar-btn {
    width: 100%;
    padding: 0.9rem;
    background: #18181b;
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.carrito-enviar-btn:hover {
    background: var(--color-primario);
    color: #18181b;
    transform: scale(0.98);
}

/* ============================================================
   CATÁLOGO - Responsive
   ============================================================ */
@media (max-width: 768px) {
    .catalogo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .pcard-body {
        padding: 0.75rem 0.85rem 0.5rem;
    }

    .pcard-nombre {
        font-size: 0.8rem;
    }

    .pcard-precio {
        font-size: 0.95rem;
    }

    .pcard-btn {
        padding: 0.65rem;
        margin: 0.3rem 0.6rem 0.6rem;
        font-size: 0.6rem;
    }

    .carrito-panel {
        width: 100vw;
    }

    .carrito-fab {
        bottom: 1rem;
        right: 1rem;
        width: 54px;
        height: 54px;
        font-size: 1.2rem;
    }

    .catalogo-filtros {
        gap: 0.5rem;
    }

    .catalogo-buscar {
        min-width: 100%;
    }

    .catalogo-select {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .catalogo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .pcard-img {
        aspect-ratio: 1 / 1;
    }

    .pcard-categoria {
        font-size: 0.5rem;
    }

    .pcard-nombre {
        font-size: 0.75rem;
    }

    .pcard-precio {
        font-size: 0.85rem;
    }

    .pcard-precio-lista {
        font-size: 0.65rem;
    }

    .pcard-btn span {
        display: none;
    }

    .pcard-btn {
        padding: 0.6rem;
        margin: 0.25rem 0.5rem 0.5rem;
    }
}

/* ============================================================
   CATÁLOGO & CARRITO - Dark Theme
   ============================================================ */
[data-theme="dark"] .catalogo-buscar input,
[data-theme="dark"] .catalogo-select {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}

[data-theme="dark"] .pcard {
    background: #27272a;
    border-color: #3f3f46;
}

[data-theme="dark"] .pcard:hover {
    border-color: var(--color-primario);
}

[data-theme="dark"] .pcard-nombre {
    color: #fafafa;
}

[data-theme="dark"] .pcard-precio {
    color: #fafafa;
}

[data-theme="dark"] .pcard-img-placeholder {
    background: linear-gradient(135deg, #3f3f46, #27272a);
    color: #52525b;
}

[data-theme="dark"] .carrito-panel {
    background: #18181b;
    border-left: 1px solid #27272a;
}

[data-theme="dark"] .carrito-panel-header {
    border-color: #27272a;
}

[data-theme="dark"] .carrito-panel-header h5 {
    color: #fafafa;
}

[data-theme="dark"] .carrito-close {
    border-color: #3f3f46;
    color: #a1a1aa;
}

[data-theme="dark"] .carrito-item {
    border-color: #27272a;
}

[data-theme="dark"] .carrito-item-info strong {
    color: #fafafa;
}

[data-theme="dark"] .carrito-qty {
    border-color: #3f3f46;
}

[data-theme="dark"] .carrito-qty button {
    background: #27272a;
    color: #fafafa;
}

[data-theme="dark"] .carrito-qty span {
    color: #fafafa;
}

[data-theme="dark"] .carrito-obs {
    background: #27272a;
    border-color: #3f3f46;
    color: #d4d4d8;
}

[data-theme="dark"] .carrito-cliente-section {
    border-color: #27272a;
}

[data-theme="dark"] .carrito-cliente-toggle {
    color: #fafafa;
}

[data-theme="dark"] .carrito-campo input {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}

[data-theme="dark"] .carrito-panel-footer {
    background: #1a1a1e;
    border-color: #27272a;
}

[data-theme="dark"] .carrito-total-row strong {
    color: #fafafa;
}

.btn-fc {
    padding: 10px;
    border-radius: 10px;
}