/* iFruits — Cadastro de Fornecedores
   Paleta: Verde #2D7A3A | Laranja #F5821F | Branco #FFF | Cinza #F7F9F5
   Tipografia: Plus Jakarta Sans + Inter
*/

:root {
    --primary: #2D7A3A;
    --primary-dark: #1f5a29;
    --primary-light: #e8f5ea;
    --accent: #F5821F;
    --accent-light: #fff3e8;
    --text: #1a2e1d;
    --text-2: #4a5e4d;
    --text-3: #8a9e8d;
    --border: #d9e8db;
    --bg: #F7F9F5;
    --white: #ffffff;
    --error: #dc3545;
    --success: #198754;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 16px rgba(45,122,58,0.08);
    --shadow-md: 0 4px 32px rgba(45,122,58,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

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

/* ── HEADER ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent); }
.logo-text.small { font-size: 1.1rem; }
.site-logo { height: 40px; object-fit: contain; }
.header-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

/* ── HERO ── */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1a3d20 0%, #2D7A3A 60%, #3a9e4a 100%);
    color: var(--white);
    padding: 80px 0 100px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-circles .circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: white;
}
.circle.c1 { width: 400px; height: 400px; top: -100px; right: -80px; }
.circle.c2 { width: 200px; height: 200px; bottom: -60px; left: 10%; }
.circle.c3 { width: 100px; height: 100px; top: 40px; left: 30%; }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}
.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero-title span { color: #7FD98F; }
.hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.65;
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    opacity: 0.9;
}
.stat strong { font-size: 1.2rem; }
.stat-div { width: 1px; height: 24px; background: rgba(255,255,255,0.3); }
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(245,130,31,0.4);
}
.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(245,130,31,0.5);
    background: #e07318;
}

/* ── COMO FUNCIONA ── */
.como-funciona {
    padding: 60px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 8px;
}
.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    color: var(--text);
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}
.steps-grid {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.step {
    flex: 1;
    min-width: 200px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border);
}
.step-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.step h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text);
}
.step p { font-size: 0.85rem; color: var(--text-2); }
.step-arrow {
    font-size: 1.5rem;
    color: var(--border);
    font-weight: 300;
    flex-shrink: 0;
}

/* ── FORMULÁRIO ── */
.form-section {
    padding: 60px 0 80px;
}
.form-header {
    margin-bottom: 40px;
}
.form-header h2 { margin-bottom: 8px; }
.form-header p { color: var(--text-2); font-size: 0.9rem; }
.req { color: var(--error); margin-left: 2px; }

.form-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.block-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.block-num {
    background: var(--primary);
    color: white;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.block-header h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 2px;
}
.block-header p { font-size: 0.85rem; color: var(--text-3); }

.sub-block-title {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin: 24px 0 16px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

/* Grid de campos */
.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.col-2 { grid-column: span 2; }

.field label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 0.2px;
}

.field input,
.field select,
.field textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a5e4d' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.field textarea { min-height: 80px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,122,58,0.1);
}
.field input.error,
.field select.error { border-color: var(--error); }

.field-error {
    font-size: 0.77rem;
    color: var(--error);
    min-height: 16px;
    display: block;
}

/* Input com botão */
.input-with-action {
    display: flex;
    gap: 8px;
}
.input-with-action input { flex: 1; }
.btn-cep {
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-cep:hover { background: var(--primary); color: white; }

/* Input com sufixo */
.input-suffix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.input-suffix:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,122,58,0.1);
}
.input-suffix input {
    border: none;
    border-radius: 0;
    flex: 1;
    box-shadow: none !important;
}
.input-suffix input:focus { box-shadow: none; }
.input-suffix span {
    background: var(--bg);
    border-left: 1.5px solid var(--border);
    padding: 10px 12px;
    font-size: 0.8rem;
    color: var(--text-3);
    white-space: nowrap;
}

/* Grupos de campos */
.field-group { margin-bottom: 24px; }
.group-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    display: block;
    margin-bottom: 6px;
}
.group-hint {
    font-size: 0.78rem;
    color: var(--text-3);
    margin-bottom: 12px;
}

/* Checkbox cards (tipo de mercadoria) */
.checkbox-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.check-card input[type="checkbox"] { display: none; }
.check-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    min-width: 90px;
    text-align: center;
}
.check-icon { font-size: 1.5rem; }
.check-card input:checked ~ .check-card-inner {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.check-card-inner:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Radio cards (modalidade) */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.radio-card input[type="radio"] { display: none; }
.radio-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--white);
    text-align: center;
}
.radio-icon { font-size: 1.8rem; margin-bottom: 4px; }
.radio-card-inner strong {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 700;
    display: block;
}
.radio-card-inner span {
    font-size: 0.75rem;
    color: var(--text-3);
    display: block;
    line-height: 1.4;
}
.radio-card input:checked ~ .radio-card-inner {
    border-color: var(--primary);
    background: var(--primary-light);
}
.radio-card input:checked ~ .radio-card-inner strong { color: var(--primary); }
.radio-card-inner:hover { border-color: var(--primary); }

/* Pills (dias da semana) */
.checkbox-pills, .radio-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pill {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.pill input { display: none; }
.pill span {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    transition: all 0.15s;
    background: var(--white);
    display: block;
}
.pill input:checked ~ span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.pill span:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.radio-pill input:checked ~ span {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.upload-placeholder strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.upload-placeholder span { font-size: 0.78rem; color: var(--text-3); }
.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
#previewImg {
    max-height: 100px;
    max-width: 200px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.btn-remove-upload {
    background: none;
    border: 1.5px solid var(--error);
    color: var(--error);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-remove-upload:hover { background: var(--error); color: white; }

/* Mercadorias */
.mercadoria-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 12px;
    position: relative;
}
.btn-remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text-3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-remove-item:hover { border-color: var(--error); color: var(--error); background: #fff5f5; }
.btn-add-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px dashed var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}
.btn-add-item:hover { background: var(--primary-light); }

/* Submit */
.form-submit {
    text-align: center;
    padding: 16px 0;
}
.submit-info {
    font-size: 0.78rem;
    color: var(--text-3);
    margin-bottom: 20px;
}
.submit-info a { color: var(--primary); }
.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 30px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(45,122,58,0.3);
    min-width: 220px;
}
.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(45,122,58,0.4);
}
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sucesso */
.success-message {
    text-align: center;
    padding: 60px 24px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.success-icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.success-message h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 12px;
}
.success-message p { color: var(--text-2); max-width: 400px; margin: 0 auto; }

/* Formulário fechado */
.form-closed {
    text-align: center;
    padding: 80px 24px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.closed-icon { font-size: 3rem; margin-bottom: 16px; display: block; }

/* FOOTER */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.6);
    padding: 24px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-inner .logo-text { color: white; }
.footer-inner p { font-size: 0.8rem; }

/* ── RESPONSIVO ── */
@media (max-width: 640px) {
    .fields-grid { grid-template-columns: 1fr; }
    .field.col-2 { grid-column: span 1; }
    .radio-cards { grid-template-columns: 1fr; }
    .hero { padding: 50px 0 70px; }
    .form-block { padding: 20px 16px; }
    .steps-grid { flex-direction: column; }
    .step-arrow { transform: rotate(90deg); }
    .hero-stats { gap: 12px; }
    .stat-div { display: none; }
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }
