/* ==========================================================================
   DESIGN SYSTEM & CUSTOM PROPERTIES (DAWOS EMBALAGENS)
   ========================================================================== */

/* Fontes Tipográficas Locais */
@font-face {
    font-family: 'Chillax';
    src: url('assets/fonts/CHILLAX/Chillax-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Chillax';
    src: url('assets/fonts/CHILLAX/Chillax-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Chillax';
    src: url('assets/fonts/CHILLAX/Chillax-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Chillax';
    src: url('assets/fonts/CHILLAX/Chillax-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/POPPINS/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/POPPINS/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/POPPINS/Poppins-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('assets/fonts/POPPINS/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'PT Mono';
    src: url('assets/fonts/PT MONO/pt-mono_bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Variáveis de Cores e Tokens (XTAGE.app Clean Light Mode Design System) */
:root {
    /* Cores de Fundo (Clean Light Slate / Pure White) */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);

    /* Cores de Marca (XTAGE Light Palette) */
    --color-marinho: #7c3aed;
    --color-marinho-light: #8b5cf6;
    --color-laranja: #d97706;
    --color-laranja-bright: #f59e0b;
    --color-amarelo: #eab308;
    --color-cyan: #0284c7;
    --color-purple: #7c3aed;

    /* Cores de Feedback & Neutras */
    --color-success: #16a34a;
    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-color-hover: #7c3aed;

    /* Efeitos XTAGE Light (Glassmorphism Light + Glowing Accents) */
    --glass-blur: blur(20px);
    --card-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --glow-orange: 0 0 20px rgba(217, 119, 6, 0.2);
    --glow-purple: 0 0 25px rgba(124, 58, 237, 0.25);
    --glow-cyan: 0 0 20px rgba(2, 132, 199, 0.2);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Fontes */
    --font-title: 'Chillax', 'Poppins', -apple-system, sans-serif;
    --font-body: 'Poppins', system-ui, sans-serif;
    --font-mono: 'PT Mono', monospace;
}

/* ==========================================================================
   RESET & CONFIGURAÇÕES GERAIS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Todo o site em letra maiúscula */
body, input:not([type="password"]), select, button, textarea, option {
    text-transform: uppercase !important;
}
::placeholder {
    text-transform: uppercase !important;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 10%, rgba(124, 58, 237, 0.08) 0px, transparent 40%),
        radial-gradient(at 90% 90%, rgba(2, 132, 199, 0.06) 0px, transparent 40%),
        radial-gradient(at 50% 50%, rgba(217, 119, 6, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.main-header {
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    box-shadow: var(--card-shadow);
}

.header-logo-container {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}

.header-title-container {
    flex-grow: 1;
    margin-left: 24px;
}

.header-title-container h1 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-text-primary);
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: block;
    margin-top: 2px;
}

.header-status {
    display: flex;
    align-items: center;
    background: rgba(217, 119, 36, 0.1);
    border: 1px solid rgba(217, 119, 36, 0.3);
    border-radius: 30px;
    padding: 6px 16px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--color-laranja);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px var(--color-laranja);
    animation: pulse-glow 2s infinite;
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-laranja);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes pulse-glow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */
.main-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: start;
}

/* Cards Genéricos */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
    border-color: rgba(44, 76, 124, 0.4);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h2 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   TABS & NAVEGAÇÃO
   ========================================================================== */
.tabs-navigation {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    margin-bottom: 28px;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.04);
}

.tab-btn {
    flex: 1;
    background: none;
    border: 1px solid transparent;
    color: #64748b;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 9999px;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    color: #ffffff;
    border: 1px solid #7c3aed;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
    font-weight: 700;
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-fast);
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FORMULÁRIOS & COMPONENTES DE ENTRADA
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.3px;
}

/* Inputs, Selects */
input[type="number"],
input[type="text"],
input[type="password"],
select {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: #0f172a;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px;
    width: 100%;
    outline: none;
    transition: all var(--transition-fast);
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #e3007e;
    box-shadow: 0 0 0 3px rgba(227, 0, 126, 0.15);
    background-color: #ffffff;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d97724'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 18px;
    padding-right: 44px;
    cursor: pointer;
}

.input-tip {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Grid de Opções de Caixas */
.box-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 280px));
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}

.box-option-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.box-option-card:hover {
    border-color: #e3007e;
    transform: translateY(-2px);
    background: #fdf2f8;
}

.box-option-card.active {
    background: #fdf2f8;
    border: 2px solid #e3007e;
    box-shadow: 0 8px 25px rgba(227, 0, 126, 0.2);
}

.option-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.option-icon svg {
    display: block;
    max-width: 100%;
    height: auto;
}

.option-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.option-desc {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Grid de Opções de Impressão */
.print-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.print-option-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.print-option-card input[type="radio"] {
    position: absolute;
    top: 16px;
    right: 16px;
    accent-color: var(--color-laranja);
}

.print-option-card:hover {
    border-color: rgba(27, 54, 93, 0.6);
    background: rgba(27, 54, 93, 0.08);
}

.print-option-card.active {
    background: rgba(217, 119, 36, 0.08);
    border-color: var(--color-laranja);
    box-shadow: var(--glow-orange);
}

.print-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.print-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

/* Controle de Quantidade com Slider */
.quantity-control-wrapper {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quantity-control-wrapper input[type="range"] {
    flex-grow: 1;
    height: 6px;
    border-radius: 10px;
    background: var(--border-color);
    outline: none;
    cursor: pointer;
    accent-color: var(--color-laranja);
}

.quantity-input-box {
    position: relative;
    width: 140px;
    flex-shrink: 0;
}

.quantity-input-box input[type="number"] {
    padding-right: 50px;
    text-align: right;
    font-family: var(--font-mono);
}

.unit-tag {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ==========================================================================
   SEÇÃO DO RESUMO (COLUNA DA DIREITA)
   ========================================================================== */
.sticky-container {
    position: sticky;
    top: 32px;
}

.summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    border-radius: 20px;
}

.summary-header .badge {
    background: rgba(227, 0, 126, 0.1);
    border: 1px solid rgba(227, 0, 126, 0.3);
    color: #e3007e;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.summary-header h2 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
}

.summary-client {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
}

.summary-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 24px 0;
}

/* Detalhes do Orçamento */
.summary-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.detail-label {
    color: #475569;
    font-weight: 600;
}

.detail-value {
    color: #0f172a;
    font-weight: 700;
}

/* Tabela de Custos */
.values-table-container h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

.values-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
}

.values-table th, 
.values-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.values-table th {
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.values-table td:nth-child(2), 
.values-table td:nth-child(3),
.values-table th:nth-child(2),
.values-table th:nth-child(3) {
    text-align: right;
    font-family: var(--font-mono);
}

.values-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Bloco de Preços Totais */
.price-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-row span {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.unit-price strong {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.total-price strong {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--color-laranja-bright);
    text-shadow: 0 0 10px rgba(255, 136, 36, 0.2);
}

.tax-info {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 4px;
}

/* ==========================================================================
   BOTÕES & AÇÕES
   ========================================================================== */
.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-laranja) 0%, #ff5200 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(217, 119, 36, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 36, 0.5);
    background: linear-gradient(135deg, var(--color-laranja-bright) 0%, #ff6624 100%);
}

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

.secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--color-text-primary);
    font-size: 0.8rem;
    padding: 12px 14px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVIDADE (TELA CHEIA & DISPOSITIVOS MÓVEIS)
   ========================================================================== */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sticky-container {
        position: static;
    }
}

@media (max-width: 600px) {
    body {
        padding-bottom: 20px;
    }
    
    .app-container {
        padding: 0 12px;
    }
    
    .main-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px 16px;
    }
    
    .header-title-container {
        margin-left: 0;
    }
    
    .card {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .col-span-2 {
        grid-column: span 1;
    }
    
    .print-options-grid {
        grid-template-columns: 1fr;
    }
    
    .quantity-control-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .quantity-input-box {
        width: 100%;
    }
    
    .secondary-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(27, 54, 93, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 119, 36, 0.15) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
}

/* Decorações Laterais da Tela de Login (Múltiplas Caixas) */
.login-decorations {
    position: absolute;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
}

/* Posições das Caixas da Esquerda */
.left-1 { left: 4%; top: 15%; opacity: 0.85; }
.left-2 { left: 12%; top: 48%; opacity: 0.65; }
.left-3 { left: 5%; top: 78%; opacity: 0.5; }

/* Posições das Caixas da Direita */
.right-1 { right: 4%; top: 20%; opacity: 0.9; }
.right-2 { right: 12%; top: 52%; opacity: 0.7; }
.right-3 { right: 5%; top: 80%; opacity: 0.45; }

/* Animações e Efeitos das Caixas */
.anim-box {
    animation: float-slow 6s ease-in-out infinite;
}

.left-1 .anim-box { animation-delay: 0s; }
.left-2 .anim-box { animation-delay: 1.5s; }
.left-3 .anim-box { animation-delay: 3s; }

.right-1 .anim-box { animation-delay: 2.25s; }
.right-2 .anim-box { animation-delay: 0.75s; }
.right-3 .anim-box { animation-delay: 3.75s; }

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Lógica das Tampas (Flaps) - Caixa Esquerda */
.box-flap {
    transition: transform 0.5s ease;
}

.flap-l {
    transform-origin: 25px 50px;
    animation: fold-flap-l 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.flap-r {
    transform-origin: 75px 50px;
    animation: fold-flap-r 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes fold-flap-l {
    0%, 15%, 85%, 100% { transform: rotate(0deg); }
    40%, 60% { transform: rotate(-120deg); }
}

@keyframes fold-flap-r {
    0%, 15%, 85%, 100% { transform: rotate(0deg); }
    40%, 60% { transform: rotate(120deg); }
}

/* Bolhas / Itens subindo da caixa aberta */
.bubble {
    transform-origin: center;
    animation: drift-bubbles 4s ease-in-out infinite;
}

.b1 { animation-delay: 1.2s; }
.b2 { animation-delay: 1.6s; }
.b3 { animation-delay: 1.4s; }

@keyframes drift-bubbles {
    0%, 20%, 80%, 100% {
        transform: translateY(15px) scale(0.1);
        opacity: 0;
    }
    40%, 60% {
        transform: translateY(-35px) scale(1.1);
        opacity: 0.85;
    }
}

/* Caixa Direita (Isometric Lid Lift) */
.box-lid-iso {
    transform-origin: 35px 37px;
    animation: lift-lid-iso 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 1.5s; /* defasagem para alternar com a esquerda */
}

@keyframes lift-lid-iso {
    0%, 15%, 85%, 100% { transform: translate(0, 0) rotate(0deg); }
    40%, 60% { transform: translate(-10px, -22px) rotate(-30deg); }
}

/* Esconder decorações em telas menores para melhor UX */
@media (max-width: 950px) {
    .login-decorations {
        display: none !important;
    }
}


.login-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
    border-color: rgba(27, 54, 93, 0.4);
    box-shadow: var(--glow-navy), var(--card-shadow);
    animation: fadeIn var(--transition-smooth);
}

.login-logo-container {
    margin-bottom: 20px;
}

.login-logo {
    height: 140px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.login-card h2 {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-card label,
.login-card input[type="text"],
.login-card input[type="password"] {
    text-transform: uppercase;
}

.login-card input[type="text"]::placeholder,
.login-card input[type="password"]::placeholder {
    text-transform: none; /* Keep placeholders normal case */
}

.btn-login {
    width: 100%;
    margin-top: 10px;
}

.login-error-msg {
    color: #ff5252;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: left;
    min-height: 18px;
}

/* ==========================================================================
   CORTINA DE BOAS-VINDAS (TRANSIÇÃO LATERAL COM LOGO DAWOS)
   ========================================================================== */
.curtain-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Painéis de abertura lateral */
.curtain-panel {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 10% 10%, rgba(124, 58, 237, 0.08) 0px, transparent 40%),
        radial-gradient(at 90% 90%, rgba(227, 0, 126, 0.08) 0px, transparent 40%);
    z-index: 1;
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

.curtain-panel-left {
    left: 0;
    border-right: 3px solid #e3007e;
    box-shadow: 10px 0 30px rgba(227, 0, 126, 0.15);
}

.curtain-panel-right {
    right: 0;
    border-left: 3px solid #e3007e;
    box-shadow: -10px 0 30px rgba(227, 0, 126, 0.15);
}

/* Animação: Abertura Lateral da Cortina */
.curtain-wrapper.open .curtain-panel-left {
    transform: translateX(-100%);
}

.curtain-wrapper.open .curtain-panel-right {
    transform: translateX(100%);
}

.curtain-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 860px;
    width: 90%;
    padding: 44px 36px;
    background: #ffffff;
    border: 2px solid #e3007e;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(227, 0, 126, 0.2), 0 10px 30px rgba(15, 23, 42, 0.08);
    opacity: 1;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    animation: zoomFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    cursor: pointer;
}

.curtain-wrapper.open .curtain-content {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.curtain-logo-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.curtain-logo {
    height: 110px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(227, 0, 126, 0.2);
    border: 2px solid #e3007e;
}

.curtain-welcome-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #e3007e 0%, #ff5500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.curtain-user-greeting {
    font-size: 1.2rem;
    color: #475569;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.curtain-user-greeting span {
    font-weight: 800;
    color: #e3007e;
}

.curtain-loader {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(227, 0, 126, 0.15);
    border-top: 3px solid #e3007e;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

.curtain-wrapper.hidden {
    display: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes zoomFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   TELA INICIAL DO ADMINISTRADOR (SELEÇÃO DE PAINÉIS)
   ========================================================================== */
.admin-landing-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(27, 54, 93, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 119, 36, 0.15) 0px, transparent 50%);
}

.admin-landing-card {
    max-width: 800px;
    width: 100%;
    text-align: center;
    border-color: rgba(27, 54, 93, 0.4);
    box-shadow: var(--glow-navy), var(--card-shadow);
    animation: fadeIn var(--transition-smooth);
    padding: 48px;
}

.admin-landing-logo-container {
    margin-bottom: 24px;
}

.admin-landing-logo {
    height: 96px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.admin-landing-card h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-text-primary);
}

.admin-landing-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.panel-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    text-align: left;
    margin-bottom: 40px;
}

.panel-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-card:hover {
    border-color: var(--color-laranja);
    transform: translateY(-5px);
    box-shadow: var(--glow-orange);
    background: rgba(217, 119, 36, 0.03);
}

.panel-card-icon {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--color-laranja);
}

.panel-card h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.panel-card p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    flex-grow: 1;
}

.panel-card-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-laranja);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
    margin-top: auto;
}

.panel-card:hover .panel-card-btn {
    color: var(--color-laranja-bright);
    text-decoration: underline;
}

.admin-landing-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    padding-top: 28px;
}

/* ==========================================================================
   OUTROS ESTILOS / HEADER E LOGOUT
   ========================================================================== */
.header-status-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-back-to-landing {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-back-to-landing:hover {
    background: var(--color-marinho);
    color: white;
    border-color: var(--color-marinho-light);
    box-shadow: var(--glow-navy);
}

.btn-logout {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: #ff5252;
    padding: 8px 16px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: #ff5252;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
}

/* ==========================================================================
   TAB ADMIN (GERENCIADOR DE ACESSOS)
   ========================================================================== */
.admin-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.btn-invite {
    font-size: 0.75rem;
    padding: 8px 16px;
    font-weight: 600;
    background: rgba(217, 119, 36, 0.12);
    border: 1px solid rgba(217, 119, 36, 0.4);
    color: var(--color-laranja-bright);
}

.btn-invite:hover {
    background: var(--color-laranja);
    color: white;
}

/* Sub-abas Administrativas no Gerenciamento Geral */
.admin-menu-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-menu-btn {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-input) !important;
    color: var(--color-text-secondary) !important;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-menu-btn:hover {
    border-color: var(--color-laranja) !important;
    color: var(--color-text-primary) !important;
    background: rgba(217, 119, 36, 0.08) !important;
}

.admin-menu-btn.active {
    background: linear-gradient(135deg, var(--color-laranja-bright) 0%, #c25e1a 100%) !important;
    color: #ffffff !important;
    border-color: var(--color-laranja-bright) !important;
    box-shadow: var(--glow-orange) !important;
    font-weight: 700 !important;
}

.admin-table-wrapper {
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-top: 12px;
}

.admin-table {
    width: 100%;
}

.admin-table th {
    background: rgba(27, 54, 93, 0.2);
}

.admin-table input[type="text"] {
    background: #060b13;
    padding: 6px 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    width: 100%;
}

.admin-table input[type="text"]:focus {
    border-color: var(--color-laranja);
}

.btn-admin-action {
    background: var(--color-marinho);
    color: white;
    font-size: 0.75rem;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.btn-admin-action:hover {
    background: var(--color-marinho-light);
}

/* Utilitários */
.hidden {
    display: none !important;
}

/* ==========================================================================
   SUB-OPÇÕES DE TIPO DE CAIXA
   ========================================================================== */
.sub-options-container {
    animation: fadeIn var(--transition-fast);
}

.sub-options-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.sub-options-grid.active {
    display: grid;
}

.sub-option-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sub-option-card:hover {
    border-color: rgba(44, 76, 124, 0.5);
    background: rgba(27, 54, 93, 0.08);
    transform: translateY(-2px);
}

.sub-option-card.active {
    background: rgba(217, 119, 36, 0.08);
    border-color: var(--color-laranja);
    box-shadow: var(--glow-orange);
}

.sub-option-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.sub-option-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* ==========================================================================
   CARDS DE SEÇÃO ADMINISTRATIVA (CADASTROS GERAIS)
   ========================================================================== */
.admin-section-card {
    background: rgba(10, 20, 36, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.admin-section-card h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ==========================================================================
   MODOS DE EXIBIÇÃO DA APLICAÇÃO (MODO PRECIFICAÇÃO E MODO ADM)
   ========================================================================== */
/* Forçamos layout de coluna única centralizada para a calculadora e administração */
.app-container.mode-pricing .main-content,
.app-container.mode-admin .main-content {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* Ocultamos a coluna lateral original de resumo financeiro */
.app-container.mode-pricing .summary-section,
.app-container.mode-admin .summary-section {
    display: none;
}

/* Ocultação da aba de cadastro no modo precificação (calculadora) */
.app-container.mode-pricing .tab-btn[data-target="tab-admin"] {
    display: none !important;
}

/* Modo Administrativo: Esconde abas de navegação da calculadora e outras abas de conteúdo */
.app-container.mode-admin .tabs-navigation {
    display: none !important;
}
.app-container.mode-admin .tab-content:not(#tab-admin) {
    display: none !important;
}
.app-container.mode-admin #tab-admin {
    display: block !important;
}
.app-container.mode-admin .main-content {
    max-width: 1200px; /* Mais largura para visualizar as tabelas administrativas */
}

/* ==========================================================================
   MODAL DE CONFIGURAÇÃO DE DIMENSÕES
   ========================================================================== */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 11, 19, 0.82);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn var(--transition-fast);
}

.modal-wrapper.hidden {
    display: none !important;
}

.modal-card {
    max-width: 600px;
    width: 90%;
    background: var(--bg-card);
    border: 1px solid var(--border-color-hover);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--card-shadow), var(--glow-navy);
    animation: zoomFadeIn var(--transition-fast);
}

.modal-header h2 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-laranja-bright);
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    margin-bottom: 24px;
}

/* Badge de pré-visualização de dimensões */
.dimensions-preview-text {
    border-radius: 8px;
    background: rgba(217, 119, 36, 0.05);
    border: 1px dashed rgba(217, 119, 36, 0.2);
    padding: 8px 16px;
    display: inline-block;
}

/* Correção de legibilidade em dropdowns (options com texto legível) */
select option {
    background-color: #060b13 !important;
    color: #ffffff !important;
}

/* Submenu Administrativo: Botões ativos */
.admin-menu-btn.active {
    background: var(--color-laranja) !important;
    color: white !important;
    border-color: var(--color-laranja-bright) !important;
    box-shadow: var(--glow-orange);
}
