@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Baloo+2:wght@500;600;700;800&display=swap');

:root {
    /* Fundo (azul-marinho profundo, igual ao print) */
    --bg-body: #05070c;
    --bg-primary: #0b1f3d;
    --bg-primary-soft: #0e2c52;
    --bg-secondary: #1a3a63;
    --bg-secondary-glass: rgba(255, 255, 255, 0.07);
    --bg-tertiary: #123055;
    --bg-input: rgba(255, 255, 255, 0.07);

    --text-primary: #ffffff;
    --text-secondary: #a9c2de;
    --text-tertiary: #ffffff;
    --text-muted: #7f9ac1;

    --primary: #2be3d6;         /* Ciano/turquesa do print */
    --primary-hover: #21c9be;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;

    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.15);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.25), 0 2px 4px -2px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px rgba(43, 227, 214, 0.45);

    --font: 'Outfit', sans-serif;
    --font-heading: 'Baloo 2', 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 12px;
    overflow-x: hidden;
}

/* Container do App (moldura estilo celular, como no print) */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: calc(100vh - 48px);
    background: linear-gradient(180deg, var(--bg-primary-soft) 0%, var(--bg-primary) 45%, #081730 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 40px;
    border: 8px solid #081326;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 12px 20px;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header .logo-img {
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

header .logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

header .logo-text span {
    color: var(--primary);
}

/* Botão Meus Pedidos */
.btn-meus-pedidos {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(6px);
}

.btn-meus-pedidos:hover {
    background: var(--primary);
    color: #06231f;
    border-color: var(--primary);
}

/* Banner da Comida */
.hero-banner {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92);
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

/* Apresentação do Produto */
.product-details {
    padding: 24px 20px 8px 20px;
    text-align: left;
}

.product-details h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.product-details .subtitle {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Passos do Checkout */
.checkout-step {
    padding: 8px 20px 24px 20px;
    display: none;
    flex-direction: column;
    flex-grow: 1;
    animation: slideIn 0.3s ease-out forwards;
}

.checkout-step.active {
    display: flex;
}

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

/* Card Hamburguer (vidro fosco sobre o azul-marinho) */
.item-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
    margin-top: 12px;
    backdrop-filter: blur(10px);
}

.item-info {
    flex: 1;
}

.item-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.item-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.35;
}

.item-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Controles de Quantidade */
.qty-control {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: transparent;
    border-radius: var(--radius-full);
    padding: 0;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: none;
    background-color: var(--primary);
    color: #06231f;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(43, 227, 214, 0.35);
}

.qty-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.qty-val {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    color: var(--text-primary);
}

/* Rodapé de Totalizador */
.summary-bar {
    margin-top: 28px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.summary-bar::after {
    content: '\2728';
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.1rem;
    opacity: 0.55;
    pointer-events: none;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-row.total:first-child {
    border-top: none;
    padding-top: 0;
}

.summary-row.total span:last-child {
    color: var(--primary);
}

/* Botões do Sistema */
.btn-primary {
    background-color: var(--primary);
    color: #06231f;
    border: none;
    padding: 17px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(43, 227, 214, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-primary:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

/* Formulários */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(43, 227, 214, 0.2);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

/* Opções de Entrega (Retirar vs Entregar) */
.delivery-options {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.delivery-opt {
    flex: 1;
    background: var(--bg-secondary-glass);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.delivery-opt.active {
    border-color: var(--primary);
    background: rgba(43, 227, 214, 0.08);
}

.delivery-opt svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.delivery-opt.active svg {
    color: var(--primary);
}

.delivery-opt span:first-of-type {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.delivery-opt span:last-of-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Card Informativo */
.info-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.info-card h4 {
    color: var(--primary);
    margin-bottom: 6px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tela de Pagamento / QRCode */
.pix-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
}

.timer-box {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-code-wrapper {
    background-color: #fff;
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
    display: inline-block;
}

.qr-code-wrapper img {
    display: block;
    width: 200px;
    height: 200px;
}

.pix-instructions {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 280px;
    line-height: 1.4;
}

.copia-cola-box {
    width: 100%;
    background: var(--bg-secondary-glass);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copia-cola-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    font-family: monospace;
}

.btn-icon-copy {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.btn-icon-copy:hover {
    color: var(--text-primary);
}

/* Confirmação de Sucesso */
.success-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success);
    border-radius: var(--radius-full);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.success-icon svg {
    width: 48px;
    height: 48px;
}

.success-screen h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 12px;
}

.success-screen p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Modais do Sistema (Histórico e admin) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

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

/* Pedido Histórico Card */
.pedido-historico-card {
    background: var(--bg-secondary-glass);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pedido-id {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.badge {
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pendente {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-pago {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-entregue {
    background-color: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

.pedido-body-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-pagar-novamente {
    margin-top: 10px;
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-pagar-novamente:hover {
    background-color: var(--primary);
    color: #06231f;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Loader */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: var(--text-primary);
    animation: spin 1s linear infinite;
    display: inline-block;
}

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