/* css/base.css - Global Variables & Resets */

:root {
    --bg-black: #030512;
    --bg-dark: #020617;
    --bg-glass: rgba(15, 23, 42, 0.9);
    --border-slate: rgba(148, 163, 184, 0.7);
    --text-main: #e5e7eb;
    --text-dim: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-purple: #a855f7;
    --gradient-sa: linear-gradient(135deg, #a855f7 0%, #7c3aed 60%, #20ead7 100%);
    --shadow-sa: 0 4px 15px rgba(124, 58, 237, 0.3);
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-black);
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    color: var(--text-main);
    overflow: hidden;
    /* Prevent body scroll if app shell handles it */
}

img,
svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Global Scrollbars (Silicon Valley Minimalist Style) */
::-webkit-scrollbar {
    width: 8px;
    /* Delgada para un look premium */
}

::-webkit-scrollbar-track {
    background: transparent;
    /* Fondo transparente */
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    /* Muy sutil */
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
    /* Se nota más al pasar el mouse */
}

/* Utilities */
.sa-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.12);
    color: #67e8f9;
}

.sa-badge--platform {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

.sa-spin {
    display: inline-block;
    animation: sa-spin 1s linear infinite;
}

@keyframes sa-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sa-view {
    display: none;
    flex: 1;
    width: 100%;
}

.sa-view--active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Utilities & Modifiers */
.sa-hidden {
    display: none !important;
}

.sa-visible {
    display: block !important;
}

.sa-text-dim {
    color: var(--text-dim) !important;
}

.sa-text-danger {
    color: #ef4444 !important;
}

.sa-text-success {
    color: #22c55e !important;
}

.sa-text-center {
    text-align: center !important;
}

.sa-flex {
    display: flex !important;
}

.sa-flex-col {
    flex-direction: column !important;
}

.sa-flex-grow {
    flex: 1 !important;
}

.sa-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-flex-end {
    display: flex;
    align-items: flex-end;
}

.sa-gap-10 {
    gap: 10px !important;
}

.sa-pos-rel {
    position: relative !important;
}

.sa-pos-abs {
    position: absolute !important;
}

.sa-w-full {
    width: 100% !important;
}

.sa-m-0 {
    margin: 0 !important;
}

.sa-mt-8 {
    margin-top: 8px !important;
}

.sa-mt-20 {
    margin-top: 20px !important;
}

.sa-border-top {
    border-top: 1px solid #334155 !important;
}

.sa-pt-20 {
    padding-top: 20px !important;
}

.sa-title-small {
    font-size: 1rem !important;
    margin: 0 !important;
}

.sa-title-modal {
    margin-bottom: 15px !important;
    color: #ffffff !important;
}

.sa-mt-4 {
    margin-top: 4px !important;
}

.sa-forgot-link {
    color: #94a3b8 !important;
    font-size: 0.9rem !important;
    text-decoration: none;
}

.sa-break-all {
    word-break: break-all !important;
}

/* Generic Cards */
.sa-chat,
.sa-upload,
.sa-report,
.sa-right-panel,
.sa-right-panel>section {
    background: var(--bg-glass);
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
    box-sizing: border-box;
    border: none;
    width: 100%;
    /* Asegura que se estiren simétricamente */
}

/* Distinct background for Chat & Upload (Matches Curation) - ENGAGEMENT AND AUDIT */
#sa-view-engagement .sa-chat,
#sa-view-engagement .sa-upload,
#sa-view-audit .sa-chat,
#sa-view-audit .sa-upload {
    background: #1e2230 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.4);
    width: 100%;
    box-sizing: border-box;
}

.sa-card-header h2 {
    font-size: 1.1rem;
    margin: 0;
    color: #f8fafc;
    font-weight: 600;
}

.sa-card-header p {
    margin: 4px 0 10px;
    font-size: 0.8rem;
    color: var(--text-dim);
}