:root {
    --bg: #061018;
    --bg-soft: #0b1720;
    --paper: rgba(12, 22, 32, 0.82);
    --paper-strong: rgba(13, 24, 35, 0.94);
    --paper-lite: rgba(20, 33, 45, 0.88);
    --ink: #edf4fb;
    --muted: #8da3b8;
    --line: rgba(139, 167, 191, 0.18);
    --accent: #ff7a59;
    --accent-dark: #de5939;
    --accent-soft: rgba(255, 122, 89, 0.14);
    --secondary: #42c7b5;
    --secondary-soft: rgba(66, 199, 181, 0.15);
    --info: #6aa7ff;
    --info-soft: rgba(106, 167, 255, 0.14);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius-xl: 8px;
    --radius-lg: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 18% 10%, rgba(255, 122, 89, 0.16), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(66, 199, 181, 0.12), transparent 24%),
        linear-gradient(140deg, #040a10 0%, #08131d 50%, #101b20 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto;
    font-family: "DM Sans", sans-serif;
}

h1, h2, h3, h4, h5 {
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.text-secondary,
.form-text,
small {
    color: var(--muted) !important;
}

.public-shell,
.admin-shell {
    min-height: 100vh;
}

.public-admin-icon {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 20;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--ink);
    background: rgba(12, 22, 34, 0.76);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.public-admin-icon:hover,
.public-admin-icon:focus {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(66, 199, 181, 0.42);
    background: rgba(18, 35, 50, 0.92);
}

.public-admin-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.corner-actions {
    position: fixed;
    top: max(1.1rem, env(safe-area-inset-top));
    right: max(1.1rem, env(safe-area-inset-right));
    z-index: 30;
    display: flex;
    gap: 0.55rem;
    max-width: calc(100vw - 2.2rem);
}

.icon-action {
    width: 46px;
    height: 46px;
    min-width: 46px;
    max-width: 46px;
    min-height: 46px;
    max-height: 46px;
    flex: 0 0 46px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--ink);
    background: rgba(12, 22, 34, 0.76);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-action:hover,
.icon-action:focus {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(66, 199, 181, 0.42);
    background: rgba(18, 35, 50, 0.92);
}

.icon-action svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    max-width: 22px;
    min-height: 22px;
    max-height: 22px;
    flex: 0 0 22px;
    display: block;
    fill: currentColor;
}

.brand-card,
.interview-card,
.admin-card {
    padding: 1.6rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(12, 22, 34, 0.9), rgba(8, 17, 26, 0.92));
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.brand-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    background:
        linear-gradient(135deg, rgba(255, 122, 89, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 36%),
        linear-gradient(180deg, rgba(12, 22, 34, 0.95), rgba(9, 18, 29, 0.96));
}

.hero-banner {
    padding: 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(135deg, rgba(106, 167, 255, 0.11), transparent 36%),
        linear-gradient(315deg, rgba(66, 199, 181, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(11, 21, 32, 0.94), rgba(7, 14, 22, 0.96));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-banner__title {
    margin: 0;
    font-size: 3.6rem;
    line-height: 1;
    max-width: 13ch;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.hero-banner__visual {
    position: relative;
    min-height: 420px;
    max-height: 420px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #040b11;
}

.hero-banner__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 10, 16, 0.86), rgba(4, 10, 16, 0.28) 52%, rgba(4, 10, 16, 0.72)),
        linear-gradient(180deg, rgba(4, 10, 16, 0.05), rgba(4, 10, 16, 0.8)),
        linear-gradient(120deg, rgba(66, 199, 181, 0.12), rgba(106, 167, 255, 0.1));
}

.hero-banner__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    filter: saturate(0.9) contrast(1.1) brightness(0.68);
    background: #040b11;
}

.hero-banner__grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(133, 164, 190, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(133, 164, 190, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 88%);
}

.hero-banner__beam {
    position: absolute;
    z-index: 1;
    inset: auto -8% 9% auto;
    width: 46%;
    height: 48%;
    background: radial-gradient(circle, rgba(106, 167, 255, 0.3) 0%, rgba(106, 167, 255, 0.08) 36%, transparent 70%);
    filter: blur(18px);
}

.hero-banner__headline {
    position: absolute;
    z-index: 2;
    left: 1.5rem;
    bottom: 1.5rem;
    display: grid;
    gap: 0.65rem;
    max-width: min(72%, 760px);
}

.hero-banner__headline p {
    max-width: 46rem;
    margin: 0;
    color: #c8d6e4;
    font-size: 1.08rem;
    line-height: 1.55;
}

.hero-plane {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
    align-items: center;
    padding: 1.3rem 1.4rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(66, 199, 181, 0.07), transparent 42%),
        linear-gradient(180deg, rgba(12, 22, 34, 0.92), rgba(7, 16, 25, 0.94));
    box-shadow: var(--shadow);
}

.hero-plane__copy {
    display: grid;
    gap: 0.8rem;
}

.hero-plane__copy h2 {
    margin: 0;
    font-size: 2rem;
    max-width: 22ch;
}

.hero-plane__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.hero-plane__chips span {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(21, 34, 48, 0.96), rgba(12, 22, 34, 0.92));
    font-weight: 700;
}

.hero-banner__overlay {
    position: absolute;
    z-index: 1;
    display: grid;
    gap: 0.3rem;
    max-width: 235px;
    padding: 0.85rem 0.95rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(9, 18, 28, 0.8);
    backdrop-filter: blur(14px);
}

.hero-banner__overlay strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.96rem;
}

.hero-banner__overlay span {
    color: #c7d5e2;
    font-size: 0.88rem;
    line-height: 1.35;
}

.hero-banner__overlay--top {
    top: 1rem;
    right: 0.95rem;
}

.hero-banner__overlay--bottom {
    left: 0.95rem;
    bottom: 0.95rem;
}

.eyebrow {
    display: inline-flex;
    padding: 0.42rem 0.82rem;
    border-radius: 8px;
    background: rgba(66, 199, 181, 0.12);
    color: var(--secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead-text {
    color: var(--muted);
}

.feature-stack {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.feature-pill,
.guide-card,
.metric-card,
.profile-item,
.language-item {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 33, 47, 0.92), rgba(13, 24, 36, 0.88));
}

.feature-pill {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.feature-pill strong {
    color: var(--secondary);
    font-family: "Space Grotesk", sans-serif;
}

.admin-link,
.back-link {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.hero-credit,
.hero-credit a {
    color: var(--muted);
}

.interview-header,
.dashboard-topbar,
.result-header,
.card-header-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.interview-detail-topbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
}

.interview-detail-topbar > div:first-child {
    min-width: 0;
}

.interview-detail-topbar h1 {
    max-width: 30ch;
}

.interview-code-stack {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.interview-code-column {
    min-width: 0;
}

.interview-code-stack .admin-card {
    min-width: 0;
}

.interview-code-stack .sbmn-output {
    max-width: 100%;
}

.detail-nav-row {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-tabs {
    gap: 0.6rem;
}

.detail-tabs .nav-link,
.detail-action-link {
    border-radius: 8px;
    color: var(--ink);
    border: 1px solid var(--line);
    background: rgba(12, 22, 34, 0.72);
    font-weight: 700;
    padding: 0.5rem 1rem;
}

.detail-tabs .nav-link.active {
    color: #041016;
    border-color: rgba(66, 199, 181, 0.36);
    background: linear-gradient(135deg, #42c7b5 0%, #6aa7ff 100%);
}

.detail-action-link:hover,
.detail-action-link:focus {
    color: #041016;
    border-color: rgba(66, 199, 181, 0.36);
    background: linear-gradient(135deg, #42c7b5 0%, #6aa7ff 100%);
}

.detail-inline-downloads {
    justify-content: flex-start;
    gap: 0.5rem;
}

.detail-inline-downloads .detail-action-link {
    font-size: 0.92rem;
}

.interview-card {
    position: relative;
    overflow: hidden;
}

.interview-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary), var(--info));
}

.btn-gradient {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 16px 30px rgba(255, 122, 89, 0.24);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn {
    white-space: nowrap;
}

.btn-gradient:hover,
.btn-gradient:focus {
    color: #fff;
    transform: translateY(-1px);
    background: linear-gradient(135deg, #ff8d70 0%, #d94d2a 100%);
    box-shadow: 0 18px 36px rgba(255, 122, 89, 0.28);
}

.btn-outline-dark,
.btn-outline-light,
.btn-outline-info,
.btn-outline-success {
    border-width: 1px;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-light:hover,
.btn-light:focus {
    color: #041016 !important;
    border-color: rgba(66, 199, 181, 0.36);
    background: linear-gradient(135deg, #42c7b5 0%, #6aa7ff 100%);
    box-shadow: 0 16px 30px rgba(66, 199, 181, 0.2);
    transform: translateY(-1px);
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.resume-panel,
.resume-ticket,
.flow-list-panel {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(13, 24, 36, 0.84), rgba(8, 17, 26, 0.9));
}

.consent-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.resume-panel,
.resume-ticket {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.resume-form {
    display: flex;
    gap: 0.75rem;
    min-width: min(100%, 420px);
}

.resume-ticket strong {
    display: block;
    margin: 0.35rem 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
}

.resume-link {
    display: block;
    max-width: 100%;
    color: var(--secondary);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.flow-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.flow-list-grid h3 {
    font-size: 1rem;
}

.flow-list-grid ol {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
}

.health-ok {
    border-color: rgba(66, 199, 181, 0.3);
}

.health-alert {
    border-color: rgba(255, 122, 89, 0.38);
}

.system-log {
    min-height: 320px;
}

.status-step {
    position: relative;
    padding: 0.82rem 0.9rem;
    text-align: center;
    border-radius: 8px;
    background: rgba(13, 24, 36, 0.84);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
    overflow: hidden;
}

.status-step.active {
    color: #fff;
    border-color: rgba(66, 199, 181, 0.42);
    background: linear-gradient(135deg, rgba(255, 122, 89, 0.78), rgba(66, 199, 181, 0.42));
}

.status-step.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--secondary);
}

.chat-board {
    min-height: 440px;
    max-height: 60vh;
    padding: 1rem;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(180deg, rgba(5, 13, 20, 0.9), rgba(10, 20, 31, 0.96));
    background-size: 40px 40px, 40px 40px, auto;
    border: 1px solid var(--line);
}

.empty-state {
    display: grid;
    gap: 1rem;
    place-items: center;
    min-height: 320px;
    text-align: center;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--ink);
}

.empty-state__icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(66, 199, 181, 0.35);
    background:
        linear-gradient(135deg, rgba(66, 199, 181, 0.16), rgba(106, 167, 255, 0.12)),
        rgba(8, 17, 26, 0.8);
}

.empty-state__icon span {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--secondary), var(--info));
    box-shadow: 0 0 28px rgba(66, 199, 181, 0.38);
}

.message {
    display: flex;
    margin-bottom: 1rem;
    animation: messageIn 180ms ease both;
}

.message.assistant {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.bubble {
    position: relative;
    max-width: min(720px, 88%);
    padding: 1rem 1.1rem;
    border-radius: 8px;
    white-space: pre-wrap;
    line-height: 1.58;
}

.message.assistant .bubble {
    color: var(--ink);
    background: linear-gradient(180deg, rgba(19, 31, 46, 0.94), rgba(14, 25, 39, 0.94));
    border: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.message.user .bubble {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 122, 89, 0.95), rgba(222, 89, 57, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.message.assistant .bubble::before,
.message.user .bubble::before {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.message.assistant .bubble::before {
    content: "IA";
    color: var(--secondary);
}

.message.user .bubble::before {
    content: "Participante";
    color: rgba(255, 255, 255, 0.78);
}

.message.loading .bubble {
    min-width: 142px;
    color: #c8d6e4;
}

.typing-dots {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: 0.35rem;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--secondary);
    animation: typingPulse 900ms ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 120ms;
}

.typing-dots span:nth-child(3) {
    animation-delay: 240ms;
}

.composer {
    margin-top: 1rem;
}

.composer textarea,
.form-control,
.form-select {
    color: var(--ink);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    background: rgba(14, 25, 39, 0.94);
}

.composer textarea::placeholder,
.form-control::placeholder {
    color: #6f879b;
}

.form-control:focus,
.form-select:focus {
    color: var(--ink);
    border-color: rgba(255, 122, 89, 0.5);
    background: rgba(14, 25, 39, 0.98);
    box-shadow: 0 0 0 0.25rem rgba(255, 122, 89, 0.12);
}

.form-check-input {
    background-color: rgba(14, 25, 39, 0.94);
    border-color: var(--line);
}

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

.composer-actions,
.download-actions,
.topbar-actions,
.filter-bar,
.profile-actions,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.composer-actions {
    margin-top: 0.9rem;
}

.filter-bar {
    flex-wrap: wrap;
}

.interview-download-actions {
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.interview-download-actions .btn {
    flex: 0 0 auto;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
    font-size: 0.92rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    width: auto;
    min-width: 150px;
}

.review-panel,
.result-panel {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(12, 22, 34, 0.9), rgba(9, 18, 28, 0.95));
}

.feedback-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.feedback-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.35fr) 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.sbmn-output {
    margin: 0;
    max-height: 420px;
    overflow: auto;
    border-radius: 8px;
    background: #030b12;
    color: #dff6f4;
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.56;
    border: 1px solid rgba(66, 199, 181, 0.14);
}

.flow-shell {
    min-height: 100vh;
}

.flow-print-header,
.flow-print-summary,
.flow-print-footer {
    display: none;
}

.flow-hero {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        radial-gradient(circle at 16% 18%, rgba(66, 199, 181, 0.16), transparent 25%),
        radial-gradient(circle at 86% 12%, rgba(255, 122, 89, 0.12), transparent 23%),
        linear-gradient(140deg, #040a10 0%, #07141d 48%, #0c171d 100%);
    background-size: 58px 58px, 58px 58px, auto, auto, auto;
}

.flow-topbar {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.3rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(110deg, rgba(66, 199, 181, 0.1), transparent 35%),
        linear-gradient(180deg, rgba(12, 22, 34, 0.9), rgba(8, 17, 26, 0.94));
    box-shadow: var(--shadow);
}

.flow-topbar > div:first-child {
    min-width: 0;
}

.flow-topbar .topbar-actions {
    justify-content: flex-end;
}

.flow-topbar h1 {
    max-width: 34ch;
    font-size: clamp(1.85rem, 2.4vw, 2.75rem);
    line-height: 1.08;
}

.flow-stage {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(135deg, rgba(106, 167, 255, 0.12), transparent 34%),
        linear-gradient(315deg, rgba(255, 122, 89, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(10, 19, 29, 0.96), rgba(5, 12, 19, 0.98));
    box-shadow: var(--shadow);
}

.flow-stage::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--info), var(--accent));
}

.flow-stage__header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.2rem 0.6rem;
}

.flow-stage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.flow-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    padding: 0.42rem 0.82rem;
    border-radius: 8px;
    color: #061018;
    background: linear-gradient(135deg, var(--secondary), var(--info));
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.flow-insights {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(110px, 0.18fr));
    gap: 0.75rem;
    padding: 0 1.2rem 1rem;
}

.flow-insight {
    display: grid;
    gap: 0.2rem;
    min-height: 86px;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(66, 199, 181, 0.08), transparent 38%),
        rgba(6, 15, 24, 0.74);
}

.flow-insight strong {
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.45rem;
    line-height: 1;
}

.flow-insight span {
    color: var(--muted);
    line-height: 1.38;
}

.flow-insight--wide strong {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
}

.flow-workspace {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1rem;
    padding: 0 1.2rem 1.2rem;
}

.flow-guide {
    align-self: start;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(106, 167, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(13, 25, 38, 0.94), rgba(6, 14, 23, 0.96));
}

.flow-guide__item {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.flow-guide__item strong {
    font-family: "Space Grotesk", sans-serif;
}

.flow-guide__item span {
    color: var(--muted);
    line-height: 1.42;
    font-size: 0.92rem;
}

.flow-canvas {
    min-height: 520px;
    overflow: auto;
    padding: 0;
}

.flow-svg {
    min-width: 760px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(66, 199, 181, 0.14);
    background: #030b12;
}

.flow-grid-bg {
    fill: url("#flowGrid");
}

.flow-edge {
    fill: none;
    stroke: rgba(66, 199, 181, 0.84);
    stroke-width: 2.4;
    filter: drop-shadow(0 0 6px rgba(66, 199, 181, 0.26));
}

.flow-edge--variable {
    stroke: rgba(255, 122, 89, 0.9);
    stroke-dasharray: 9 7;
    filter: drop-shadow(0 0 7px rgba(255, 122, 89, 0.24));
}

.flow-edge--loop {
    stroke: rgba(106, 167, 255, 0.92);
    stroke-width: 2.7;
}

.flow-svg marker path {
    fill: var(--secondary);
}

.flow-edge-label rect {
    fill: rgba(7, 16, 25, 0.92);
    stroke: rgba(255, 255, 255, 0.08);
}

.flow-edge-label text {
    fill: #dff6f4;
    font-size: 12px;
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: middle;
}

.flow-node rect {
    fill: rgba(15, 28, 42, 0.98);
    stroke: rgba(255, 255, 255, 0.09);
}

.flow-node circle {
    fill: var(--secondary);
    filter: drop-shadow(0 0 9px rgba(66, 199, 181, 0.48));
}

.flow-node-title {
    fill: var(--ink);
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-anchor: middle;
    dominant-baseline: middle;
}

.flow-node-index {
    fill: #061018;
    font-size: 9px;
    font-weight: 900;
    text-anchor: middle;
    dominant-baseline: middle;
}

.flow-gateway polygon {
    fill: rgba(255, 238, 204, 0.98);
    stroke: rgba(255, 178, 74, 0.95);
    stroke-width: 2.4;
    filter: drop-shadow(0 0 10px rgba(255, 178, 74, 0.18));
}

.flow-gateway-symbol {
    fill: #061018;
    font-size: 23px;
    font-weight: 900;
    text-anchor: middle;
    dominant-baseline: middle;
}

.flow-gateway-label,
.flow-event-label {
    fill: var(--ink);
    font-size: 11px;
    font-weight: 800;
    text-anchor: middle;
}

.flow-event circle {
    fill: rgba(225, 244, 235, 0.96);
    stroke: rgba(66, 199, 181, 0.92);
    stroke-width: 2.4;
    filter: drop-shadow(0 0 9px rgba(66, 199, 181, 0.2));
}

.flow-event--end circle {
    stroke: rgba(255, 122, 89, 0.95);
    stroke-width: 4;
}

.flow-svg--bpmn .flow-edge {
    stroke: rgba(98, 111, 130, 0.92);
    filter: none;
}

.flow-svg--bpmn .flow-edge--variable {
    stroke: rgba(255, 122, 89, 0.95);
}

.flow-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(12, 22, 34, 0.86), rgba(8, 17, 26, 0.92));
}

.flow-legend div {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.legend-line {
    width: 38px;
    height: 0;
    border-top: 3px solid var(--secondary);
}

.legend-line--variable {
    border-top-color: var(--accent);
    border-top-style: dashed;
}

.legend-line--loop {
    border-top-color: var(--info);
}

.legend-chip {
    min-width: 48px;
    padding: 0.25rem 0.45rem;
    border-radius: 8px;
    color: #dff6f4;
    background: rgba(66, 199, 181, 0.12);
    border: 1px solid rgba(66, 199, 181, 0.2);
    font-weight: 800;
    text-align: center;
}

.table,
.table td,
.table th {
    color: var(--ink);
    background: transparent !important;
}

.admin-table thead th,
.table thead th {
    color: var(--muted);
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-color: var(--line);
}

.table tbody td {
    border-color: rgba(139, 167, 191, 0.1);
}

.transcript-list,
.provider-guide,
.profile-list,
.language-list {
    display: grid;
    gap: 1rem;
}

.transcript-item {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(18, 31, 45, 0.94), rgba(12, 22, 34, 0.95));
}

.transcript-item.user {
    border-left: 5px solid var(--accent);
}

.transcript-item.assistant {
    border-left: 5px solid var(--secondary);
}

.transcript-item.final {
    border-left-color: var(--info);
    background:
        linear-gradient(90deg, rgba(106, 167, 255, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(18, 31, 45, 0.94), rgba(12, 22, 34, 0.95));
}

.transcript-role {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.06em;
}

.transcript-time {
    display: block;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.84rem;
}

.guide-card {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
}

.guide-card strong {
    font-family: "Space Grotesk", sans-serif;
}

.guide-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.interview-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.metric-card {
    padding: 1rem;
    border-radius: 8px;
    display: grid;
    gap: 0.2rem;
}

.metric-card strong {
    font-size: 2rem;
    line-height: 1;
    font-family: "Space Grotesk", sans-serif;
}

.metric-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    font-weight: 700;
}

.profile-item {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile-item.selected {
    border-color: rgba(255, 122, 89, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 122, 89, 0.2);
}

.profile-meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.mini-chart {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 180px;
    padding: 1rem 0.5rem 0 0.5rem;
}

.bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.bar {
    width: 100%;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, var(--secondary) 0%, #1e8f83 100%);
    min-height: 16px;
    box-shadow: 0 14px 28px rgba(66, 199, 181, 0.18);
}

.bar-wrap small {
    font-size: 0.7rem;
    text-align: center;
}

.language-item {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal {
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(12, 22, 34, 0.98), rgba(8, 17, 26, 0.98));
    box-shadow: var(--shadow);
}

.admin-modal .modal-header,
.admin-modal .modal-footer {
    border-color: var(--line);
}

.badge.border {
    border-color: var(--line) !important;
}

.alert-success {
    color: #cbf8ec;
    background: rgba(31, 108, 88, 0.24);
    border-color: rgba(66, 199, 181, 0.28);
}

.alert-danger {
    color: #ffd7cf;
    background: rgba(126, 38, 28, 0.26);
    border-color: rgba(255, 122, 89, 0.25);
}

.alert {
    border-radius: 8px;
}

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

@keyframes typingPulse {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@media (max-width: 1399.98px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .hero-banner__title {
        font-size: 2.6rem;
    }

    .hero-plane__copy h2 {
        font-size: 1.7rem;
    }

    .hero-plane {
        grid-template-columns: 1fr;
    }

    .interview-detail-topbar {
        grid-template-columns: 1fr;
    }

    .interview-download-actions {
        flex-wrap: wrap;
        white-space: normal;
    }

    .interview-header,
    .dashboard-topbar,
    .flow-topbar,
    .flow-stage__header,
    .result-header,
    .card-header-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .flow-insights,
    .flow-workspace {
        grid-template-columns: 1fr;
    }

    .flow-stage__actions,
    .flow-topbar .topbar-actions {
        justify-content: flex-start;
    }

    .metrics-grid,
    .interview-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-plane__chips {
        justify-content: flex-start;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 3mm;
    }

    body {
        background: #fff !important;
        color: #071018;
    }

    body * {
        visibility: hidden !important;
    }

    .flow-print-header,
    .flow-print-header *,
    .flow-print-summary,
    .flow-print-summary *,
    .flow-print-footer,
    .flow-print-footer *,
    .flow-canvas,
    .flow-canvas * {
        visibility: visible !important;
    }

    .flow-topbar,
    .flow-stage__header,
    .flow-insights,
    .flow-guide,
    .flow-legend {
        display: none !important;
    }

    .flow-shell,
    .flow-hero,
    .flow-stage,
    .flow-workspace,
    .flow-print-header,
    .flow-print-summary,
    .flow-print-footer,
    .flow-canvas {
        position: static !important;
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .flow-print-header {
        display: flex !important;
        justify-content: space-between;
        gap: 8mm;
        padding: 0 0 2mm;
        margin-bottom: 2mm !important;
        border-bottom: 1px solid #9aa6b2;
        color: #071018;
        font-family: "DM Sans", sans-serif;
        font-size: 7.5pt;
    }

    .flow-print-header div {
        display: grid !important;
        gap: 0.5mm;
    }

    .flow-print-header div:last-child {
        text-align: right;
    }

    .flow-print-header strong {
        font-family: "Space Grotesk", sans-serif;
        font-size: 10pt;
    }

    .flow-print-summary {
        margin-top: 2mm !important;
        padding-top: 1.5mm !important;
        border-top: 1px solid #d6dde5;
        color: #071018;
        font-size: 7.5pt;
        line-height: 1.2;
    }

    .flow-print-summary strong,
    .flow-print-summary span {
        display: block;
    }

    .flow-print-summary strong {
        margin-bottom: 0.5mm;
        font-family: "Space Grotesk", sans-serif;
        font-size: 8.5pt;
    }

    .flow-print-footer {
        display: flex !important;
        justify-content: space-between;
        gap: 6mm;
        margin-top: 2mm !important;
        padding-top: 1.5mm !important;
        border-top: 1px solid #9aa6b2;
        color: #4b5966;
        font-size: 7pt;
    }

    .flow-hero,
    .flow-stage {
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .flow-stage::before {
        display: none !important;
    }

    .flow-svg {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 195mm !important;
        min-width: 0 !important;
        border: 0 !important;
        background: #fff !important;
        page-break-inside: avoid;
    }

    .flow-grid-bg {
        fill: #fff !important;
    }

    .flow-node rect,
    .flow-gateway polygon,
    .flow-event circle {
        filter: none !important;
    }
}

@media (max-width: 767.98px) {
    body {
        background-size: 42px 42px, 42px 42px, auto, auto, auto;
    }

    .container {
        --bs-gutter-x: 1.05rem;
    }

    .public-admin-icon,
    .icon-action {
        width: 42px;
        height: 42px;
        min-width: 42px;
        max-width: 42px;
        min-height: 42px;
        max-height: 42px;
        flex-basis: 42px;
    }

    .corner-actions {
        top: max(0.75rem, env(safe-area-inset-top));
        right: max(0.75rem, env(safe-area-inset-right));
    }

    .hero-banner__title {
        font-size: 1.85rem;
        line-height: 1.06;
        max-width: 12ch;
    }

    .hero-plane__copy h2 {
        font-size: 1.45rem;
    }

    .brand-card,
    .interview-card,
    .admin-card {
        padding: 1.1rem;
        border-radius: 8px;
    }

    .hero-banner {
        padding: 0.45rem;
        border-radius: 8px;
    }

    .hero-banner__visual {
        min-height: 280px;
        max-height: 280px;
    }

    .hero-banner__headline {
        left: 0.85rem;
        right: 0.85rem;
        bottom: 0.85rem;
        max-width: calc(100% - 1.7rem);
        gap: 0.5rem;
    }

    .hero-banner__overlay {
        display: none;
        max-width: calc(100% - 1.4rem);
    }

    .hero-plane {
        padding: 1rem;
        border-radius: 8px;
    }

    .hero-plane__chips {
        gap: 0.5rem;
    }

    .hero-plane__chips span {
        padding: 0.55rem 0.7rem;
        font-size: 0.9rem;
    }

    .eyebrow {
        padding: 0.34rem 0.62rem;
        font-size: 0.68rem;
    }

    .status-strip,
    .metrics-grid,
    .interview-meta-grid,
    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .status-strip {
        gap: 0.45rem;
    }

    .status-step {
        padding: 0.68rem 0.75rem;
        text-align: left;
    }

    .interview-header,
    .dashboard-topbar,
    .result-header,
    .card-header-inline {
        gap: 0.8rem;
    }

    .interview-header .btn,
    .composer-actions .btn,
    .download-actions .btn,
    .topbar-actions .btn,
    .filter-bar .btn,
    .feedback-grid .btn,
    .profile-actions .btn,
    .table-actions .btn {
        display: inline-flex;
        align-items: center;
        width: 100%;
        justify-content: center;
    }

    .composer-actions,
    .download-actions,
    .topbar-actions,
    .filter-bar,
    .profile-actions,
    .table-actions {
        width: 100%;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        width: 100%;
        min-width: 0;
    }

    .bubble {
        max-width: 100%;
        padding: 0.85rem 0.95rem;
    }

    .chat-board {
        min-height: 300px;
        max-height: 54vh;
        padding: 0.75rem;
    }

    .empty-state {
        min-height: 240px;
    }

    .composer textarea,
    .form-control,
    .form-select {
        padding: 0.82rem 0.9rem;
    }

    .profile-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .mini-chart {
        overflow-x: auto;
    }

    .flow-stage__actions {
        width: 100%;
    }

    .flow-stage__actions .btn {
        width: 100%;
    }

    .resume-panel,
    .resume-ticket,
    .resume-form {
        flex-direction: column;
        align-items: stretch;
    }

    .flow-list-grid {
        grid-template-columns: 1fr;
    }

    .flow-insights {
        padding: 0 0.85rem 0.85rem;
        gap: 0.65rem;
    }

    .flow-workspace {
        padding: 0 0.85rem 0.85rem;
    }

    .flow-guide {
        display: none;
    }

    .flow-canvas {
        min-height: 420px;
        border-radius: 8px;
        border: 1px solid rgba(66, 199, 181, 0.14);
        background: #030b12;
        -webkit-overflow-scrolling: touch;
    }

    .flow-svg {
        min-width: 640px;
        border: 0;
    }

    .flow-legend {
        align-items: stretch;
    }

    .flow-legend div {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    h1 {
        font-size: 1.75rem;
    }

    h2,
    .h4 {
        font-size: 1.3rem;
    }

    .public-shell .container,
    .admin-shell .container,
    .flow-shell .container {
        padding-top: 3.4rem !important;
    }

    .hero-banner__visual {
        min-height: 250px;
        max-height: 250px;
    }

    .hero-banner__visual::after {
        background:
            linear-gradient(180deg, rgba(4, 10, 16, 0.18), rgba(4, 10, 16, 0.88)),
            linear-gradient(120deg, rgba(66, 199, 181, 0.16), rgba(106, 167, 255, 0.08));
    }

    .hero-banner__headline {
        position: absolute;
    }

    .hero-banner__headline .eyebrow:last-child {
        display: none;
    }

    .hero-plane,
    .brand-card,
    .interview-card,
    .admin-card {
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
    }

    .btn {
        min-height: 44px;
        white-space: normal;
    }

    .chat-board {
        min-height: 58vh;
        max-height: 58vh;
    }

    .review-panel,
    .result-panel {
        padding: 0.85rem;
    }

    .sbmn-output {
        max-height: 54vh;
        font-size: 0.78rem;
    }

    .table-responsive {
        overflow: visible;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table th,
    .admin-table td {
        display: block;
        width: 100%;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table .d-none {
        display: none !important;
    }

    .admin-table tr {
        margin-bottom: 0.9rem;
        padding: 0.85rem;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: linear-gradient(180deg, rgba(18, 31, 45, 0.94), rgba(12, 22, 34, 0.95));
    }

    .admin-table tbody td {
        display: grid;
        grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
        gap: 0.7rem;
        align-items: start;
        padding: 0.5rem 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .admin-table tbody td::before {
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .admin-table--interviews tbody td:nth-child(1)::before {
        content: "ID";
    }

    .admin-table--interviews tbody td:nth-child(2)::before {
        content: "Código";
    }

    .admin-table--interviews tbody td:nth-child(3)::before {
        content: "Status";
    }

    .admin-table--interviews tbody td:nth-child(4)::before {
        content: "Processo";
    }

    .admin-table--interviews tbody td:nth-child(5)::before {
        content: "Idioma";
    }

    .admin-table--interviews tbody td:nth-child(6)::before {
        content: "IA";
    }

    .admin-table--interviews tbody td:nth-child(7)::before {
        content: "Feedback";
    }

    .admin-table--interviews tbody td:nth-child(8)::before {
        content: "Início";
    }

    .admin-table--users tbody td:nth-child(1)::before {
        content: "Nome";
    }

    .admin-table--users tbody td:nth-child(2)::before {
        content: "Login";
    }

    .admin-table--users tbody td:nth-child(3)::before {
        content: "E-mail";
    }

    .admin-table tbody td:last-child {
        display: block;
        padding-top: 0.75rem;
    }

    .admin-table tbody td:last-child::before {
        content: "";
        display: none;
    }

    .admin-table .table-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-table .table-actions form {
        width: 100%;
    }

    .modal-dialog {
        margin: 0.65rem;
    }
}
