:root {
    --f-black: #000;
    --f-white: #fff;
    --f-gray: #666;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.a4-container {
    background: var(--f-white);
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    padding: 30px 50px;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    position: relative;
    margin: 0 auto;
}

.form-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px; /* Reduzi de 40px */
}

.logo-wrap img {
    height: 70px; /* Reduzi altura da logo */
    max-width: 200px;
    object-fit: contain;
}

.company-meta {
    text-align: right;
    font-size: 10px; /* Reduzi fonte */
    line-height: 1.3;
    color: #333;
}
.company-meta strong {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.event-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px; /* Reduzi de 30px */
}

.event-info h2 { font-size: 15px; font-weight: 400; margin: 0; letter-spacing: 0.5px; }
.event-info h1 { font-size: 18px; font-weight: 900; margin: 2px 0; text-align: left; }
.event-info p { font-size: 15px; margin: 0; font-weight: 400; }

.local-box { text-align: right; }
.local-box span { font-size: 11px; font-weight: 700; display: block; }
.local-box h3 { font-size: 16px; font-weight: 900; margin-top: 3px; line-height: 1; text-transform: uppercase; }

.main-title-row {
    margin: 15px 0; /* Reduzi margin */
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.main-title-row h1 {
    font-size: 32px; /* Reduzi título de 40px para 32px */
    font-weight: 900;
    line-height: 0.85;
    margin: 0;
    text-transform: uppercase;
    text-align: left;
}
.barraca-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 11px;
}
.sq-box { width: 16px; height: 16px; border: 2.5px solid #000; border-radius: 4px; display: inline-block; }

/* Fields */
.input-group {
    position: relative;
    border: 1.5px solid #000;
    border-radius: 10px;
    padding: 10px 15px; /* Aumentei um pouco */
    margin-bottom: 16px; /* Aumentei de 12px para 16px */
}
.group-label {
    position: absolute;
    top: -9px;
    left: 15px;
    background: #fff;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.group-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
}

.grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1.5fr; gap: 10px; }

/* Cardapio */
.menu-section {
    border: 1.5px solid #000;
    border-radius: 10px;
    padding: 10px 15px; /* Reduzi padding */
    margin-bottom: 12px;
}
.menu-head { display: flex; justify-content: space-between; font-size: 10px; font-weight: 900; text-transform: uppercase; margin-bottom: 8px; }

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}
.menu-item-row:last-child { border-bottom: none; }
.item-idx { font-weight: 900; font-size: 14px; width: 20px; }
.item-desc { flex: 1; border: none; outline: none; font-size: 13px; }
.item-val { width: 90px; text-align: right; border-left: 1px solid #ddd; padding-left: 10px; border-right: none; border-top: none; border-bottom: none; outline: none; font-weight: 700; }

/* Equipamento */
.equip-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.equip-wrap {
    border: 1.5px solid #000;
    border-radius: 10px;
    padding: 8px;
    position: relative;
    padding-top: 15px;
}
.equip-wrap::before {
    content: 'EQUIPAMENTO';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 6px;
    font-size: 9px;
    font-weight: 900;
}
.equip-name { 
    width: 100%;
    border: none;
    border-bottom: 1px solid #ddd; 
    height: 24px; 
    margin-bottom: 8px; 
    font-size: 12px; 
    outline: none;
    background: transparent;
}
.equip-v-opts { display: flex; justify-content: space-between; }
.v-opt { text-align: center; }
.v-opt strong { font-size: 12px; font-weight: 900; display: flex; align-items: center; gap: 4px; justify-content: center; }
.v-opt span { font-size: 8px; font-weight: 700; color: #555; display: block; margin-top: 1px; }

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2.5px solid #000;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}
.custom-checkbox:checked::after {
    content: 'X';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 900;
}

.small-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}
.small-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 900;
}
.pos-box .label-text {
    position: absolute;
    top: -8px;
    left: 15px;
    background: #fff;
    padding: 0 6px;
    font-size: 8px;
    font-weight: 900;
}
.pos-box p { margin: 0; font-size: 12px; font-weight: 900; text-transform: uppercase; }

.form-footer {
    border-top: 2.5px solid #000;
    padding-top: 10px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
}

/* Responsive Adjustments - ONLY FOR SCREEN */
@media screen and (max-width: 800px) {
    body { padding: 10px; }
    .a4-container { padding: 20px 15px; }
    
    .main-title-row {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 5px;
        margin-bottom: 25px;
    }
    
    .event-summary {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
    }
    
    .event-info h1 { font-size: 14px; }
    .event-info h2 { font-size: 12px; }
    .event-info p { font-size: 11px; }
    
    .local-box h3 { font-size: 13px; }
    .local-box span { font-size: 9px; }
    
    .form-header-top {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }
    
    .company-meta {
        text-align: right;
        font-size: 8px; /* Ajuste leve de fonte para mobile caso fique apertado */
    }
    
    .company-meta strong {
        font-size: 10px;
    }
    
    .barraca-check {
        text-align: right;
    }
    
    .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .equip-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .main-title-row h1 { font-size: 20px; }
    
    .item-val { width: 70px; font-size: 12px; }

    .logo-wrap img { height: 50px; }
}

@media print {
    body { background: #fff !important; padding: 0 !important; margin: 0 !important; }
    .a4-container { 
        box-shadow: none !important; 
        margin: 0 !important; 
        padding: 10mm 15mm !important; 
        border: none !important; 
        width: 210mm !important; 
        min-height: 297mm !important; 
        max-width: none !important;
        display: block !important;
    }
    
    .form-header-top, .event-summary, .main-title-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    .company-meta, .local-box {
        text-align: right !important;
    }
    
    .grid-3 { display: grid !important; grid-template-columns: 1.2fr 1fr 1fr !important; gap: 10px !important; }
    .grid-2 { display: grid !important; grid-template-columns: 2fr 1.5fr !important; gap: 10px !important; }
    .equip-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

    @page { size: A4; margin: 0; }
    .no-print { display: none !important; }
}
