:root {
    --accent: #e40f0f;
    --accent-dark: #c00c0c;
    --accent-glow: rgba(228, 15, 15, 0.35);
    --accent-soft: rgba(228, 15, 15, 0.08);
    --accent-muted: rgba(228, 15, 15, 0.15);
    --black: #0a0a0c;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light-gray: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --font-heading: 'Muli', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.12);
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.12), 0 8px 24px -8px rgba(15, 23, 42, 0.08);
    --shadow-float: 0 24px 48px -16px rgba(15, 23, 42, 0.14);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --header-height: 72px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--surface-2);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-muted), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(14, 165, 233, 0.06), transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

body.is-app::before {
    background:
        radial-gradient(ellipse 70% 45% at 10% -10%, var(--accent-muted), transparent 50%),
        radial-gradient(ellipse 50% 35% at 95% 5%, rgba(99, 102, 241, 0.06), transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Home — sem faixa clara no topo; hero contínuo com o header */
body.is-home {
    background: #0a0a0c;
}

body.is-home::before {
    display: none;
}

body.is-home .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 0 0;
    background: transparent;
}

body.is-home .site-header .header-inner {
    background: rgba(10, 10, 12, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

body.is-home .main-content {
    margin-top: 0;
}

body.is-home .toast-stack {
    top: 96px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 480px; }
.container-md { max-width: 720px; }

/* Header — barra flutuante glass */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    padding: 12px 0 0;
    background: transparent;
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), background var(--transition);
}

body.is-public .site-header .header-inner {
    background: rgba(10, 10, 12, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

body.is-public .logo { color: var(--white); }

.logo-sub {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-left: 2px solid var(--accent);
    padding-left: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav > a:not(.btn) {
    color: var(--gray);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: color var(--transition), background var(--transition);
}

.main-nav > a:not(.btn):hover {
    color: var(--dark);
    background: var(--light-gray);
}

body.is-public .main-nav > a:not(.btn) {
    color: rgba(255, 255, 255, 0.85);
}

body.is-public .main-nav > a:not(.btn):hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-user {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    padding: 6px 14px;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    border: none;
}

body.is-public .nav-user {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 10px;
}

body.is-public .mobile-menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 1px;
    transition: var(--transition);
}

body.is-public .mobile-menu-btn span { background: var(--white); }

/* Buttons — padrão para fundos claros (páginas, cards, tabelas) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: var(--shadow-xs);
}

.btn:visited { color: inherit; }

.btn-primary,
.btn-primary:visited {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-dark,
.btn-dark:visited {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.btn-dark:hover,
.btn-dark:focus-visible {
    background: #222;
    border-color: #222;
    color: var(--white);
}

.btn-secondary,
.btn-secondary:visited {
    background: var(--surface);
    color: var(--dark);
    border-color: var(--border-strong);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--light-gray);
    border-color: var(--gray-light);
    color: var(--black);
}

.btn-outline,
.btn-outline:visited {
    background: var(--white);
    color: var(--dark);
    border-color: #b0b0b0;
}
.btn-outline:hover,
.btn-outline:focus-visible {
    background: var(--light-gray);
    border-color: var(--dark);
    color: var(--black);
}

/* Outline em fundos escuros (header público, hero) */
body.is-public .site-header .btn-outline,
body.is-public .site-header .btn-outline:visited,
.hero .btn-outline,
.hero .btn-outline:visited,
.hero-cards .btn-outline,
.hero-cards .btn-outline:visited,
.action-card .btn-outline,
.action-card .btn-outline:visited {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.75);
}
body.is-public .site-header .btn-outline:hover,
body.is-public .site-header .btn-outline:focus-visible,
.hero .btn-outline:hover,
.hero .btn-outline:focus-visible,
.hero-cards .btn-outline:hover,
.hero-cards .btn-outline:focus-visible,
.action-card .btn-outline:hover,
.action-card .btn-outline:focus-visible {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Auth — cards flutuantes */
.page-section .container-sm > .card,
.page-section .container-md > .card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
    border: 1px solid var(--border);
}

/* Hero */
.hero {
    background: linear-gradient(145deg, #0a0a0c 0%, #141418 45%, #1f0808 100%);
    color: var(--white);
    padding: 64px 0 88px;
    position: relative;
    overflow: hidden;
}

body.is-home .hero {
    margin-top: 0;
    padding-top: calc(var(--header-height) + 48px);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(228,15,15,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

.hero-grid--logged {
    grid-template-columns: 1fr;
    max-width: 640px;
}

.hero-badge {
    display: inline-block;
    background: rgba(228,15,15,0.2);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    border: 1px solid rgba(228,15,15,0.3);
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-accent { color: var(--accent); }

.hero-desc {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions { display: flex; gap: 16px; }

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 28px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all var(--transition);
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(228, 15, 15, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.action-card.highlight { border-color: var(--accent); }

.action-icon { font-size: 28px; margin-bottom: 8px; }
.action-card h3 { font-family: var(--font-heading); margin-bottom: 8px; }
.action-card p { font-size: 14px; color: #aaa; margin-bottom: 16px; }

.search-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    color: var(--white);
    margin-bottom: 12px;
    font-size: 14px;
}

.search-form input::placeholder { color: #888; }

/* Termos de garantia: ver public/assets/css/warranty.css */

/* Features */
.features { padding: 80px 0; }
.section-title {
    font-family: var(--font-heading);
    font-size: 32px;
    text-align: center;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-item {
    background: var(--surface);
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-num {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.3;
}

.feature-item h4 { font-family: var(--font-heading); margin: 8px 0; }

/* Status flow */
.status-info {
    padding: 60px 0 80px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.status-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.status-step { display: flex; align-items: center; gap: 8px; }
.status-arrow { color: var(--accent); font-weight: bold; }

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
}

.status-badge.lg { font-size: 14px; padding: 8px 20px; }

.status-envio { background: #fff3cd; color: #856404; }
.status-recebimento { background: #cce5ff; color: #004085; }
.status-manutencao { background: #f8d7da; color: #721c24; }
.status-finalizada { background: #d4edda; color: #155724; }
.status-concluida { background: #d1ecf1; color: #0c5460; }
.status-finalizado { background: #d4edda; color: #155724; }
.status-despachada { background: #fff3cd; color: #856404; }
.status-enviado { background: #d4edda; color: #155724; }
.status-default { background: #eee; color: #666; }

/* Cards & Forms */
.main-content { flex: 1; }
.page-section { padding: 32px 0 56px; }

.card,
.panel-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.panel-card:hover {
    box-shadow: var(--shadow-lg);
}

.panel-card--table {
    overflow: visible;
}

.panel-card--table .panel-card__body {
    overflow: visible;
}

.panel-card--table .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

.card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.card-header h2, .card-header h3 {
    font-family: var(--font-heading);
    margin-bottom: 4px;
}

.card-header p { color: var(--gray); font-size: 14px; }

.form { padding: 28px; }
.form-grid .form-section { margin-bottom: 24px; }
.form-section h4 {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-gray);
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--surface);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.input-disabled { background: var(--light-gray) !important; color: var(--gray); }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 0; }
.col-1 { flex: 0 0 calc(8.33% - 16px) !important; }
.col-2 { flex: 0 0 calc(16.66% - 16px) !important; }
.col-3 { flex: 0 0 calc(25% - 16px) !important; }
.col-4 { flex: 0 0 calc(33.33% - 16px) !important; }
.col-5 { flex: 0 0 calc(41.66% - 16px) !important; }
.col-6 { flex: 0 0 calc(50% - 16px) !important; }
.col-7 { flex: 0 0 calc(58.33% - 16px) !important; }
.col-8 { flex: 0 0 calc(66.66% - 16px) !important; }

.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.form-footer { text-align: center; padding: 16px; font-size: 14px; border-top: 1px solid #eee; }
.form-footer a { color: var(--accent); font-weight: 600; }

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
}
.checkbox-label input { margin-top: 3px; flex-shrink: 0; }

.form-hint {
    font-size: 13px;
    color: var(--gray);
    margin-top: 8px;
    line-height: 1.5;
    padding: 8px 10px;
    background: #fff8e6;
    border-left: 3px solid var(--warning);
    border-radius: 0 4px 4px 0;
}
.form-hint.hidden { display: none; }

.form-hint--neutral {
    background: var(--surface-2);
    border-left-color: var(--gray-light);
    color: var(--gray);
}

/* Painel número de série (formulário de envio) */
.serie-panel {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    background: #fafafa;
}
.serie-panel.is-hidden { display: none; }

.serie-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}
.serie-panel__title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
}
.serie-panel__badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.serie-panel__badge--req {
    background: #fde8e8;
    color: #b91c1c;
    border: 1px solid #f5c6c6;
}
.serie-panel__badge--ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.serie-panel__badge--opt {
    background: #eee;
    color: #555;
    border: 1px solid #ddd;
}

.serie-panel__option {
    margin-bottom: 12px;
}
.serie-panel__option.is-hidden { display: none; }

.serie-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    color: var(--dark);
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}
.serie-check input {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.serie-check:hover { border-color: #ccc; }

.serie-panel__field.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.serie-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}
.serie-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(228, 15, 15, 0.15);
}

.serie-panel__help {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--gray);
}
.serie-panel__help em {
    font-style: normal;
    font-weight: 600;
    color: var(--dark);
}
.serie-panel--ecu { border-left: 3px solid var(--accent); }
.serie-panel--opcional { border-left: 3px solid #bbb; }

/* Ajuda login / cadastro */
.auth-help {
    margin: 20px 28px 0;
    padding: 14px 16px;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius);
}
.auth-help__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 10px;
}
.auth-help__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-help__link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.auth-help__link:hover { text-decoration: underline; }

.auth-alert {
    margin: 0 28px 20px;
    padding: 16px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.45;
}
.auth-alert--warn {
    background: #fff8e6;
    border: 1px solid #f0d78c;
    border-left: 4px solid var(--warning);
}
.auth-alert strong { display: block; margin-bottom: 6px; color: var(--dark); }
.auth-alert p { margin: 0 0 12px; color: #555; }
.auth-alert__sub {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--gray);
}
.auth-alert__sub a { color: var(--accent); font-weight: 600; }
.auth-inline-form { margin-top: 4px; }

/* Meu cadastro — painel com abas */
.page-header--compact {
    margin-bottom: 20px;
}
.page-header--compact h2 {
    margin-bottom: 4px;
}

.profile-alert-top {
    margin-bottom: 16px;
}

.profile-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 12px 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}
.profile-tabs__item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.profile-tabs__item:hover {
    color: var(--dark);
    background: rgba(255, 255, 255, 0.6);
}
.profile-tabs__item.is-active {
    color: var(--accent);
    background: var(--white);
    border-color: #e5e5e5;
    border-bottom-color: var(--white);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}

.profile-card__body {
    padding: 24px 28px 28px;
}

.profile-panel-intro {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.profile-panel-intro h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}
.profile-panel-intro p {
    font-size: 14px;
    color: var(--gray);
    margin: 0;
    line-height: 1.45;
}

.profile-card .form-section {
    margin-bottom: 24px;
}
.profile-card .form-section-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-gray);
}
.profile-card .form-section h4:not(.form-section-title) {
    display: none;
}

.profile-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #eee;
}

.profile-panel-foot {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: var(--gray);
}
.profile-panel-foot a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.profile-panel-foot a:hover {
    text-decoration: underline;
}

.profile-card .form {
    padding: 0;
}
.profile-card .form-grid {
    display: block;
}

.profile-uf-field {
    min-width: 56px;
}

@media (max-width: 640px) {
    .profile-tabs {
        flex-direction: column;
        gap: 6px;
        padding: 10px;
    }
    .profile-tabs__item {
        border-radius: 8px;
        margin-bottom: 0;
        justify-content: flex-start;
    }
    .profile-tabs__item.is-active {
        border-bottom-color: #e5e5e5;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    .profile-card__body {
        padding: 20px 16px;
    }
}

.field-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}
.field-badge--ok {
    background: #e8f5e9;
    color: #2e7d32;
}
.field-badge--warn {
    background: #fff3cd;
    color: #856404;
}

.input-disabled {
    background: #f0f0f0 !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Notificações toast (flash) */
.toast-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: min(420px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    pointer-events: auto;
    animation: toast-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast--success::before { background: var(--success); }
.toast--error::before { background: var(--danger); }
.toast--info::before { background: var(--info); }

.toast__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.toast--success .toast__icon {
    background: #ecfdf5;
    color: var(--success);
}
.toast--success .toast__icon::before { content: '✓'; font-weight: 800; }

.toast--error .toast__icon {
    background: #fef2f2;
    color: var(--danger);
}
.toast--error .toast__icon::before { content: '!'; font-weight: 800; }

.toast--info .toast__icon {
    background: #eff6ff;
    color: var(--info);
}
.toast--info .toast__icon::before { content: 'i'; font-weight: 800; font-style: italic; }

.toast__body {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.toast__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
    line-height: 1.3;
}

.toast__message {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.45;
}

.toast__message strong {
    color: var(--dark);
    font-weight: 600;
}

.toast__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: -4px -6px 0 0;
    border: none;
    background: transparent;
    color: var(--gray-light);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.toast__close:hover {
    background: var(--light-gray);
    color: var(--dark);
}

.toast--leaving {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
    }
}

@media (max-width: 640px) {
    .toast-stack {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        max-width: none;
    }

    @keyframes toast-in {
        from {
            opacity: 0;
            transform: translateY(16px) scale(0.96);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes toast-out {
        to {
            opacity: 0;
            transform: translateY(16px) scale(0.96);
        }
    }
}

/* Alerts legados (formulários internos) */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin: 12px 0;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* Dashboard SaaS */
.dashboard-page { padding-top: 8px; }

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
    padding: 28px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #ff6b6b, var(--accent));
}

.dashboard-hero__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 8px;
}

.dashboard-hero h1,
.dashboard-hero h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
}

.dashboard-hero p {
    font-size: 15px;
    color: var(--gray);
    max-width: 520px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.metric-card,
.stat-card {
    background: var(--surface);
    padding: 22px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.metric-card:hover,
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.metric-card::after,
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.6;
}

.metric-card__value,
.stat-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.metric-card__label,
.stat-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-card .status-badge {
    margin-top: 8px;
    font-size: 10px;
}

a.metric-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.metric-card--link:hover .metric-card__value {
    color: var(--accent-dark);
}

a.metric-card--link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.panel-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
}

.panel-card__head h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--black);
}

.panel-card__body {
    padding: 0;
}

.panel-card__body .table-responsive {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Tables */
.page-header { margin-bottom: 28px; }
.page-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--black);
}

.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--surface-2);
    color: var(--gray);
    padding: 14px 20px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--dark);
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover td {
    background: var(--accent-soft);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td.actions {
    overflow: visible;
    white-space: nowrap;
    padding: 10px 20px 10px 12px;
    vertical-align: middle;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Ações em tabela admin — ícones */
.table-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--gray);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.action-btn:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.action-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.action-btn--edit {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

.action-btn--edit:hover {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.35);
}

.action-btn--deactivate {
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.25);
}

.action-btn--deactivate:hover {
    color: #92400e;
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
}

.action-btn--activate {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.25);
}

.action-btn--activate:hover {
    color: #166534;
    background: rgba(22, 163, 74, 0.18);
    border-color: rgba(22, 163, 74, 0.4);
}

.action-btn--delete {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.22);
}

.action-btn--delete:hover {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
}

/* Stats (legado + metrics) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-form input,
.filter-form select {
    padding: 10px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.filter-form input:focus,
.filter-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Painel admin — filtros de protocolos */
.admin-protocolos-card__head {
    align-items: flex-start;
}

.admin-protocolos-card__sub {
    font-size: 13px;
    margin: 6px 0 0;
}

.admin-protocol-filters {
    padding: 16px 28px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.admin-protocol-filters__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-protocol-filters__row {
    display: grid;
    grid-template-columns: 1fr minmax(140px, 180px) minmax(130px, 150px) minmax(130px, 150px);
    gap: 12px 16px;
    align-items: end;
}

.admin-protocol-filters__row label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray);
    margin-bottom: 6px;
}

.admin-protocol-filters__row input,
.admin-protocol-filters__row select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
}

.admin-protocol-filters__row input:disabled {
    opacity: 0.5;
    background: var(--light-gray);
}

.admin-protocol-filters__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.admin-protocol-filters__todo-periodo {
    margin: 0;
    font-size: 13px;
}

.protocolo-resumo-cell {
    display: block;
    font-size: 12px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .admin-protocol-filters__row {
        grid-template-columns: 1fr 1fr;
    }

    .admin-protocol-filters__search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .admin-protocol-filters__row {
        grid-template-columns: 1fr;
    }
}

/* Detail */
.detail-grid { padding: 20px 28px; display: grid; gap: 8px; }
.detail-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.detail-list { padding: 20px 28px; }
.detail-list div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.detail-list span { color: var(--gray); }

.problem-box {
    margin: 16px 28px 20px;
    padding: 16px;
    background: var(--light-gray);
    border-radius: 4px;
    border-left: 4px solid var(--accent);
}

.admin-notes { border-left-color: var(--info); }

.destino-box {
    background: #fff5f5;
    border: 1px solid rgba(228,15,15,0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 20px 28px;
}

.destino-box h4 { color: var(--accent); margin-bottom: 8px; font-family: var(--font-heading); }

/* Timeline */
.timeline { padding: 20px 28px; }
.timeline-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: #eee;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    flex-shrink: 0;
    margin-top: 4px;
}

.timeline-date { font-size: 12px; color: var(--gray); margin-left: 8px; }
.timeline-user { font-size: 12px; color: var(--gray); }
.timeline-obs { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* Search results */
.search-results {
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
}

.search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.search-item:hover { background: var(--light-gray); }

.selected-tag {
    margin-top: 8px;
    padding: 10px 14px;
    background: #d4edda;
    border-radius: 4px;
    font-size: 14px;
    color: #155724;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 72px 40px;
    border: 1px dashed var(--border-strong);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--black);
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    filter: grayscale(0.2);
}

/* Footer */
.site-footer {
    background: var(--black);
    color: var(--white);
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 48px 20px;
}

.footer-grid strong { display: block; margin-bottom: 12px; font-family: var(--font-heading); }
.footer-grid p { font-size: 14px; color: #aaa; margin-bottom: 4px; }
.footer-grid a { color: var(--accent); text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }

.footer-bottom {
    border-top: 1px solid #444;
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* Utilities */
.text-muted { color: var(--gray); }
.text-center { text-align: center; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

code {
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Animations */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 36px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .site-header { padding-top: 8px; }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    body.is-public .main-nav {
        background: rgba(10, 10, 12, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }

    body.menu-open .main-nav { display: flex; }
    .mobile-menu-btn { display: flex; }
    .site-header .container { position: relative; }
    .site-header .header-inner { position: relative; }

    .dashboard-hero {
        padding: 22px 20px;
    }

    .metrics-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .form-row .form-group { flex: 1 1 100% !important; }
    .hero { padding: 48px 0; }
    .hero-actions { flex-direction: column; }
    .logo-sub { display: none; }
    .status-flow { flex-direction: column; }
    .status-arrow { transform: rotate(90deg); }
}

/* Loading overlay global */
.octtane-loading {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.octtane-loading.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.octtane-loading__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 48px;
    text-align: center;
    box-shadow: var(--shadow-float);
    min-width: 220px;
    animation: loading-card-in 0.3s ease;
}

@keyframes loading-card-in {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.octtane-loading__spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border: 3px solid #eee;
    border-top-color: #e40f0f;
    border-radius: 50%;
    animation: loading-spin 0.75s linear infinite;
}

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

.octtane-loading__text {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.02em;
}

.octtane-loading__dots {
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: loading-dots 1.2s steps(4, end) infinite;
}

@keyframes loading-dots {
    0%, 20% { content: ''; }
    40% { opacity: 0.3; }
    60% { opacity: 0.6; }
    80%, 100% { opacity: 1; }
}

body.is-loading {
    overflow: hidden;
}

form.is-submitting .btn[type="submit"] {
    pointer-events: none;
    opacity: 0.7;
}

/* Tipo de problema */
.tipo-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: color-mix(in srgb, var(--tipo-cor, #64748b) 12%, white);
    color: var(--tipo-cor, #64748b);
    border: 1px solid color-mix(in srgb, var(--tipo-cor, #64748b) 35%, transparent);
}

.tipo-cor-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
}

/* Analytics — gráfico tipos de problema (SaaS) */
.analytics-card {
    overflow: visible;
}

.analytics-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.analytics-card__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.analytics-card__subtitle {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
    max-width: 420px;
    line-height: 1.45;
}

.analytics-empty {
    text-align: center;
    padding: 56px 28px;
    color: var(--gray);
    font-size: 14px;
}

.analytics-empty__icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.analytics-chart {
    display: grid;
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 40px;
    align-items: center;
    padding: 32px 28px 36px;
    background:
        radial-gradient(ellipse 80% 60% at 15% 50%, var(--accent-soft), transparent 55%),
        var(--surface);
}

.analytics-chart__donut-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.analytics-donut {
    --donut-size: 200px;
    --donut-ring: 28px;
    width: var(--donut-size);
    height: var(--donut-size);
    border-radius: 50%;
    position: relative;
    box-shadow:
        0 0 0 1px var(--border),
        0 20px 40px -12px rgba(15, 23, 42, 0.12);
    animation: donut-in 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes donut-in {
    from {
        opacity: 0;
        transform: scale(0.88) rotate(-12deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.analytics-donut__hole {
    position: absolute;
    inset: var(--donut-ring);
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04);
}

.analytics-donut__value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.03em;
    line-height: 1;
}

.analytics-donut__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-top: 4px;
}

.analytics-donut__caption {
    font-size: 12px;
    color: var(--gray-light);
    margin: 0;
}

.analytics-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.analytics-legend__item {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    animation: legend-in 0.45s ease backwards;
}

.analytics-legend__item:nth-child(1) { animation-delay: 0.05s; }
.analytics-legend__item:nth-child(2) { animation-delay: 0.1s; }
.analytics-legend__item:nth-child(3) { animation-delay: 0.15s; }
.analytics-legend__item:nth-child(4) { animation-delay: 0.2s; }
.analytics-legend__item:nth-child(5) { animation-delay: 0.25s; }
.analytics-legend__item:nth-child(6) { animation-delay: 0.3s; }
.analytics-legend__item:nth-child(7) { animation-delay: 0.35s; }

@keyframes legend-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.analytics-legend__item:hover:not(.is-muted) {
    border-color: color-mix(in srgb, var(--swatch, var(--accent)) 40%, var(--border));
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.analytics-legend__item.is-muted {
    opacity: 0.45;
    background: var(--surface-2);
}

.analytics-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--swatch, var(--accent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch, var(--accent)) 18%, transparent);
    flex-shrink: 0;
}

.analytics-legend__info {
    min-width: 0;
}

.analytics-legend__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-legend__bar {
    height: 6px;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.analytics-legend__bar-fill {
    display: block;
    height: 100%;
    border-radius: var(--radius-full);
    min-width: 0;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-legend__stats {
    text-align: right;
    flex-shrink: 0;
}

.analytics-legend__stats strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1.2;
}

.analytics-legend__stats span {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
}

/* SLA — 7 dias úteis */
.sla-card-body {
    padding: 20px 28px 24px;
}

.sla-progress {
    width: 100%;
}

.sla-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sla-progress__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

.sla-progress__value {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
}

.sla-progress__value--muted {
    color: var(--gray-light);
    font-weight: 600;
}

.sla-progress__track {
    position: relative;
    height: 12px;
    background: var(--light-gray);
    border-radius: var(--radius-full);
    overflow: visible;
    margin-bottom: 8px;
}

.sla-progress__track--empty {
    opacity: 0.6;
}

.sla-progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
    background: linear-gradient(90deg, var(--success), #34d399);
}

.sla-progress--warn .sla-progress__fill {
    background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.sla-progress--danger .sla-progress__fill {
    background: linear-gradient(90deg, var(--danger), #f87171);
}

.sla-progress--muted .sla-progress__fill {
    background: var(--gray-light);
}

.sla-progress__tick {
    position: absolute;
    top: -2px;
    width: 2px;
    height: 16px;
    background: rgba(15, 23, 42, 0.12);
    transform: translateX(-50%);
    pointer-events: none;
}

.sla-progress__detail {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.4;
    margin: 0;
}

.sla-progress--compact .sla-progress__head {
    margin-bottom: 6px;
}

.sla-progress--compact .sla-progress__label {
    display: none;
}

.sla-progress--compact .sla-progress__value {
    font-size: 11px;
}

.sla-progress--compact .sla-progress__track {
    height: 8px;
    margin-bottom: 0;
}

.sla-progress--compact .sla-progress__detail {
    display: none;
}

.sla-progress--compact .sla-progress__tick {
    height: 12px;
}

.sla-cell {
    min-width: 140px;
    max-width: 200px;
}

@media (max-width: 900px) {
    .analytics-chart {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px 20px 28px;
    }

    .analytics-donut {
        --donut-size: 180px;
    }
}

/* Protocolo — múltiplos produtos (novo envio cliente/admin) */
.panel-card > .protocolo-multi-form {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Mesma largura útil do .card-header (padding lateral 28px) */
.panel-card > .card-header,
.panel-card > .protocolo-multi-form .protocolo-cliente-header,
.panel-card > .protocolo-multi-form .protocolo-itens-section,
.panel-card > .protocolo-multi-form .protocolo-multi-form__footer {
    padding-left: 28px;
    padding-right: 28px;
}

.panel-card > .protocolo-multi-form .protocolo-cliente-header {
    padding-top: 24px;
    padding-bottom: 24px;
}

.panel-card > .protocolo-multi-form .protocolo-itens-section {
    padding-top: 24px;
    padding-bottom: 24px;
}

.panel-card > .protocolo-multi-form .protocolo-multi-form__footer {
    padding-bottom: 28px;
}

.protocolo-multi-form__footer .destino-box {
    margin: 0 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.protocolo-multi-form__footer .termos-form-box {
    margin: 0 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.protocolo-multi-form__footer .btn-block {
    display: block;
    width: 100%;
    margin: 0;
}

.protocolo-cliente-header--admin {
    align-items: flex-start;
}

.protocolo-cliente-search {
    flex: 1;
    min-width: 0;
}

.protocolo-cliente-search__input {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: var(--font);
    color: var(--black);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.protocolo-cliente-search__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.protocolo-cliente-search .search-results {
    margin-top: 4px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.protocolo-cliente-search .selected-client {
    margin-top: 10px;
}

.protocolo-cliente-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border-bottom: 1px solid var(--border);
}

.protocolo-cliente-header__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: var(--radius);
    font-size: 22px;
}

.protocolo-cliente-header__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
}

.protocolo-cliente-header__nome {
    font-size: 1.125rem;
    color: var(--black);
}

.protocolo-itens-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.protocolo-itens-section__title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.protocolo-itens-section__hint {
    font-size: 13px;
    margin: 0;
}

.protocolo-itens-empty {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--gray);
    font-size: 14px;
}

.protocolo-itens-empty span {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.protocolo-itens-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.protocolo-item-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.protocolo-item-card__main {
    display: flex;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.protocolo-item-card__num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.protocolo-item-card__info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.protocolo-item-card__tipo {
    display: inline-block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 6px;
}

.protocolo-item-card__desc {
    font-size: 13px;
    color: var(--dark);
    margin: 0 0 6px;
    line-height: 1.45;
}

.protocolo-item-card__serie {
    font-size: 11px;
    color: var(--gray-light);
}

.protocolo-item-card__servicos {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    font-size: 12px;
}

.protocolo-item-card__servicos li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border);
}

.protocolo-item-card__servicos li:last-child {
    border-bottom: none;
}

.servicos-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.servicos-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--surface);
    position: relative;
}

.servicos-check:hover {
    border-color: var(--accent);
    background: var(--surface-2);
}

.servicos-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.servicos-check__box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    margin-top: 2px;
}

.servicos-check input:checked + .servicos-check__box {
    background: var(--accent);
    border-color: var(--accent);
}

.servicos-check input:checked + .servicos-check__box::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    display: block;
    text-align: center;
    line-height: 14px;
}

.servicos-check__text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
}

.servicos-check__text strong {
    display: block;
}

.servicos-check__valor {
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.servicos-check__restr {
    display: block;
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

/* Modal / lista — feedback de inclusão */
.modal-regra-inclusao {
    font-size: 13px;
    color: var(--gray);
    margin: 0 0 16px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

.modal-bloco {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-bloco--ativo {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.modal-bloco__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.modal-bloco__titulo {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

.modal-bloco__hint {
    font-size: 12px;
    margin: -4px 0 10px;
}

.inclusao-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.inclusao-pill--off {
    background: var(--light-gray);
    color: var(--gray);
}

.inclusao-pill--on {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.modal-inclusao-resumo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
    margin-top: 4px;
}

.modal-inclusao-resumo__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

.modal-inclusao-resumo__status {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.servicos-check__badge-incluido {
    display: none;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
    padding: 3px 8px;
    border-radius: 999px;
    flex-shrink: 0;
    align-self: center;
}

.servicos-check--incluido {
    border-color: rgba(22, 163, 74, 0.45);
    background: rgba(22, 163, 74, 0.06);
}

.servicos-check--incluido .servicos-check__badge-incluido {
    display: inline-block;
}

.protocolo-item-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 8px;
}

.inclusao-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.inclusao-badge--problema {
    background: rgba(100, 116, 139, 0.15);
    color: var(--gray);
}

.inclusao-badge--servico {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.inclusao-badge--only-servico {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.protocolo-item-card--servico-only {
    border-left: 3px solid #16a34a;
}

.protocolo-item-card__sem-problema {
    font-size: 12px;
    margin: 0 0 6px;
    font-style: italic;
}

.protocolo-item-card__servicos-wrap {
    margin: 8px 0;
    padding: 8px 10px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.protocolo-item-card__servicos-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 6px;
}

.protocolo-item-card__servicos .srv-ok {
    color: #16a34a;
    font-weight: 700;
}

.tipo-tag--servico {
    background: rgba(22, 163, 74, 0.12) !important;
    color: #15803d !important;
    --tipo-cor: #16a34a;
}

.modal-card--produto {
    max-width: 560px;
}

.servicos-lista-detalhe {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.servicos-lista-detalhe li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.servicos-lista-detalhe li:last-child {
    border-bottom: none;
}

.servicos-box {
    border-left-color: #2563eb !important;
}

.analytics-legend__meta {
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.protocolo-item-card__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* WhatsApp — contato cliente (admin) */
.btn-whatsapp {
    background: #25d366;
    color: #fff !important;
    border: 1px solid #1ebe57;
    font-weight: 600;
}

.btn-whatsapp:hover {
    background: #1da851;
    border-color: #179e4a;
    color: #fff !important;
}

.detail-list__row-whatsapp {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.detail-list__row-whatsapp > span {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
}

.detail-list__whatsapp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.detail-list__whatsapp-actions strong {
    font-size: 14px;
}

.whatsapp-msg-preview {
    flex: 1 1 100%;
    font-size: 12px;
    margin: 4px 0 0;
}

.whatsapp-msg-preview em {
    font-style: normal;
    color: var(--dark);
}

/* Rastreio Correios */
.rastreio-admin-panel {
    margin: 16px 0 20px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
}

.rastreio-admin-panel.is-hidden {
    display: none;
}

.rastreio-admin-panel__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-family: var(--font-heading);
}

.rastreio-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}

.rastreio-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.rastreio-card__title {
    margin: 0 0 6px;
    font-size: 14px;
    font-family: var(--font-heading);
}

.rastreio-card__code code {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.rastreio-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rastreio-card__body {
    padding: 16px 18px 18px;
}

.rastreio-card__body.is-hidden {
    display: none;
}

.rastreio-card__fonte,
.rastreio-card__hint,
.rastreio-card__empty {
    font-size: 13px;
    margin: 0 0 12px;
}

.rastreio-card__error {
    color: #b91c1c;
    font-size: 13px;
    margin: 0;
}

.rastreio-card__link-hint {
    margin: 12px 0 0;
    font-size: 13px;
}

.rastreio-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--border);
}

.rastreio-timeline__item {
    position: relative;
    padding: 0 0 16px 16px;
    margin-left: 6px;
}

.rastreio-timeline__item:last-child {
    padding-bottom: 0;
}

.rastreio-timeline__item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--surface);
}

.rastreio-timeline__data {
    display: block;
    font-size: 11px;
    color: var(--gray);
    margin-bottom: 2px;
}

.rastreio-timeline__status {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.rastreio-timeline__detalhe,
.rastreio-timeline__local {
    display: block;
    font-size: 12px;
    color: var(--gray);
}

/* Modal adicionar produto */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    animation: modal-in 0.3s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-card__header h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin: 0;
}

.modal-card__close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    color: var(--gray);
}

.modal-card__body {
    padding: 20px 24px;
}

.modal-card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border);
}

/* Detalhe — lista de itens */
.protocolo-itens-detalhe {
    padding: 8px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.protocolo-itens-detalhe--compact {
    padding: 0 24px 20px;
}

.protocolo-item-detalhe {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
}

.protocolo-item-detalhe__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.protocolo-item-detalhe__num {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.06em;
}

.protocolo-item-detalhe__meta {
    padding: 0 18px;
}

.protocolo-item-detalhe__obs-form {
    padding: 16px 18px 18px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.form-hint--neutral {
    background: var(--surface-2);
    border-left-color: var(--gray-light);
    color: var(--gray);
}

/* Diálogos Octtane (alert / confirm / flash) */
body.oct-dialog-open {
    overflow: hidden;
}

.oct-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.oct-dialog-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.oct-dialog {
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 640px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-float);
    animation: oct-dialog-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes oct-dialog-in {
    from { opacity: 0; transform: scale(0.94) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.oct-dialog__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin: 24px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 800;
    font-style: normal;
    line-height: 1;
}

.oct-dialog-overlay--success .oct-dialog__icon {
    background: #ecfdf5;
    color: #059669;
}

.oct-dialog-overlay--error .oct-dialog__icon {
    background: #fef2f2;
    color: #dc2626;
}

.oct-dialog-overlay--info .oct-dialog__icon {
    background: #eff6ff;
    color: #2563eb;
}

.oct-dialog-overlay--warning .oct-dialog__icon {
    background: #fffbeb;
    color: #d97706;
}

.oct-dialog-overlay--confirm .oct-dialog__icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.oct-dialog__content {
    padding: 16px 28px 8px;
    text-align: center;
    overflow-y: auto;
}

.oct-dialog__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--black);
    margin: 0 0 10px;
    line-height: 1.35;
}

.oct-dialog__body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--dark);
    text-align: left;
}

.oct-dialog__body p {
    margin: 0 0 10px;
}

.oct-dialog__body p:last-child {
    margin-bottom: 0;
}

.oct-dialog__body code {
    font-size: 12px;
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
}

.oct-dialog__body a {
    color: var(--accent);
    font-weight: 600;
}

.oct-dialog__body .auth-inline-form {
    margin-top: 12px;
}

.oct-dialog__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 24px 24px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.oct-dialog__btn {
    min-width: 120px;
    padding: 11px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.oct-dialog__btn:hover {
    background: var(--surface-2);
}

.oct-dialog__btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.oct-dialog__btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.oct-dialog__btn--danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.oct-dialog__btn--danger:hover {
    filter: brightness(1.05);
}

@media (max-width: 480px) {
    .oct-dialog__actions {
        flex-direction: column-reverse;
    }

    .oct-dialog__btn {
        width: 100%;
    }
}
