/* =====================================================================
   ESTILOS PORTAL UNIFICADO DO CLIENTE DAXV (LOJA & CANTINA)
   ===================================================================== */

:root {
    --bg-dark: #070707;
    --card-bg: #121212;
    --border: #222222;
    --accent: #f39c12;        /* Dourado/Laranja Loja DAXV */
    --cantina-color: #3498db; /* Azul Tático Cantina APMBB */
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f1c40f;
    --text-main: #ffffff;
    --text-muted: #888888;
    --text-light: #cccccc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================================
   LAYOUT DA ESTRUTURA UNIFICADA (SIDEBAR + MAIN CONTENT)
   ===================================================================== */
.dashboard-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #0b0c10;
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.dashboard-content {
    flex: 1;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.sidebar-section {
    margin-bottom: 20px;
}

.btn-sidebar {
    width: 100%;
    padding: 12px 15px;
    background: #151515;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.btn-sidebar:hover, .btn-sidebar.active {
    background: #222222;
    color: #ffffff;
    border-color: var(--accent);
}

.btn-sidebar.highlight {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sidebar.danger {
    color: var(--danger);
    border-color: rgba(231, 76, 60, 0.3);
}

.select-sidebar {
    width: 100%;
    background: #151515;
    color: #ffffff;
    border: 1px solid #333333;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-sidebar:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

/* CARDS DE SALDO E INDICADORES DE DEBITO */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    min-width: 250px;
    background: #111111;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
}

.stat-card.loja {
    border-left: 4px solid var(--accent);
}

.stat-card.cantina {
    border-left: 4px solid var(--danger);
}

/* CARDS GERAIS (MODERNO DARK GLASSMORPHISM) */
.v2-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* COMPONENTES DE ENTRADA (FORMULÁRIOS) */
.input-group {
    margin-bottom: 15px;
}

.input-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.input-wrapper input, .input-group select, .input-group input[type="number"] {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: #181818;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group select {
    padding-left: 14px;
}

.input-wrapper select {
    padding-left: 40px !important;
}

.input-wrapper input:focus, .input-group select:focus, .input-wrapper select:focus, .input-group input[type="number"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
}

/* ESTILOS ESPECÍFICOS MÓDULO NOVA ENCOMENDA */
.encomenda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .encomenda-grid {
        grid-template-columns: 1fr !important;
    }
}

.bordado-box {
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-left: 3px solid var(--accent);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 18px;
}

/* BOTÕES DE AÇÃO */
.btn-v1-orange {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-v1-orange:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-v1-green {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25);
}

.btn-v1-green:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.35);
}

.btn-v1-blue {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-secundario {
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 8px;
    text-transform: uppercase;
}

/* AUTENTICAÇÃO TELA CENTRAL */
.auth-container {
    max-width: 420px;
    width: 90%;
    margin: auto;
    padding: 20px 0;
}

.msg-erro {
    display: none;
    background: rgba(231, 76, 60, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 8px;
    padding: 12px;
    font-size: 11px;
    text-align: center;
    margin-top: 12px;
    font-weight: 600;
}

.msg-sucesso {
    display: none;
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
    border-radius: 8px;
    padding: 12px;
    font-size: 11px;
    text-align: center;
    margin-top: 12px;
    font-weight: 600;
}

/* BACKDROP E MENU DRAWER MOBILE (80% LARGURA PELA ESQUERDA) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.sidebar-mobile-close-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #222;
}

.mobile-header {
    display: none;
    background: #0b0c10;
    border-bottom: 1px solid var(--border);
    padding: 12px 15px;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 990;
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .mobile-header {
        display: flex;
    }

    .sidebar-mobile-close-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        z-index: 999;
        background: #090a0d;
        border-right: 1px solid #222;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 18px 16px;
        display: flex;
    }

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

    .dashboard-content {
        padding: 15px;
    }
}

/* =====================================================================
   TOGGLE SWITCHES (NOTIFICAÇÕES DE E-MAIL NO MENU LATERAL)
   ===================================================================== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #22252c;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    border: 1px solid #333742;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #666c7a;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: rgba(46, 204, 113, 0.2);
    border-color: #2ecc71;
}

input:checked + .toggle-slider:before {
    transform: translateX(18px);
    background-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

