/* ===========================================
   EDIR SEGUROS - Sistema de Gestión de Pólizas
   Estilos Corporativos
   =========================================== */

/* ===== VARIABLES CSS ===== */
:root {
    /* Colores Corporativos */
    --gold-primary: #D4A853;
    --gold-dark: #B8860B;
    --gold-light: #E8C97A;
    --gold-gradient: linear-gradient(135deg, #D4A853 0%, #B8860B 100%);

    /* Colores Oscuros */
    --dark-primary: #1A1A1A;
    --dark-secondary: #2D2D2D;
    --dark-tertiary: #3D3D3D;

    /* Colores Claros */
    --light-bg: #F5F6FA;
    --light-card: #FFFFFF;
    --light-border: #E5E7EB;

    /* Colores de Texto */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-light: #FFFFFF;

    /* Colores Semáforo */
    --status-success: #10B981;
    --status-warning: #F59E0B;
    --status-danger: #EF4444;
    --status-info: #3B82F6;
    --status-orange: #F97316;

    /* Sombras */
    --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 -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Bordes */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

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

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-primary);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow: hidden;
}

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

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--dark-tertiary);
    min-height: 80px;
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
    transition: all var(--transition-normal);
}

.sidebar.collapsed .sidebar-logo {
    max-width: 50px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: var(--dark-secondary);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--dark-tertiary);
    border-radius: 2px;
}

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

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

.sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    position: relative;
    gap: 0.75rem;
}

.nav-item:hover {
    color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.1);
}

.nav-item.active {
    color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-primary);
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-fast);
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--status-danger);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    min-width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-badge {
    display: none;
}

/* Submenu */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background: rgba(0, 0, 0, 0.2);
}

.nav-item.has-submenu.open + .nav-submenu {
    max-height: 500px;
}

.nav-submenu .nav-item {
    padding-left: 3.5rem;
    font-size: 0.875rem;
}

.nav-item .chevron {
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.nav-item.has-submenu.open .chevron {
    transform: rotate(90deg);
}

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

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

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-primary);
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar.collapsed .sidebar-user-info {
    display: none;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* ===== HEADER ===== */
.header {
    background: var(--light-card);
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--light-bg);
    color: var(--gold-primary);
}

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

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.header-breadcrumb a:hover {
    color: var(--gold-primary);
}

.header-breadcrumb .separator {
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Search Bar */
.header-search {
    position: relative;
    width: 300px;
}

.header-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius-lg);
    background: var(--light-bg);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.header-search input:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: var(--light-card);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

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

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--light-border);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Header Actions */
.header-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
    transition: all var(--transition-fast);
}

.header-action:hover {
    background: var(--light-bg);
    color: var(--gold-primary);
}

.header-action .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--status-danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.content {
    flex: 1;
    padding: 1.5rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-header-left p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== CARDS ===== */
.card {
    background: var(--light-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-border);
    overflow: hidden;
}

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

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

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-border);
    background: var(--light-bg);
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--light-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card-icon.gold {
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-primary);
}

.stat-card-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-success);
}

.stat-card-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
}

.stat-card-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-danger);
}

.stat-card-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--status-info);
}

.stat-card-content {
    flex: 1;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-card-change.positive {
    color: var(--status-success);
}

.stat-card-change.negative {
    color: var(--status-danger);
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--dark-primary);
    box-shadow: 0 2px 4px rgba(212, 168, 83, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(212, 168, 83, 0.4);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--light-border);
}

.btn-outline {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: var(--dark-primary);
}

.btn-danger {
    background: var(--status-danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-success {
    background: var(--status-success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

/* ===== TABLAS ===== */
.table-container {
    overflow-x: auto;
}

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

.table th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--light-bg);
    border-bottom: 1px solid var(--light-border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-border);
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

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

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

/* ===== BADGES/STATUS ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--status-info);
}

.badge-orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--status-orange);
}

.badge-gold {
    background: rgba(212, 168, 83, 0.15);
    color: var(--gold-primary);
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.success { background: var(--status-success); }
.status-dot.warning { background: var(--status-warning); }
.status-dot.danger { background: var(--status-danger); }
.status-dot.info { background: var(--status-info); }
.status-dot.orange { background: var(--status-orange); }

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

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--status-danger);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    background: var(--light-card);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

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

.form-control:disabled {
    background: var(--light-bg);
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--status-danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    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='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--status-danger);
    margin-top: 0.375rem;
}

/* Input Group */
.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
    padding: 0.625rem 0.875rem;
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.input-group-text:first-child {
    border-right: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-text:last-child {
    border-left: 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    accent-color: var(--gold-primary);
}

.form-check-input:checked {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Switch */
.form-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.form-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch-slider {
    width: 44px;
    height: 24px;
    background: var(--light-border);
    border-radius: 9999px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.form-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.form-switch input:checked + .form-switch-slider {
    background: var(--gold-primary);
}

.form-switch input:checked + .form-switch-slider::before {
    transform: translateX(20px);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--light-border);
    gap: 0.25rem;
}

.tab {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--gold-primary);
    border-bottom-color: var(--gold-primary);
}

.tab-content {
    padding: 1.5rem 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ===== MODAL ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--light-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all var(--transition-normal);
}

.modal-backdrop.active .modal {
    transform: scale(1) translateY(0);
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1140px;
}

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

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

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--status-danger);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065F46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400E;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991B1B;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1E40AF;
}

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--light-bg);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--gold-primary);
    color: var(--dark-primary);
}

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

/* ===== AVATAR ===== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

.avatar-gold {
    background: var(--gold-gradient);
    color: var(--dark-primary);
}

/* ===== DROPDOWN ===== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--light-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--light-border);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--light-bg);
}

.dropdown-item i {
    color: var(--text-secondary);
    width: 18px;
}

.dropdown-divider {
    height: 1px;
    background: var(--light-border);
    margin: 0.5rem 0;
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 0.375rem 0.75rem;
    background: var(--dark-primary);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* ===== GRID HELPERS ===== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== FLEX HELPERS ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* ===== SPACING HELPERS ===== */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

/* ===== TEXT HELPERS ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold-primary); }
.text-success { color: var(--status-success); }
.text-warning { color: var(--status-warning); }
.text-danger { color: var(--status-danger); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
}

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

.empty-state-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===== LOADING ===== */
.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--light-border);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ===== PROGRESS BAR ===== */
.progress {
    height: 8px;
    background: var(--light-bg);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 9999px;
    transition: width var(--transition-normal);
}

.progress-bar.success { background: var(--status-success); }
.progress-bar.warning { background: var(--status-warning); }
.progress-bar.danger { background: var(--status-danger); }

/* ===== FILE UPLOAD ===== */
.file-upload {
    border: 2px dashed var(--light-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload:hover {
    border-color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.05);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-upload-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--light-border);
}

.timeline-item {
    position: relative;
    padding-left: 45px;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--light-card);
    border: 2px solid var(--gold-primary);
}

.timeline-content {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }

    .header-search {
        width: 200px;
    }
}

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

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

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

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .header-search {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--dark-primary);
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--dark-primary) 0%, var(--dark-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.1) 0%, transparent 70%);
}

.login-branding {
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-logo {
    max-width: 300px;
    margin-bottom: 2rem;
}

.login-tagline {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--light-card);
}

.login-form-container {
    width: 100%;
    max-width: 360px;
}

.login-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-form-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

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

.login-forgot {
    font-size: 0.875rem;
    color: var(--gold-primary);
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

@media (max-width: 960px) {
    .login-left {
        display: none;
    }

    .login-right {
        width: 100%;
    }
}
