/* ═══════════════════════════════════════════════════════════════════════════
   gerador.css — Interface do Gerador de Currículo (formulário + preview).
   Standalone — app independente do base.html do portal.
   Desktop: split view (form | preview).  Mobile: abas (form / preview).
   100% responsivo, bonito, prático.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset Base (standalone, sem depender do portal) ──────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 72px;  /* espaço para bottom-nav */
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── App Header (branding prefeitura) ─────────────────────────────────────── */
.gc-app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.gc-app-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    min-height: 56px;
}
.gc-app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gc-app-logo-img {
    height: 36px;
    width: auto;
    max-height: 36px;
    max-width: 160px;
    object-fit: contain;
    flex-shrink: 0;
}
.gc-app-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--gc-primary-dark, #1e3a8a);
    letter-spacing: -0.01em;
}
.gc-app-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #475569;
    transition: all 200ms ease;
}
.gc-app-back-btn:hover {
    background: #f1f5f9;
    color: var(--gc-primary, #1e40af);
}
.gc-app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── App Main ─────────────────────────────────────────────────────────────── */
.gc-app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

/* ── App Messages ─────────────────────────────────────────────────────────── */
.gc-app-messages {
    margin-bottom: 16px;
}
.gc-app-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}
.gc-app-message-success { background: #dcfce7; color: #166534; }
.gc-app-message-error   { background: #fee2e2; color: #991b1b; }
.gc-app-message-warning { background: #fff3cd; color: #856404; }
.gc-app-message-info    { background: #dbeafe; color: #1e40af; }

/* ── App Footer (institucional) ───────────────────────────────────────────── */
.gc-app-footer {
    text-align: center;
    padding: 32px 16px 16px;
    font-size: 12px;
    color: #94a3b8;
}
.gc-app-footer a {
    color: var(--gc-primary, #1e40af);
    text-decoration: none;
    font-weight: 500;
}
.gc-app-footer a:hover {
    text-decoration: underline;
}

/* ── Bottom Navigation (tab bar) ──────────────────────────────────────────── */
.gc-app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
.gc-nav-item {
    flex: 1;
    max-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    transition: color 200ms ease;
}
.gc-nav-item:hover,
.gc-nav-item.active {
    color: var(--gc-primary, #1e40af);
}
.gc-nav-item.active svg {
    stroke-width: 2.5;
}

/* ── Variáveis ────────────────────────────────────────────────────────────── */
:root {
    --gc-primary: #1e40af;
    --gc-primary-light: #dbeafe;
    --gc-primary-dark: #1e3a8a;
    --gc-success: #059669;
    --gc-success-light: #d1fae5;
    --gc-gray-50: #f9fafb;
    --gc-gray-100: #f3f4f6;
    --gc-gray-200: #e5e7eb;
    --gc-gray-300: #d1d5db;
    --gc-gray-400: #9ca3af;
    --gc-gray-500: #6b7280;
    --gc-gray-600: #4b5563;
    --gc-gray-700: #374151;
    --gc-gray-800: #1f2937;
    --gc-radius: 8px;
    --gc-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --gc-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --gc-transition: 200ms ease;
}

/* ── Hero do gerador ──────────────────────────────────────────────────────── */
.gc-hero {
    background: linear-gradient(135deg, var(--gc-primary) 0%, #3b82f6 100%);
    color: #fff;
    padding: 32px 24px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.gc-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.gc-hero h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
}
.gc-hero p {
    font-size: 15px;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}
.gc-hero .gc-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* ── LGPD Notice ──────────────────────────────────────────────────────────── */
.gc-lgpd-notice {
    background: var(--gc-success-light);
    border: 1px solid var(--gc-success);
    border-radius: var(--gc-radius);
    padding: 10px 14px;
    font-size: 13px;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.gc-lgpd-notice svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ── Layout principal: Split View (Desktop) ───────────────────────────────── */
.gc-app {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 100%;
}
.gc-form-panel {
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
}
.gc-preview-panel {
    width: 400px;
    max-width: 36%;
    flex-shrink: 0;
    position: sticky;
    top: 76px; /* header 56px + gap 20px */
    align-self: flex-start;
}

/* ── Tabs mobile (hidden no desktop) ──────────────────────────────────────── */
.gc-mobile-tabs {
    display: none;
    margin-bottom: 16px;
}
.gc-mobile-tabs button {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid var(--gc-gray-200);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--gc-transition);
    color: var(--gc-gray-500);
}
.gc-mobile-tabs button:first-child {
    border-radius: var(--gc-radius) 0 0 var(--gc-radius);
}
.gc-mobile-tabs button:last-child {
    border-radius: 0 var(--gc-radius) var(--gc-radius) 0;
}
.gc-mobile-tabs button.active {
    background: var(--gc-primary);
    border-color: var(--gc-primary);
    color: #fff;
}

/* ── Seções do formulário (acordeão) ──────────────────────────────────────── */
.gc-section {
    background: #fff;
    border: 1px solid var(--gc-gray-200);
    border-radius: var(--gc-radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--gc-shadow);
}
.gc-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    background: var(--gc-gray-50);
    border-bottom: 1px solid transparent;
    transition: all var(--gc-transition);
}
.gc-section-header:hover {
    background: var(--gc-gray-100);
}
.gc-section-header.open {
    border-bottom-color: var(--gc-gray-200);
}
.gc-section-header .gc-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gc-primary-light);
    color: var(--gc-primary);
    font-size: 16px;
    flex-shrink: 0;
}
.gc-section-header h3 {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-gray-800);
}
.gc-section-header .gc-section-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gc-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all var(--gc-transition);
    flex-shrink: 0;
}
.gc-section-header .gc-section-check.filled {
    background: var(--gc-success);
    border-color: var(--gc-success);
    color: #fff;
}
.gc-section-header .gc-chevron {
    transition: transform var(--gc-transition);
    color: var(--gc-gray-400);
}
.gc-section-header.open .gc-chevron {
    transform: rotate(180deg);
}
.gc-section-body {
    padding: 16px;
    display: none;
}
.gc-section-body.open {
    display: block;
}

/* ── Campos de formulário ─────────────────────────────────────────────────── */
.gc-field {
    margin-bottom: 14px;
}
.gc-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-gray-700);
    margin-bottom: 4px;
}
.gc-field label .gc-required {
    color: #dc2626;
    margin-left: 2px;
}
.gc-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--gc-gray-200);
    border-radius: 6px;
    font-size: 14px;
    color: var(--gc-gray-800);
    background: #fff;
    transition: border-color var(--gc-transition), box-shadow var(--gc-transition);
    font-family: inherit;
}
.gc-input:focus {
    outline: none;
    border-color: var(--gc-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.gc-input::placeholder {
    color: var(--gc-gray-400);
}
textarea.gc-input {
    resize: vertical;
    min-height: 72px;
}
.gc-field-row {
    display: flex;
    gap: 12px;
}
.gc-field-row .gc-field {
    flex: 1;
}

/* ── Hints e erros inline ─────────────────────────────────────────────────── */
.gc-field-hint {
    display: block;
    font-size: 11.5px;
    color: var(--gc-gray-400);
    margin-top: 3px;
    line-height: 1.3;
}
.gc-field-error {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 3px;
    line-height: 1.3;
    font-weight: 500;
}
.gc-input.gc-input-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.gc-input.gc-input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ── Experiência dinâmica ─────────────────────────────────────────────────── */
.gc-exp-block {
    background: var(--gc-gray-50);
    border: 1px solid var(--gc-gray-200);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    position: relative;
}
.gc-exp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}
.gc-exp-block .gc-exp-num {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gc-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gc-exp-remove {
    padding: 4px 8px;
    border: none;
    background: #f5f5f5;
    color: #d32f2f;
    font-size: 18px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-exp-remove:hover {
    background: #ffebee;
    color: #b71c1c;
}
.gc-exp-remove:active {
    background: #ffcdd2;
}
.gc-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px dashed var(--gc-gray-300);
    border-radius: 6px;
    background: transparent;
    color: var(--gc-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    transition: all var(--gc-transition);
}
.gc-add-btn:hover {
    border-color: var(--gc-primary);
    background: var(--gc-primary-light);
}

/* ── Smart Suggestions (chips) ────────────────────────────────────────────── */
.gc-suggestions {
    margin-top: 8px;
    padding: 10px;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    display: none;
}
.gc-suggestions.visible {
    display: block;
}
.gc-suggestions-label {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 6px;
}
.gc-chip {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px;
    border-radius: 14px;
    font-size: 12px;
    background: #fef3c7;
    color: #78350f;
    border: 1px solid #f59e0b;
    cursor: pointer;
    transition: all var(--gc-transition);
    user-select: none;
}
.gc-chip:hover {
    background: #fde68a;
    transform: translateY(-1px);
}
.gc-chip.used {
    background: var(--gc-success-light);
    border-color: var(--gc-success);
    color: #065f46;
    opacity: 0.7;
    cursor: default;
}

/* ── Upload de foto ───────────────────────────────────────────────────────── */
.gc-foto-upload {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gc-foto-preview {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gc-gray-100);
    border: 2px dashed var(--gc-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color var(--gc-transition);
}
.gc-foto-preview:hover {
    border-color: var(--gc-primary);
}
.gc-foto-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gc-foto-preview .gc-foto-placeholder {
    font-size: 24px;
    color: var(--gc-gray-400);
}
.gc-foto-info {
    font-size: 12px;
    color: var(--gc-gray-500);
}
.gc-foto-btns {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.gc-foto-btns button {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid var(--gc-gray-300);
    background: #fff;
    color: var(--gc-gray-600);
    transition: all var(--gc-transition);
}
.gc-foto-btns button:hover {
    border-color: var(--gc-primary);
    color: var(--gc-primary);
}

/* ── Seletor de template ──────────────────────────────────────────────────── */
.gc-templates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.gc-template-card {
    border: 2px solid var(--gc-gray-200);
    border-radius: var(--gc-radius);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--gc-transition);
    position: relative;
}
.gc-template-card:hover {
    border-color: var(--gc-primary);
    box-shadow: var(--gc-shadow);
}
.gc-template-card.selected {
    border-color: var(--gc-primary);
    background: var(--gc-primary-light);
}
.gc-template-card.selected::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gc-primary);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-template-card .gc-template-preview {
    width: 100%;
    height: 80px;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid var(--gc-gray-100);
}
.gc-template-card .gc-template-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gc-gray-800);
}
.gc-template-card .gc-template-desc {
    font-size: 11px;
    color: var(--gc-gray-500);
    margin-top: 2px;
}

/* Mini previews dos templates */
.gc-tpl-mini-titanium {
    background: linear-gradient(to right, #fff 60%, var(--gc-primary) 60%);
}
.gc-tpl-mini-classico {
    background: linear-gradient(to bottom, var(--gc-primary) 28%, #fff 28%);
}
.gc-tpl-mini-minimalista {
    background: #fff;
    position: relative;
}
.gc-tpl-mini-minimalista::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 1px;
    background: var(--gc-gray-300);
}

/* ── Seletor de cor ───────────────────────────────────────────────────────── */
.gc-cores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gc-cor-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--gc-transition);
    position: relative;
}
.gc-cor-option:hover {
    transform: scale(1.1);
}
.gc-cor-option.selected {
    border-color: var(--gc-gray-800);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gc-gray-400);
}
.gc-cor-option.selected::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ── Strength Meter (gamificação) ─────────────────────────────────────────── */
.gc-strength {
    background: #fff;
    border: 1px solid var(--gc-gray-200);
    border-radius: var(--gc-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: var(--gc-shadow);
}
.gc-strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.gc-strength-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-gray-700);
}
.gc-strength-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--gc-primary);
}
.gc-strength-bar {
    height: 8px;
    background: var(--gc-gray-100);
    border-radius: 4px;
    overflow: hidden;
}
.gc-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 400ms ease, background-color 400ms ease;
    background: var(--gc-gray-300);
    width: 0%;
}
.gc-strength-fill.low { background: #ef4444; }
.gc-strength-fill.medium { background: #f59e0b; }
.gc-strength-fill.good { background: #10b981; }
.gc-strength-fill.excellent { background: var(--gc-primary); }
.gc-strength-tip {
    font-size: 11px;
    color: var(--gc-gray-500);
    margin-top: 4px;
}

/* ── Preview panel ────────────────────────────────────────────────────────── */
.gc-preview-container {
    background: var(--gc-gray-100);
    border: 1px solid var(--gc-gray-200);
    border-radius: var(--gc-radius);
    overflow: hidden;
    box-shadow: var(--gc-shadow-lg);
}
.gc-preview-header {
    background: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gc-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gc-preview-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-gray-600);
}
.gc-preview-scroll {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 16px;
}
.gc-preview-a4 {
    background: #fff;
    width: 100%;
    aspect-ratio: 210 / 297;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 2px;
    overflow: hidden;
    transform-origin: top center;
    font-size: 7px;
}
.gc-preview-a4 * {
    font-size: inherit;
}
.gc-preview-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gc-gray-400);
    text-align: center;
    padding: 20px;
}
.gc-preview-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.gc-preview-empty p {
    font-size: 13px;
}

/* ── Botões de ação ───────────────────────────────────────────────────────── */
.gc-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.gc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--gc-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--gc-transition);
    border: none;
    text-decoration: none;
}
.gc-btn-primary {
    background: var(--gc-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.3);
    flex: 1;
}
.gc-btn-primary:hover {
    background: var(--gc-primary-dark);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
    transform: translateY(-1px);
}
.gc-btn-primary:active {
    transform: translateY(0);
}
.gc-btn-secondary {
    background: #fff;
    color: var(--gc-gray-700);
    border: 1.5px solid var(--gc-gray-200);
}
.gc-btn-secondary:hover {
    border-color: var(--gc-gray-300);
    background: var(--gc-gray-50);
}
.gc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.gc-btn .gc-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: gc-spin 0.6s linear infinite;
    display: none;
}
.gc-btn.loading .gc-spinner {
    display: block;
}
.gc-btn.loading .gc-btn-text {
    display: none;
}

@keyframes gc-spin {
    to { transform: rotate(360deg); }
}

/* ── Ink saver toggle ─────────────────────────────────────────────────────── */
.gc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.gc-toggle-label {
    font-size: 13px;
    color: var(--gc-gray-700);
}
.gc-toggle {
    width: 42px;
    height: 24px;
    border-radius: 12px;
    background: var(--gc-gray-300);
    position: relative;
    cursor: pointer;
    transition: background var(--gc-transition);
}
.gc-toggle.active {
    background: var(--gc-success);
}
.gc-toggle::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform var(--gc-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.gc-toggle.active::after {
    transform: translateX(18px);
}

/* ── Botão de ajuda "?" ───────────────────────────────────────────────────── */
.gc-help-fab {
    position: fixed;
    bottom: 84px; /* acima da bottom-nav */
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gc-primary);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all var(--gc-transition);
}
.gc-help-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.5);
}

/* ── Modal de ajuda ───────────────────────────────────────────────────────── */
.gc-help-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.gc-help-modal-overlay.visible {
    display: flex;
}
.gc-help-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: gc-modal-in 250ms ease;
}
@keyframes gc-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gc-help-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--gc-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gc-help-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gc-gray-800);
}
.gc-help-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gc-gray-100);
    color: var(--gc-gray-500);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--gc-transition);
}
.gc-help-modal-close:hover {
    background: var(--gc-gray-200);
    color: var(--gc-gray-800);
}
.gc-help-modal-body {
    padding: 20px 24px 24px;
}
.gc-help-modal-body h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-primary);
    margin: 16px 0 6px;
}
.gc-help-modal-body h3:first-child {
    margin-top: 0;
}
.gc-help-modal-body p {
    font-size: 13px;
    color: var(--gc-gray-600);
    line-height: 1.6;
    margin-bottom: 8px;
}
.gc-help-modal-body ul {
    list-style: none;
    padding: 0;
}
.gc-help-modal-body li {
    font-size: 13px;
    color: var(--gc-gray-600);
    padding: 3px 0 3px 18px;
    position: relative;
}
.gc-help-modal-body li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--gc-success);
    font-weight: 700;
}

/* ── Notificação salvo no LocalStorage ────────────────────────────────────── */
.gc-autosave-badge {
    position: fixed;
    bottom: 84px; /* acima da bottom-nav */
    right: 24px;
    background: var(--gc-gray-800);
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 300ms ease;
    z-index: 999;
    pointer-events: none;
}
.gc-autosave-badge.show {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet / telas menores que split view ────────────────────────────────── */
@media (max-width: 960px) {
    .gc-app {
        flex-direction: column;
        gap: 0;
    }
    .gc-form-panel {
        max-width: 100%;
        width: 100%;
    }
    .gc-preview-panel {
        width: 100%;
        max-width: 100%;
        position: static;
    }
    .gc-mobile-tabs {
        display: flex;
    }
    .gc-form-panel.hidden-mobile,
    .gc-preview-panel.hidden-mobile {
        display: none;
    }
    .gc-preview-scroll {
        max-height: 70vh;
    }
    .gc-app-main {
        padding: 16px 12px 32px;
    }
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .gc-app-header-inner {
        padding: 8px 12px;
        min-height: 48px;
    }
    .gc-app-logo-img {
        height: 28px;
        max-height: 28px;
    }
    .gc-app-logo-text {
        font-size: 14px;
    }
    .gc-app-main {
        max-width: 100%;
        padding: 0 0 16px;
    }
    /* ── Hero compacto ──────────────────────────────────── */
    .gc-hero {
        padding: 10px 12px;
        border-radius: 0;
        margin: 0;
    }
    .gc-hero .gc-badge {
        font-size: 10px;
        padding: 2px 10px;
        margin-bottom: 4px;
    }
    .gc-hero h1 {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .gc-hero p {
        font-size: 12px;
        line-height: 1.3;
    }
    /* ── LGPD sem borda lateral ─────────────────────────── */
    .gc-lgpd-notice {
        font-size: 11px;
        padding: 6px 10px;
        border-radius: 0;
        margin: 0;
        border-left: none;
        border-right: none;
    }
    /* ── Strength sem borda lateral ─────────────────────── */
    .gc-strength {
        padding: 8px 10px;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .gc-strength-tip {
        font-size: 10px;
        margin-top: 2px;
    }
    /* ── Tabs colados na seção ──────────────────────────── */
    .gc-mobile-tabs {
        position: sticky;
        top: 0;
        z-index: 50;
        margin: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    .gc-mobile-tabs button {
        padding: 10px 8px;
        font-size: 14px;
        border-radius: 0 !important;
        border: none;
        border-bottom: 3px solid transparent;
    }
    .gc-mobile-tabs button.active {
        border-radius: 0 !important;
        border: none;
        border-bottom: 3px solid var(--gc-primary);
        background: #fff;
        color: var(--gc-primary);
    }
    /* ── Seções mais compactas ──────────────────────────── */
    .gc-section {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 2px;
    }
    .gc-section-header {
        padding: 10px 10px;
    }
    .gc-section-header .gc-section-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .gc-section-header h3 {
        font-size: 13px;
    }
    .gc-section-body {
        padding: 10px 10px;
    }
    /* ── Campos mais justos ─────────────────────────────── */
    .gc-exp-block {
        padding: 8px;
        border-radius: 4px;
    }
    .gc-field {
        margin-bottom: 8px;
    }
    .gc-field label {
        font-size: 12px;
        margin-bottom: 2px;
    }
    .gc-input {
        padding: 7px 10px;
        font-size: 14px;
    }
    textarea.gc-input {
        min-height: 60px;
    }
    .gc-field-row {
        flex-direction: column;
        gap: 0;
    }
    /* ── Templates 3 colunas no mobile ─────────────────── */
    .gc-templates-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .gc-template-card {
        padding: 8px 4px;
    }
    .gc-template-card .gc-template-preview {
        height: 56px;
        margin-bottom: 4px;
    }
    .gc-template-card .gc-template-name {
        font-size: 11px;
    }
    .gc-template-card .gc-template-desc {
        font-size: 9px;
    }
    .gc-template-card.selected::after {
        top: 3px;
        right: 3px;
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
    /* ── Cores mais compactas ───────────────────────────── */
    .gc-cor-option {
        width: 30px;
        height: 30px;
    }
    /* ── Ações ──────────────────────────────────────────── */
    .gc-actions {
        flex-direction: column;
        padding: 8px 10px;
        gap: 6px;
    }
    .gc-btn-primary {
        order: -1;
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 15px;
    }
    .gc-btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }
    /* ── FAB e autosave ─────────────────────────────────── */
    .gc-help-fab {
        bottom: 72px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .gc-autosave-badge {
        bottom: 72px;
        right: 12px;
    }
    .gc-app-footer {
        padding: 12px 10px 8px;
        font-size: 11px;
    }
    /* ── Foto upload compacto ──────────────────────────── */
    .gc-foto-preview {
        width: 56px;
        height: 56px;
    }
    .gc-foto-info {
        font-size: 11px;
    }
}

/* ── Acessibilidade ───────────────────────────────────────────────────────── */
.gc-section-header:focus-visible,
.gc-btn:focus-visible,
.gc-template-card:focus-visible,
.gc-cor-option:focus-visible,
.gc-help-fab:focus-visible {
    outline: 3px solid var(--gc-primary);
    outline-offset: 2px;
}

/* ── Alto contraste ────────────────────────────────────────────────────────── */
@media (prefers-contrast: high) {
    .gc-section {
        border-color: #000;
    }
    .gc-input {
        border-color: #000;
    }
    .gc-hero {
        background: #000;
        border: 2px solid #4a9eff;
    }
    .gc-app-header {
        border-bottom-color: #000;
    }
}
