:root {
    --app-blue: #1351b4;
    --app-blue-2: #2d74df;
    --app-text: #17324d;
    --app-muted: #5f6b7a;
    --app-bg: #edf2fb;
    --app-card: #ffffff;
    --app-shadow: 0 10px 24px rgba(19, 81, 180, 0.12);
    --app-radius: 22px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.app-shell {
    margin: 0;
    background: linear-gradient(180deg, #f2f6ff 0%, #edf2fb 100%);
    color: var(--app-text);
    font-family: 'Rawline', Arial, sans-serif;
    padding-bottom: 96px;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(180deg, #1c58b8 0%, #1351b4 100%);
    color: #fff;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(10, 48, 108, .18);
}

.app-kicker {
    font-size: 12px;
    letter-spacing: .08em;
    font-weight: 700;
    opacity: .9;
}

.app-brand {
    margin: 2px 0 0;
    font-family: 'Raleway', sans-serif;
    font-size: 20px;
    line-height: 1.15;
}

.app-admin-link {
    text-decoration: none;
    color: var(--app-blue);
    background: rgba(255,255,255,.9);
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.app-main { padding: 18px 18px 0; max-width: 720px; margin: 0 auto; }

.app-hero-card {
    background: linear-gradient(135deg, #1557c0 0%, #3b82f6 100%);
    color: #fff;
    padding: 22px;
    border-radius: 28px;
    box-shadow: var(--app-shadow);
}
.app-hero-overline { font-size: 14px; opacity: .9; margin-bottom: 8px; }
.app-hero-card h2 {
    margin: 0 0 10px;
    font-family: 'Raleway', sans-serif;
    font-size: 32px;
    line-height: 1.05;
}
.app-hero-card p { margin: 0; font-size: 15px; opacity: .96; }

.app-section { margin-top: 24px; }
.app-section-kicker {
    color: #45668f;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}
.app-section-title,
.app-form-title {
    margin: 0 0 14px;
    font-family: 'Raleway', sans-serif;
    font-size: 22px;
    line-height: 1.15;
}

.grid-opcoes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.opcao {
    min-height: 112px;
    border-radius: 24px;
    text-decoration: none;
    color: #fff;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
    transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
    -webkit-tap-highlight-color: transparent;
}
.opcao:active,
.opcao.is-pressed {
    transform: scale(.97);
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.opcao-emoji { font-size: 28px; margin-bottom: 8px; }
.opcao span { font-size: 14px; line-height: 1.2; }
.vermelho { background: linear-gradient(135deg, #d62828, #ef4444); }
.amarelo { background: linear-gradient(135deg, #f4b400, #ffd54f); color: #533a00; }
.cinza   { background: linear-gradient(135deg, #6b7280, #9097a3); }
.verde   { background: linear-gradient(135deg, #2e7d32, #4caf50); }
.azul    { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.roxo    { background: linear-gradient(135deg, #6f42c1, #8b5cf6); }

.app-shortcut-card,
.app-form-card {
    margin-top: 20px;
    background: var(--app-card);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--app-shadow);
}

.btn-full,
.btn-submit,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.btn-full,
.btn-submit {
    min-height: 54px;
    background: linear-gradient(135deg, var(--app-blue), var(--app-blue-2));
    color: #fff;
    box-shadow: 0 10px 20px rgba(19, 81, 180, .16);
}

.btn-submit.is-loading {
    opacity: .9;
    pointer-events: none;
}

.btn-secondary {
    min-height: 48px;
    background: #e9f0fb;
    color: var(--app-blue);
    margin-top: 12px;
}

.app-label {
    display: block;
    font-weight: 700;
    margin: 14px 0 8px;
}

.app-input {
    width: 100%;
    border: 1px solid #d7e0ee;
    background: #f9fbfe;
    border-radius: 16px;
    min-height: 52px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--app-text);
    outline: none;
}
.app-textarea { min-height: 108px; padding-top: 14px; resize: vertical; }
.app-input:focus {
    border-color: #8db4f3;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(19,81,180,.10);
}
.app-hint {
    color: var(--app-muted);
    font-size: 13px;
    margin-top: 6px;
}
.app-map-card {
    margin-top: 14px;
    background: #f7faff;
    border: 1px solid #dbe6f8;
    border-radius: 18px;
    padding: 14px;
}
.app-map-title { font-weight: 700; margin-bottom: 4px; }
.app-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.app-grid-1 { display: grid; gap: 12px; }
.app-checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 4px;
    font-weight: 600;
}
.app-submit-feedback {
    display: none;
    text-align: center;
    margin-top: 12px;
    color: var(--app-blue);
    font-weight: 700;
}
.app-submit-feedback.is-visible { display: block; }
.app-alert {
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 600;
}
.app-alert-error {
    background: #fff1f1;
    color: #b42318;
    border: 1px solid #ffd1d1;
}

.app-nav-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid #dfe7f2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}
.app-nav-item {
    text-decoration: none;
    color: #5e738c;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-size: 13px;
}
.app-nav-primary { color: var(--app-blue); }

@media (max-width: 420px) {
    .app-hero-card h2 { font-size: 27px; }
    .grid-opcoes { gap: 12px; }
    .opcao { min-height: 104px; }
}
