/* ==========================================================================
   IFMSA Brazil - Loja Temática (Design System & Stylesheet)
   ========================================================================== */

/* --- CONFIGURAÇÃO DE VARIÁVEIS --- */
:root {
    /* Paleta Oficial */
    --primary: #1d3768;
    --primary-light: #2c4e8c;
    --primary-dark: #0f2042;
    --primary-rgb: 29, 55, 104;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-gradient: linear-gradient(135deg, var(--primary), var(--accent));
    
    /* Estados & Feedbacks */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-text: #065f46;
    
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-text: #92400e;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-text: #991b1b;
    
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    
    /* Cores de Fundo e Cartões (Glassmorphism) */
    --bg-body: #f4f6fc;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-card: rgba(255, 255, 255, 0.6);
    --border-color: rgba(226, 232, 240, 0.8);
    
    /* Cores de Texto */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-white: #ffffff;
    
    /* Sombras e Bordas */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 25px rgba(29, 55, 104, 0.05), 0 2px 6px rgba(29, 55, 104, 0.05);
    --shadow-lg: 0 20px 35px -5px rgba(29, 55, 104, 0.08), 0 10px 15px -5px rgba(29, 55, 104, 0.04);
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & DECORATION --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(29, 55, 104, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-dark);
}

/* --- NAV BAR --- */
.store-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 5%;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-store {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-dark);
}

.brand-store-icon {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.2));
}

.brand-store-text h1 {
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand-store-text span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: rgba(29, 55, 104, 0.06);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-trigger {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 10px;
    color: var(--primary);
    transition: var(--transition);
}

.cart-trigger:hover {
    transform: scale(1.08);
}

.cart-icon {
    font-size: 1.35rem;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-status-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(29, 55, 104, 0.15);
}

.user-status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(29, 55, 104, 0.25);
}

.user-status-btn.logged-in {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.user-status-btn.logged-in:hover {
    background: #f8fafc;
}

/* --- MAIN CONTAINER --- */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 5%;
}

.section-title {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title h2 {
    font-size: 1.75rem;
    position: relative;
    padding-bottom: 6px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.hidden {
    display: none !important;
}

/* --- TELA DE LOGIN RESTIRTO --- */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(80vh - 100px);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    transition: var(--transition);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.login-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 55, 104, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(29, 55, 104, 0.25);
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.login-credentials {
    margin-top: 25px;
    padding: 15px;
    border-radius: var(--radius-md);
    background-color: rgba(29, 55, 104, 0.03);
    border: 1px dashed var(--border-color);
}

.login-credentials summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    outline: none;
}

.login-credentials p {
    font-size: 0.75rem;
    margin-top: 10px;
    color: var(--text-muted);
}

.login-credentials code {
    background: rgba(0,0,0,0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}

/* --- FILTROS DO CATÁLOGO --- */
.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- PRODUTOS GRID --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.badge-demand {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-stock {
    background: #d1fae5;
    color: #047857;
}

.product-image-container {
    height: 220px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image-container i {
    font-size: 5rem;
    color: var(--primary-light);
    opacity: 0.65;
    transition: var(--transition);
}

.product-card:hover .product-image-container i {
    transform: scale(1.15) rotate(5deg);
    opacity: 0.85;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-options {
    margin-bottom: 15px;
}

.size-selector {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.size-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.size-btn:hover, .size-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.product-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.add-to-cart-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.add-to-cart-btn i {
    font-size: 0.95rem;
}

/* --- CARRINHO DRAWER --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 200;
    transition: cubic-bezier(0.4, 0, 0.2, 1) 0.35s;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 32, 66, 0.4);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.close-cart-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.cart-empty-message i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.cart-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-price-qty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    background: #f8fafc;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-val {
    width: 30px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.remove-item-btn:hover {
    text-decoration: underline;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.cart-total-line {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* --- TELA DE CHECKOUT & PIX --- */
.checkout-container {
    max-width: 900px;
    margin: 0 auto;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

@media(max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.checkout-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.pix-payment-box {
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
    margin-top: 20px;
}

.qr-code-placeholder {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}

.qr-code-canvas {
    width: 100%;
    height: 100%;
}

.pix-key-container {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.pix-key-text {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    width: 80%;
}

.copy-key-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-key-btn:hover {
    background: var(--accent);
}

.receipt-upload-box {
    margin: 20px 0;
    padding: 15px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: #fdfdfd;
    transition: var(--transition);
}

.receipt-upload-box:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.02);
}

.receipt-upload-box i {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.receipt-upload-box p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.receipt-upload-box input {
    display: none;
}

.comprovante-uploaded-alert {
    background-color: var(--success-light);
    color: var(--success-text);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 10px;
}

/* --- RASTREAMENTO DE PEDIDOS --- */
.tracking-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.tracking-id {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.tracking-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 40px 0;
    flex-wrap: wrap;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e2e8f0;
    z-index: 1;
}

@media (max-width: 600px) {
    .timeline {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
        padding-left: 20px;
    }
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 38px;
        width: 4px;
        height: auto;
    }
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
    width: 100px;
    text-align: center;
}

@media (max-width: 600px) {
    .timeline-step {
        flex-direction: row;
        text-align: left;
        width: 100%;
        gap: 20px;
    }
}

.timeline-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 10px;
    border: 3px solid white;
    transition: var(--transition);
}

@media (max-width: 600px) {
    .timeline-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
}

.timeline-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Status Ativos na Timeline */
.timeline-step.active .timeline-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.2);
}

.timeline-step.active .timeline-label {
    color: var(--accent);
    font-weight: 700;
}

.timeline-step.completed .timeline-icon {
    background: var(--success);
    color: white;
}

.timeline-step.completed .timeline-label {
    color: var(--success-text);
}

.timeline-step.cancelled .timeline-icon {
    background: var(--danger);
    color: white;
}

.timeline-step.cancelled .timeline-label {
    color: var(--danger);
}

/* Timeline progress bar filling (Visual logic done dynamically with CSS custom property or step classes) */
.timeline-step.completed + .timeline-step::before {
    background: var(--success);
}

/* --- DASHBOARD DA DIRETORIA --- */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(29, 55, 104, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-card.success .metric-icon {
    background: var(--success-light);
    color: var(--success);
}

.metric-card.warning .metric-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.metric-card.info .metric-icon {
    background: var(--info-light);
    color: #0284c7;
}

.metric-data h4 {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-data .value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: 2px;
}

/* Gráficos e Tabelas no Painel */
.panel-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-md);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.panel-card-header h3 {
    font-size: 1.15rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.admin-table th {
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary);
    font-weight: 700;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:hover {
    background: rgba(29, 55, 104, 0.01);
}

/* Badges de Status do Pedido */
.status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pendente {
    background: var(--warning-light);
    color: var(--warning-text);
}

.status-badge.pago {
    background: var(--info-light);
    color: #0369a1;
}

.status-badge.producao {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-badge.retirada {
    background: #d1fae5;
    color: #047857;
}

.status-badge.entregue {
    background: #e2e8f0;
    color: #475569;
}

.status-badge.cancelado {
    background: var(--danger-light);
    color: var(--danger-text);
}

.action-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    background: white;
}

.action-select:focus {
    border-color: var(--accent);
}

/* Gráficos em CSS */
.chart-bar-container {
    margin-bottom: 15px;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.chart-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 5px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Item Consolidado (Fila de Produção) */
.queue-list {
    list-style: none;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.88rem;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-qty {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.78rem;
}

/* Modal styling generic */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 32, 66, 0.4);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--primary-dark);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(50px);
    opacity: 0;
    animation: slideIn 0.3s forwards;
    border-left: 4px solid var(--accent);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

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

/* Caixa de Sugestões de Busca de Membros */
.search-suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-md);
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: var(--transition);
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background-color: rgba(29, 55, 104, 0.05);
    color: var(--primary);
    font-weight: 600;
}
