/* style_fresh_v4_8.css - ManuSystems v4.8 Master Visual */
/* Wrapper: importa tema base + tema ativo (bougainvillea) */

/* ─── BASE DO SISTEMA DE TEMAS ─── */
@import url('/02_Css/temas/_base/_tokens.css');
@import url('/02_Css/temas/_base/_components.css');
@import url('/02_Css/temas/_base/_layout.css');
@import url('/02_Css/temas/_base/_animations.css');
@import url('/02_Css/temas/_base/_utils.css');

/* ─── TEMA ATIVO (trocar este import para trocar o tema) ─── */
@import url('/02_Css/temas/manu-bougainvillea/theme.css');

/* ─── ALIASES DE COMPATIBILIDADE ─── */
/* Variáveis antigas que o código legado usa — apontam para tokens semânticos */
:root {
    --fresh-rose-bg: var(--color-accent-light);
    --fresh-green-bg: var(--color-action-light);
    --fresh-green-active: var(--color-action-primary);
    --fresh-green-subtle: var(--color-action-light);
    --gold-accent: var(--color-accent-primary);
    --text-serif: var(--color-text-primary);
    --text-data: var(--color-text-secondary);
    --glass-bg: var(--color-bg-card);
    --glass-border: var(--color-border-light);
    --ferrari-red: #FF2800;

    /* Variáveis diretas (para código que usa --bg-wall, --green-primary, etc.) */
    --bg-wall: var(--color-bg-base);
    --bg-panel: var(--color-bg-panel);
    --bg-card: var(--color-bg-card);
    --bg-sidebar: var(--color-bg-sidebar);
    --bg-input: var(--color-bg-input);
    --green-primary: var(--color-action-primary);
    --green-hover: var(--color-action-hover);
    --green-light: var(--color-action-light);
    --rose-gold: var(--color-accent-primary);
    --rose-soft: var(--color-accent-primary);
    --rose-light: var(--color-accent-light);
    --text-primary: var(--color-text-primary);
    --text-secondary: var(--color-text-secondary);
    --text-muted: var(--color-text-muted);
    --text-on-green: var(--color-text-on-action);
    --text-on-dark: var(--color-bg-panel);
    --border-light: var(--color-border-light);
    --border-green: var(--color-action-primary);
    --divider: var(--color-divider);
    --event-blue: var(--color-event-1);
    --event-pink: var(--color-event-2);
    --event-yellow: var(--color-event-3);
    --event-cream: var(--color-event-4);
    --event-sage: var(--color-event-5);
    --shadow-sm: var(--shadow-sm);
    --shadow-md: var(--shadow-md);
    --shadow-lg: var(--shadow-lg);
}

/* ─── SERIF TITLE ─── */
.serif-title { font-family: var(--font-brand); font-weight: 700; color: var(--color-text-primary); }
.sans-data { font-family: var(--font-body); font-weight: 400; color: var(--color-text-secondary); }
.gold-text { color: var(--color-accent-primary) !important; }
.sub-fresh { color: var(--color-text-muted); }
.fresh-green-text { color: var(--color-action-primary); }

/* ─── GLASS CARD (alias de .ms-panel) ─── */
.glass-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    transition: 0.3s ease-in-out;
}
.glass-card:hover { box-shadow: var(--shadow-md); }
.gold-border { border: 1px solid rgba(var(--theme-shadow-rgb), 0.15); }

/* ─── PANEL CARD ─── */
.panel-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: box-shadow 0.3s ease-in-out;
}
.panel-card:hover { box-shadow: var(--shadow-md); }

/* ─── EVENT CARD ─── */
.event-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.2s;
}
.event-card:hover { box-shadow: var(--shadow-md); }
.event-card .event-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.event-card.blue .event-dot { background: var(--color-event-1); }
.event-card.pink .event-dot { background: var(--color-event-2); }
.event-card.yellow .event-dot { background: var(--color-event-3); }
.event-card.cream .event-dot { background: var(--color-event-4); }
.event-card.sage .event-dot { background: var(--color-event-5); }

/* ─── STATS CARD ─── */
.stats-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stats-card .stats-value {
    font-family: var(--font-brand);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}
.stats-card .stats-label { font-size: 13px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stats-card .stats-sub { font-size: 12px; color: var(--color-text-muted); }

/* ─── PILLS ─── */
.pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; gap: 6px; }
.pill-green { background: var(--color-action-light); color: var(--color-action-primary); }
.pill-green-light { background: var(--color-action-light); color: var(--color-action-primary); }

/* ─── BOTÕES ─── */
.btn-primary {
    background-color: var(--color-action-primary);
    color: var(--color-text-on-action) !important;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(var(--theme-shadow-rgb), 0.12);
    transition: 0.3s;
    text-transform: none;
}
.btn-primary:hover { background-color: var(--color-action-hover); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(var(--theme-shadow-rgb), 0.18); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-fresh-green {
    background-color: var(--color-action-primary);
    color: var(--color-text-on-action) !important;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 16px;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(var(--theme-shadow-rgb), 0.15);
    transition: 0.3s;
    text-transform: uppercase;
}
.btn-fresh-green:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(var(--theme-shadow-rgb), 0.2); }
.btn-fresh-green:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-back {
    position: absolute;
    top: 16px; right: 16px;
    background-color: var(--color-action-primary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}
.btn-back:hover { transform: translateY(-2px); }

/* ─── SIDEBAR BUTTONS ─── */
.sidebar-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: 0.2s;
    font-family: var(--font-body);
}
.sidebar-btn:hover { background: var(--color-action-light); color: var(--color-text-primary); font-weight: 500; }
.sidebar-btn.active { background: var(--color-action-light); color: var(--color-action-primary); font-weight: 600; }

/* ─── INPUTS ─── */
.input-field, .input-fresh, .select-fresh {
    width: 100%;
    padding: 12px 16px;
    margin-top: 8px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    background: var(--color-bg-input);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color 0.2s;
}
.input-field:focus, .input-fresh:focus, .select-fresh:focus {
    outline: none;
    border-color: var(--color-action-primary);
    box-shadow: 0 0 0 3px rgba(var(--theme-shadow-rgb), 0.08);
}

/* ─── CHECKBOX ─── */
.checkbox-custom {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px;
    border: 2px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-input);
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    flex-shrink: 0;
}
.checkbox-custom:checked { background: var(--color-action-primary); border-color: var(--color-action-primary); }
.checkbox-custom:checked::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px; font-weight: 700;
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--color-bg-sidebar);
    border-right: 1px solid var(--color-border-light);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex-shrink: 0;
}
.logo-area { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.main-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.system-name { font-size: 20px; letter-spacing: 1px; color: var(--color-text-primary); }
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.nav-links li {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text-secondary);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-links li:hover, .nav-links li.active { background: var(--color-action-light); color: var(--color-text-primary); font-weight: 500; }
.icon-green { color: var(--color-action-primary); }

/* ─── CONTEÚDO ─── */
.content { flex: 1; padding: 30px; overflow-y: auto; }

/* ─── HEADER ─── */
.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; position: relative; }
.main-header h1 { font-size: 28px; color: var(--color-text-primary); }
.profile-area { display: flex; align-items: center; gap: 12px; }
.profile-pic { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-accent-primary); }
.status-fresh { font-size: 12px; color: var(--color-action-primary); font-weight: 600; }

/* ─── KPIs ─── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card-kpi { display: flex; flex-direction: column; gap: 8px; }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.kpi-value { font-size: 42px; line-height: 1; color: var(--color-text-primary); }
.kpi-sub { font-size: 12px; color: var(--color-text-muted); }

/* ─── SEÇÃO ─── */
.section-title { font-size: 18px; color: var(--color-text-primary); }
.quick-actions-grid { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─── LOADER ─── */
.loader-container { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; gap: 20px; }
.loader-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--color-border-light);
    border-top-color: var(--color-action-primary);
    border-radius: 50%;
    animation: ms-spin 0.8s linear infinite;
}
.loader-texto { font-size: 15px; color: var(--color-text-secondary); font-style: italic; }

/* ─── TOAST ─── */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    z-index: 998;
    box-shadow: var(--shadow-lg);
}
.toast.hidden { display: none; }
.toast.success { background: var(--color-action-primary); color: white; }
.toast.error { background: var(--color-accent-primary); color: white; }
.toast.warning { background: #C07820; color: white; }

/* ─── MODAL CRÍTICO ─── */
.critical-blocking-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.critical-blocking-modal.active { visibility: visible; opacity: 1; }
.modal-content-alert {
    background-color: var(--ferrari-red);
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid var(--color-accent-primary);
    box-shadow: 0 0 50px rgba(255, 40, 0, 0.5);
    max-width: 80%;
}
.modal-content-alert .alert-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 36px;
    color: white;
    text-transform: uppercase;
    margin: 0 0 30px 0;
    letter-spacing: 2px;
}
.modal-content-alert .alert-text {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}
.btn-stop-proceeding {
    background-color: white;
    color: var(--ferrari-red);
    border: none;
    padding: 20px 50px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}
.btn-stop-proceeding:hover { opacity: 0.9; transform: translateY(-2px); }

/* ─── NAV INFERIOR MOBILE ─── */
.nav-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-bg-sidebar);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 16px;
    z-index: 100;
}
.nav-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 4px 12px;
    border-radius: var(--radius-md);
    transition: 0.2s;
}
.nav-bottom-item.active { color: var(--color-action-primary); font-weight: 600; }
.nav-bottom-icon { font-size: 20px; }

/* ─── RESPONSIVO ─── */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { display: none; }
    .content { padding: 20px 16px 80px; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .glass-card, .panel-card { padding: 16px; border-radius: var(--radius-lg); }
    .main-header h1 { font-size: 22px; }
}
