:root {
    /* Paleta con Acento Vibrante */
    --bg-body: #FFFFFF;
    --bg-card: #F5F5F7;
    --bg-input: #FAFAFA;
    --bg-dark: #0f1729;
    --bg-dark-card: rgba(255, 255, 255, 0.06);

    --text-main: #1D1D1F;
    --text-secondary: #86868B;
    --text-placeholder: #A1A1A6;

    --border-light: #D2D2D7;
    --border-focus: #0066CC;

    /* Colores de Acento */
    --accent: #2563EB;
    --accent-light: #3B82F6;
    --accent-dark: #1D4ED8;
    --accent-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --accent-gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 50%, #8B5CF6 100%);
    --accent-subtle: rgba(37, 99, 235, 0.08);

    /* Colores de Estado */
    --success: #059669;
    --success-bg: #ECFDF5;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;

    /* Sombras y Elevación */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-color: 0 8px 30px rgba(37, 99, 235, 0.15);

    /* Espaciado y Radio */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Tipografía */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilidades de Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

/* Botones con Color */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent);
    color: #FFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: scale(0.98) translateY(0);
}

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

.btn-secondary:hover {
    background-color: #E8E8ED;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Inputs Apple-style + accent */
.input-group {
    margin-bottom: 20px;
}

.input-field {
    width: 100%;
    padding: 16px;
    background-color: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    background-color: #FFF;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-subtle);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(37, 99, 235, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Utilidades Responsivas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Admin Global Responsiveness */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}

/* Config Card */
.config-card {
    background: #FFF;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Section Divider */
.section-divider {
    height: 4px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 2px;
    margin: 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }

    .container,
    .admin-container {
        padding: 0 16px;
    }

    .admin-container {
        margin: 20px auto;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }

    .page-title {
        font-size: 1.3rem !important;
    }

    /* RADICAL TABLE STACKING */
    .table-responsive {
        border: none;
        overflow: visible;
    }

    .apple-table,
    .admin-table {
        border: 0;
    }

    .apple-table thead,
    .admin-table thead {
        display: none;
    }

    .apple-table tr,
    .admin-table tr {
        display: block;
        background: #FFF;
        border: 1px solid var(--border-light);
        border-radius: 12px;
        margin-bottom: 16px;
        padding: 12px;
        box-shadow: var(--shadow-sm);
    }

    .apple-table td,
    .admin-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 8px 0 !important;
        border-bottom: 1px solid #F5F5F7 !important;
        font-size: 0.9rem !important;
    }

    .apple-table td:last-child,
    .admin-table td:last-child {
        border-bottom: 0 !important;
    }

    .apple-table td::before,
    .admin-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-secondary);
    }

    .user-cell {
        flex-direction: row-reverse;
        justify-content: flex-start;
        width: 100%;
    }

    .actions-group {
        width: 100%;
        justify-content: center !important;
        margin-top: 8px;
        padding-top: 12px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
    }

    .search-wrapper {
        max-width: 100% !important;
    }

    .stats-mini {
        font-size: 0.8rem;
        background: #f0f0f0;
        padding: 6px 12px;
        border-radius: 8px;
        display: inline-block;
    }

    .config-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .config-card,
    .review-card {
        padding: 20px !important;
        margin: 10px auto !important;
    }

    .actions-footer {
        flex-direction: column;
        gap: 12px !important;
    }

    .actions-footer .btn {
        width: 100% !important;
    }
}