:root {
    --cb-bg: #0f172a;
    --cb-bg-soft: #111827;
    --cb-card: #ffffff;
    --cb-card-soft: #f8fafc;
    --cb-text: #111827;
    --cb-muted: #64748b;
    --cb-border: #e2e8f0;
    --cb-orange: #f97316;
    --cb-orange-dark: #c2410c;
    --cb-navy: #0b1220;
    --cb-blue: #1e3a8a;
    --cb-green: #16a34a;
    --cb-shadow: 0 18px 50px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--cb-text);
    background: #f3f6fb;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px clamp(18px, 5vw, 72px);
    background: rgba(15, 23, 42, .96);
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 14px; font-weight: 800; letter-spacing: -.01em; }
.brand img { width: 132px; max-height: 42px; object-fit: contain; }
.brand span { color: #f8fafc; font-size: .95rem; }
.site-nav { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .94rem; }
.site-nav a { padding: 10px 12px; border-radius: 12px; color: #e5e7eb; }
.site-nav a:hover, .site-nav .nav-strong { background: rgba(249, 115, 22, .16); color: #fff; }

main { min-height: calc(100vh - 180px); }
.hero {
    padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 72px) 46px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 10%, rgba(249,115,22,.26), transparent 28%),
        linear-gradient(135deg, #0b1220 0%, #111827 54%, #1f2937 100%);
}
.hero-content { max-width: 980px; margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--cb-orange); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
h1 { margin: 10px 0 12px; font-size: clamp(2rem, 5vw, 4.5rem); line-height: 1.02; letter-spacing: -.05em; }
h2 { margin: 6px 0 0; font-size: clamp(1.45rem, 3vw, 2.3rem); letter-spacing: -.035em; }
p { margin: 0; }
.hero p { max-width: 700px; margin: 0 auto 28px; color: #cbd5e1; font-size: 1.1rem; }
.search-box { display: flex; max-width: 760px; margin: 0 auto; padding: 8px; background: #fff; border-radius: 22px; box-shadow: var(--cb-shadow); }
.search-box input { flex: 1; border: 0; outline: 0; padding: 16px 18px; font-size: 1rem; color: var(--cb-text); }
.search-box button, .btn-primary { border: 0; border-radius: 16px; padding: 14px 22px; background: var(--cb-orange); color: #fff; font-weight: 900; cursor: pointer; }
.search-box button:hover, .btn-primary:hover { background: var(--cb-orange-dark); }
.search-box.compact { margin: 18px 0 0; max-width: 100%; border: 1px solid var(--cb-border); box-shadow: none; }

.quick-grid, .section-block, .page-card, .auth-card { width: min(1120px, calc(100% - 36px)); margin: 28px auto; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: -28px; position: relative; z-index: 2; }
.quick-card, .page-card, .auth-card, .panel-card, .metric-card { background: var(--cb-card); border: 1px solid var(--cb-border); border-radius: 24px; box-shadow: var(--cb-shadow); }
.quick-card { padding: 24px; min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.quick-card strong { font-size: 1.18rem; letter-spacing: -.02em; }
.quick-card span, .muted { color: var(--cb-muted); }
.quick-card:hover { transform: translateY(-2px); border-color: rgba(249,115,22,.35); }
.section-block { padding: 30px; background: #fff; border: 1px solid var(--cb-border); border-radius: 28px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.category-grid a { padding: 18px; border: 1px solid var(--cb-border); border-radius: 18px; background: var(--cb-card-soft); font-weight: 800; }
.category-grid a:hover { border-color: var(--cb-orange); color: var(--cb-orange-dark); }
.page-card, .auth-card { padding: clamp(24px, 4vw, 42px); }
.auth-card { max-width: 520px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; padding: 14px 22px; background: #fff; border: 1px solid var(--cb-border); font-weight: 900; }
.faq-list { display: grid; gap: 12px; margin-top: 18px; }
details { border: 1px solid var(--cb-border); border-radius: 18px; padding: 16px; background: var(--cb-card-soft); }
summary { cursor: pointer; font-weight: 900; }
details p { margin-top: 10px; color: var(--cb-muted); }
.status-list { display: grid; gap: 12px; margin: 22px 0 0; }
.status-list div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--cb-border); }
.status-list dt { color: var(--cb-muted); }
.status-list dd { margin: 0; font-weight: 900; }
.form-preview { display: grid; gap: 12px; margin-top: 20px; }
.form-preview input, .form-preview textarea { width: 100%; border: 1px solid var(--cb-border); border-radius: 14px; padding: 13px 14px; font: inherit; background: #f8fafc; }
.form-preview textarea { min-height: 120px; resize: vertical; }
.form-preview button { border: 0; border-radius: 14px; padding: 14px 16px; font-weight: 900; background: #cbd5e1; color: #475569; }
.debug-box { overflow: auto; padding: 16px; border-radius: 14px; background: #111827; color: #f8fafc; }

.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px clamp(18px, 5vw, 72px); color: #cbd5e1; background: var(--cb-navy); }
.site-footer div { display: grid; gap: 4px; }
.site-footer a { color: #fff; font-weight: 800; }

.panel-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; background: #eef2f7; }
.panel-sidebar { padding: 18px; background: #0b1220; color: #fff; }
.panel-brand { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 18px; font-weight: 900; }
.panel-brand img { width: 112px; max-height: 40px; object-fit: contain; }
.panel-sidebar nav { display: grid; gap: 8px; }
.panel-sidebar nav a { padding: 12px 14px; border-radius: 14px; color: #d1d5db; font-weight: 800; }
.panel-sidebar nav a:hover { background: rgba(249,115,22,.16); color: #fff; }
.panel-main { padding: 22px; }
.panel-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 18px 20px; border-radius: 22px; background: #fff; border: 1px solid var(--cb-border); }
.panel-topbar small { display: block; color: var(--cb-muted); }
.panel-topbar strong { font-size: 1.25rem; }
.panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-card, .panel-card { padding: 22px; }
.metric-card { display: grid; gap: 8px; }
.metric-card strong { font-size: 2rem; }
.metric-card small { color: var(--cb-muted); }

@media (max-width: 860px) {
    .site-header { position: static; align-items: flex-start; flex-direction: column; }
    .site-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .hero { padding-top: 42px; }
    .search-box { display: grid; border-radius: 20px; }
    .search-box button { width: 100%; }
    .quick-grid, .category-grid, .panel-grid { grid-template-columns: 1fr; }
    .section-title, .site-footer, .panel-topbar { align-items: flex-start; flex-direction: column; }
    .panel-shell { grid-template-columns: 1fr; }
    .panel-sidebar { position: static; }
}

@media (max-width: 520px) {
    .brand img { width: 112px; }
    .brand span { font-size: .86rem; }
    .site-nav a { white-space: nowrap; }
    .quick-grid, .section-block, .page-card, .auth-card { width: min(100% - 24px, 1120px); }
    .page-card, .auth-card, .section-block { border-radius: 20px; padding: 20px; }
}


/* Build 02 - Instalador */
.install-layout {
    background: #f3f4f6;
}

.install-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.install-hero,
.install-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.install-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    margin-bottom: 18px;
}

.install-hero h1,
.install-card h2 {
    margin: 0 0 8px;
}

.install-hero p,
.install-card p {
    margin: 0;
}

.install-version {
    padding: 10px 14px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.install-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.install-card {
    padding: 22px;
    margin-bottom: 18px;
}

.install-card label {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    font-weight: 700;
}

.install-card input[type="text"],
.install-card input[type="email"],
.install-card input[type="password"] {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
}

.install-card button {
    margin-top: 16px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 13px 16px;
    background: #f97316;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.install-alert {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 800;
}

.install-alert-success,
.install-ok {
    color: #166534;
    background: #dcfce7;
}

.install-alert-error {
    color: #991b1b;
    background: #fee2e2;
}

.install-alert-info {
    color: #1e3a8a;
    background: #dbeafe;
}

.install-table,
.install-table th,
.install-table td {
    border-collapse: collapse;
}

.install-table {
    width: 100%;
    min-width: 640px;
}

.install-table th,
.install-table td {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    padding: 12px;
    text-align: left;
}

.table-wrap {
    overflow-x: auto;
}

.install-table-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.install-table-grid div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .07);
}

.install-table-grid span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.install-warning {
    border-color: rgba(249, 115, 22, .25);
}

.install-card pre {
    white-space: pre-wrap;
    background: #111827;
    color: #ffffff;
    padding: 14px;
    border-radius: 14px;
    overflow-x: auto;
}

@media (max-width: 780px) {
    .install-hero,
    .install-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .install-table-grid {
        grid-template-columns: 1fr;
    }

    .install-version {
        justify-self: start;
    }
}


/* Build 03 - Área pública, artigos, FAQ e busca */
.hero-industrial {
    position: relative;
    overflow: hidden;
}
.hero-industrial::after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 420px;
    height: 420px;
    border: 46px solid rgba(249, 115, 22, .14);
    border-radius: 50%;
}
.quick-icon,
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(249, 115, 22, .12);
    color: var(--cb-orange-dark);
    font-weight: 950;
}
.section-title.stacked {
    display: block;
}
.link-strong {
    color: var(--cb-orange-dark);
    font-weight: 900;
}
.category-grid.rich a {
    display: grid;
    gap: 10px;
    min-height: 190px;
}
.category-grid.rich strong {
    font-size: 1.12rem;
}
.category-grid.rich small {
    color: var(--cb-muted);
    line-height: 1.45;
}
.category-grid.rich em {
    align-self: end;
    font-style: normal;
    color: var(--cb-orange-dark);
    font-weight: 900;
    font-size: .88rem;
}
.two-column-section,
.article-shell {
    width: min(1120px, calc(100% - 36px));
    margin: 28px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
    gap: 20px;
}
.compact-block {
    width: 100%;
    margin: 0;
}
.article-list {
    display: grid;
    gap: 12px;
}
.article-row {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--cb-border);
    border-radius: 18px;
    background: var(--cb-card-soft);
}
.article-row:hover {
    border-color: rgba(249, 115, 22, .45);
    background: #fff7ed;
}
.article-row strong {
    letter-spacing: -.02em;
}
.article-row span {
    color: var(--cb-muted);
}
.article-row small {
    color: var(--cb-orange-dark);
    font-weight: 900;
}
.support-cta {
    width: min(1120px, calc(100% - 36px));
    margin: 28px auto 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 30px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #0b1220, #1f2937);
    box-shadow: var(--cb-shadow);
}
.support-cta p {
    color: #cbd5e1;
    margin-top: 8px;
}
.page-hero {
    padding: 48px clamp(18px, 5vw, 72px);
    color: #fff;
    background:
        radial-gradient(circle at 8% 10%, rgba(249,115,22,.24), transparent 24%),
        linear-gradient(135deg, #0b1220 0%, #111827 70%, #1f2937 100%);
}
.page-hero > div {
    width: min(1120px, 100%);
    margin: 0 auto;
}
.small-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cb-muted);
    font-size: .92rem;
}
.breadcrumbs a {
    color: var(--cb-orange-dark);
    font-weight: 800;
}
.breadcrumbs strong {
    color: var(--cb-text);
}
.search-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff7ed;
    color: var(--cb-orange-dark);
}
.result-group {
    margin-top: 28px;
}
.result-group h2 {
    margin-bottom: 12px;
}
.empty-state {
    margin-top: 22px;
    padding: 26px;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
}
.empty-state p {
    color: var(--cb-muted);
    margin-top: 8px;
}
.inline-empty {
    margin-top: 0;
}
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}
.side-panel {
    padding: 22px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid var(--cb-border);
}
.side-panel p {
    color: var(--cb-muted);
    margin: 8px 0 16px;
}
.article-shell {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
}
.article-card {
    width: 100%;
    margin: 0;
}
.article-aside {
    display: grid;
    gap: 16px;
}
.sticky-panel {
    position: sticky;
    top: 92px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}
.article-meta span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--cb-muted);
    font-size: .88rem;
    font-weight: 800;
}
.article-content {
    font-size: 1.05rem;
}
.article-content p,
.article-content ul,
.article-content ol {
    margin: 0 0 16px;
}
.article-content h2,
.article-content h3 {
    margin: 28px 0 12px;
}
.article-content a {
    color: var(--cb-orange-dark);
    font-weight: 800;
}
.article-feedback {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--cb-border);
}
.article-feedback span {
    display: block;
    color: var(--cb-muted);
    margin-top: 4px;
}
.article-feedback button[disabled] {
    opacity: .6;
    cursor: not-allowed;
}
.mini-list {
    display: grid;
    gap: 10px;
}
.mini-list a {
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--cb-border);
    font-weight: 800;
}
.support-strip {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: #0b1220;
    color: #fff;
}
.support-strip span {
    color: #cbd5e1;
}
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

@media (max-width: 940px) {
    .two-column-section,
    .article-shell,
    .content-grid {
        grid-template-columns: 1fr;
    }
    .sticky-panel {
        position: static;
    }
    .support-cta,
    .support-strip {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .page-hero {
        padding: 36px 18px;
    }
    .two-column-section,
    .article-shell,
    .support-cta {
        width: min(100% - 24px, 1120px);
    }
    .article-row,
    details,
    .side-panel {
        border-radius: 16px;
    }
    .article-meta {
        display: grid;
    }
}

/* Build 04 - tickets públicos */
.ticket-page .ticket-form,
.reply-box .ticket-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}
.form-grid {
    display: grid;
    gap: 16px;
}
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ticket-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}
.ticket-form label > span {
    color: #334155;
}
.ticket-form input[type="text"],
.ticket-form input[type="email"],
.ticket-form input[type="file"],
.ticket-form select,
.ticket-form textarea {
    width: 100%;
    border: 1px solid var(--cb-border);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: #ffffff;
    color: var(--cb-text);
}
.ticket-form textarea { min-height: 140px; resize: vertical; }
.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus {
    outline: 3px solid rgba(249, 115, 22, .16);
    border-color: var(--cb-orange);
}
.hint {
    color: var(--cb-muted);
    font-weight: 500;
    line-height: 1.45;
}
.field-error {
    color: #b91c1c;
    font-weight: 800;
}
.block-error { display: block; margin-top: -6px; }
.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px !important;
    padding: 14px;
    border: 1px solid var(--cb-border);
    border-radius: 16px;
    background: #fff7ed;
}
.check-row input { width: auto; margin-top: 4px; }
.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 800;
}
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.narrow { max-width: 680px; }
.ticket-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}
.ticket-head h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.ticket-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 900;
    white-space: nowrap;
}
.status-badge { background: #e0f2fe; color: #075985; }
.status-resolvido { background: #dcfce7; color: #166534; }
.status-fechado,
.status-cancelado { background: #e5e7eb; color: #374151; }
.status-urgente,
.priority-urgente { background: #fee2e2; color: #991b1b; }
.priority-badge { background: #f8fafc; color: #334155; border: 1px solid var(--cb-border); }
.priority-alta { background: #fff7ed; color: #c2410c; }
.priority-baixa { background: #f1f5f9; color: #475569; }
.ticket-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 28px;
}
.ticket-meta-grid div {
    padding: 16px;
    border: 1px solid var(--cb-border);
    border-radius: 18px;
    background: var(--cb-card-soft);
}
.ticket-meta-grid span {
    display: block;
    color: var(--cb-muted);
    font-size: .82rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.ticket-meta-grid strong { word-break: break-word; }
.timeline {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}
.timeline-item {
    padding: 18px;
    border: 1px solid var(--cb-border);
    border-radius: 20px;
    background: #fff;
}
.timeline-item.sender-staff {
    border-color: rgba(249,115,22,.36);
    background: #fff7ed;
}
.timeline-item header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    color: #334155;
}
.timeline-item header span {
    color: var(--cb-muted);
    font-size: .88rem;
    white-space: nowrap;
}
.timeline-item p { white-space: normal; color: #1f2937; }
.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.attachment-list a {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--cb-border);
    border-radius: 14px;
    background: #f8fafc;
    font-weight: 900;
}
.attachment-list small {
    color: var(--cb-muted);
    font-weight: 700;
}
.reply-box {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--cb-border);
}

@media (max-width: 860px) {
    .form-grid.two,
    .form-grid.three,
    .ticket-meta-grid { grid-template-columns: 1fr; }
    .ticket-head { flex-direction: column; }
    .ticket-badges { justify-content: flex-start; }
    .timeline-item header { flex-direction: column; }
}


.debug-code {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
    opacity: .9;
}

.error-summary {
    margin: 10px 0 0 18px;
    padding: 0;
}

.error-summary li {
    margin: 3px 0;
}

/* Build 05 - login compartilhado e Meus Tickets */
.auth-card-wide {
    max-width: 760px;
    margin: 48px auto;
}
.login-form {
    margin-top: 24px;
}
.password-line {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.password-line input {
    flex: 1;
}
.password-toggle {
    border: 1px solid rgba(15, 23, 42, .16);
    background: #fff;
    color: #0f172a;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}
.login-note {
    margin-top: 20px;
    border: 1px solid rgba(249, 115, 22, .22);
    background: rgba(249, 115, 22, .08);
    border-radius: 16px;
    padding: 14px 16px;
    color: #334155;
}
.account-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.compact-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 18px 0 26px;
}
.compact-stats div {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    padding: 18px;
}
.compact-stats span {
    display: block;
    color: #64748b;
    font-weight: 700;
    font-size: .86rem;
}
.compact-stats strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 2rem;
}
.ticket-list {
    display: grid;
    gap: 12px;
}
.ticket-row-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .1);
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ticket-row-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, .08);
    border-color: rgba(249, 115, 22, .32);
}
.ticket-row-card strong,
.ticket-row-card span,
.ticket-row-card small {
    display: block;
}
.ticket-row-card strong {
    font-size: 1rem;
    color: #0f172a;
}
.ticket-row-card span {
    margin-top: 4px;
    color: #1e293b;
    font-weight: 800;
}
.ticket-row-card small {
    margin-top: 7px;
    color: #64748b;
}
.ticket-row-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.empty-state {
    border: 1px dashed rgba(15, 23, 42, .18);
    border-radius: 20px;
    padding: 28px;
    background: #f8fafc;
}
.empty-state h2 {
    margin: 0 0 8px;
}
.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: #f97316;
    font-weight: 900;
    text-decoration: none;
}
.alert a {
    color: inherit;
    font-weight: 900;
}
input[readonly] {
    background: #f8fafc;
    color: #475569;
}

@media (max-width: 760px) {
    .account-head,
    .ticket-row-card {
        flex-direction: column;
        align-items: stretch;
    }
    .compact-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ticket-row-badges {
        justify-content: flex-start;
    }
    .password-line {
        flex-direction: column;
    }
    .password-toggle {
        min-height: 44px;
    }
}
