:root {
    --primary: #00356c;
    --primary-strong: #004b95;
    --secondary: #a04100;
    --secondary-bright: #fc7728;
    --secondary-soft: #ffdbcb;
    --surface: #f9f9ff;
    --surface-low: #f3f3fa;
    --surface-container: #ededf4;
    --surface-high: #e7e8ef;
    --card: #ffffff;
    --ink: #191c21;
    --muted: #5a6170;
    --line: rgba(34, 46, 68, 0.12);
    --line-ghost: rgba(34, 46, 68, 0.08);
    --success: #1f7a46;
    --error: #ba1a1a;
    --shadow: 0 18px 40px rgba(25, 28, 33, 0.08);
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    --content-width: 1180px;
    --font-family: 'Public Sans', 'Avenir Next', 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-family);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(169, 199, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 182, 147, 0.22), transparent 24%),
        var(--surface);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.app-main,
.auth-main {
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
}

.app-main {
    padding: 1.5rem 0 6rem;
}

.auth-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 1rem;
}

.topbar-inner {
    width: min(calc(100% - 1rem), calc(var(--content-width) + 1rem));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 1.2rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 30px rgba(25, 28, 33, 0.06);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 10px 24px rgba(0, 53, 108, 0.2);
}

.brand-copy {
    display: grid;
    gap: 0.2rem;
}

.brand-copy strong {
    font-size: 0.97rem;
    color: var(--primary);
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.8rem;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topnav a {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-weight: 600;
    transition: all 0.2s ease;
}

.topnav a:hover,
.topnav a.is-active {
    color: var(--primary);
    background: rgba(169, 199, 255, 0.24);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffe1cf, #ffbe98);
    color: var(--secondary);
    font-weight: 800;
}

.user-pill strong,
.user-pill small {
    display: block;
}

.user-pill small {
    color: var(--muted);
    font-size: 0.75rem;
}

.icon-badge {
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(169, 199, 255, 0.16);
    color: var(--primary);
    cursor: pointer;
    font-family: 'Material Symbols Outlined';
    font-size: 1.3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.95rem 1.35rem;
    border: none;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 14px 28px rgba(0, 53, 108, 0.18);
}

.btn-secondary {
    color: white;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-bright));
    box-shadow: 0 14px 28px rgba(160, 65, 0, 0.18);
}

.btn-ghost {
    color: var(--primary);
    background: rgba(169, 199, 255, 0.18);
}

.btn-small {
    min-height: 40px;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    font-size: 0.92rem;
}

.btn-block {
    width: 100%;
}

.page-heading,
.section-heading,
.hero-card,
.surface-card,
.form-stage,
.support-grid,
.wizard-steps {
    margin-bottom: 1.5rem;
}

.page-heading,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading-tight {
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    color: var(--primary);
}

h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

h3 {
    font-size: 1.15rem;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.hero-card,
.surface-card,
.form-stage-card,
.info-card,
.metric-card,
.summary-card,
.wizard-summary-card,
.auth-card,
.hero-surface,
.modal-card {
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow);
}

.surface-card,
.form-stage-card,
.auth-card,
.modal-card {
    padding: 2rem;
}

.form-stage-single {
    max-width: 980px;
    margin-inline: auto;
}

.surface-card-narrow {
    max-width: 860px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    padding: 2.25rem;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(243, 243, 250, 0.98)),
        var(--card);
}

.hero-copy,
.hero-panel,
.stack-card,
.form-stack,
.sidebar-column,
.modal-form {
    display: grid;
    gap: 1.25rem;
}

.hero-copy p {
    max-width: 52ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.hero-panel {
    align-content: center;
}

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

.metric-card {
    padding: 1.4rem;
    background: linear-gradient(180deg, rgba(237, 237, 244, 0.6), rgba(255, 255, 255, 1));
}

.metric-card span {
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.metric-card strong {
    display: block;
    font-size: 2rem;
    color: var(--ink);
}

.metric-card small {
    color: var(--muted);
}

.metric-card-accent {
    background: linear-gradient(135deg, rgba(255, 219, 203, 0.9), rgba(255, 255, 255, 1));
}

.section-grid,
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.95fr);
    gap: 1.5rem;
}

.process-grid,
.support-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.process-step,
.summary-card {
    padding: 1.3rem;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--surface-low), white);
}

.step-badge {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    margin-bottom: 0.8rem;
    border-radius: 12px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    font-weight: 800;
}

.info-card {
    padding: 1.5rem;
}

.info-card-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.info-card-primary h3,
.info-card-primary p,
.info-card-primary .eyebrow {
    color: inherit;
}

.info-card-secondary {
    background: linear-gradient(135deg, #ffd2b7, #ffb98b);
}

.info-card-muted {
    background: linear-gradient(180deg, var(--surface-low), white);
}

.info-card-wide {
    grid-column: span 2;
}

.record-list,
.card-grid {
    display: grid;
    gap: 1rem;
}

.record-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.2rem 1.3rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(243, 243, 250, 0.75), white);
}

.record-row-no-action {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.record-row strong,
.record-row span {
    display: block;
}

.record-row span {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pet-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.pet-card-media {
    height: 210px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(169, 199, 255, 0.24), rgba(255, 219, 203, 0.28));
}

.pet-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-card-media span {
    font-size: 4.5rem;
    color: var(--primary);
}

.pet-card-body {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
}

.pet-card-photo {
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #0f1b2d;
}

.pet-card-photo .pet-card-media {
    position: absolute;
    inset: 0;
    height: 100%;
}

.pet-card-photo .pet-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 18, 34, 0.08) 0%,
        rgba(8, 18, 34, 0.18) 35%,
        rgba(8, 18, 34, 0.78) 78%,
        rgba(8, 18, 34, 0.94) 100%
    );
}

.pet-card-photo .pet-card-body {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 7rem;
}

.pet-card-photo .pet-card-header h3,
.pet-card-photo .pet-meta,
.pet-card-photo .pet-card-body p,
.pet-card-photo .pet-card-body a,
.pet-card-photo .pet-card-header p {
    color: #f5f7fb;
}

.pet-card-photo .pet-card-header p,
.pet-card-photo .pet-meta {
    color: rgba(245, 247, 251, 0.88);
}

.pet-card-photo .microchip-tag {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.pet-card-photo .status-pill-disponivel {
    color: #d8ffe6;
    background: rgba(31, 122, 70, 0.34);
}

.pet-card-photo .status-pill-adotado {
    color: #fff1e6;
    background: rgba(160, 65, 0, 0.36);
}

.pet-card-photo .btn-ghost {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.pet-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.status-pill,
.microchip-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill-disponivel {
    color: var(--success);
    background: rgba(31, 122, 70, 0.12);
}

.status-pill-adotado {
    color: var(--secondary);
    background: rgba(160, 65, 0, 0.12);
}

.microchip-tag {
    width: fit-content;
    color: var(--primary);
    background: rgba(169, 199, 255, 0.22);
}

.pet-meta {
    font-size: 0.92rem;
}

.filter-bar {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-span-2 {
    grid-column: span 2;
}

.field-span-3 {
    grid-column: span 3;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 56px;
    border: none;
    border-radius: 18px 18px 14px 14px;
    background: var(--surface-high);
    padding: 0.95rem 1rem;
    color: var(--ink);
    box-shadow: inset 0 -2px 0 transparent;
    transition: box-shadow 0.18s ease, background 0.18s ease;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(231, 232, 239, 0.96);
    box-shadow: inset 0 -3px 0 var(--primary);
}

.field-error {
    color: var(--error);
    font-size: 0.83rem;
}

.form-errors {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    color: var(--error);
    background: rgba(186, 26, 26, 0.08);
}

.subsection-title,
.subsection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subsection-title {
    margin: 0.75rem 0 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-ghost);
    color: var(--primary);
    font-weight: 800;
}

.subsection-card {
    padding: 1.35rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(243, 243, 250, 0.8), white);
}

.subsection-header {
    margin-bottom: 1rem;
}

.subsection-header span {
    color: var(--primary);
}

.subsection-header h2 {
    font-size: 1.15rem;
}

.form-actions,
.inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.form-actions-split {
    justify-content: space-between;
    margin-top: 1rem;
}

.wizard-end-actions {
    display: flex;
    gap: 0.85rem;
}

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

.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.2rem;
    border-radius: 22px;
    color: var(--muted);
    background: rgba(237, 237, 244, 0.66);
}

.wizard-step.is-active {
    color: var(--primary);
    background: white;
    box-shadow: var(--shadow);
}

.wizard-step.is-complete {
    color: var(--secondary);
    background: rgba(255, 219, 203, 0.6);
}

.wizard-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: inherit;
    background: rgba(255, 255, 255, 0.7);
}

.wizard-panel {
    display: none;
}

.wizard-panel.is-active {
    display: block;
}

.wizard-summary-card,
.consent-note {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 219, 203, 0.4), rgba(255, 255, 255, 0.95));
}

.selector-card {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(243, 243, 250, 0.84), white);
}

.selector-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.selector-toolbar .btn {
    flex-shrink: 0;
}

.selector-note {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(169, 199, 255, 0.14);
    color: var(--primary);
    font-size: 0.94rem;
    font-weight: 600;
}

.consent-note {
    color: var(--muted);
    font-size: 0.92rem;
}

.consent-note input {
    margin-top: 0.25rem;
}

.field-inline-toggle {
    align-content: end;
}

.switch {
    position: relative;
    display: inline-flex;
    width: 74px;
    height: 42px;
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.switch-track {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-pill);
    background: rgba(169, 199, 255, 0.34);
    position: relative;
    transition: background 0.2s ease;
}

.switch-track::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 6px 14px rgba(25, 28, 33, 0.12);
    transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}

.switch input:checked + .switch-track::after {
    transform: translateX(32px);
}

.camera-preview {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(169, 199, 255, 0.22), rgba(255, 219, 203, 0.28));
}

.camera-image-preview,
.camera-video,
.camera-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.camera-placeholder {
    display: grid;
    place-items: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
}

.camera-placeholder span {
    font-size: 4rem;
    color: var(--primary);
}

.camera-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.is-hidden {
    display: none !important;
}

.summary-grid {
    margin-bottom: 1rem;
}

.summary-card strong {
    margin-top: 0.5rem;
    display: block;
}

.auth-shell {
    width: min(calc(100% - 1rem), 1100px);
    display: grid;
    grid-template-columns: 1.15fr minmax(340px, 0.85fr);
    gap: 1.5rem;
}

.hero-surface {
    padding: 2.4rem;
    color: white;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 18%),
        linear-gradient(150deg, var(--primary), #082b53 55%, var(--secondary));
}

.hero-surface h1,
.hero-surface p,
.hero-surface .eyebrow {
    color: inherit;
}

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

.hero-metrics article {
    min-height: 122px;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.14);
}

.hero-metrics strong,
.hero-metrics span {
    display: block;
}

.hero-metrics span {
    margin-top: 0.25rem;
    font-size: 0.92rem;
}

.auth-card {
    align-self: center;
}

.auth-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.auth-card-header span {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-bright));
}

.message-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 24px rgba(25, 28, 33, 0.06);
}

.flash-success {
    color: var(--success);
}

.flash-error {
    color: var(--error);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    text-align: center;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(243, 243, 250, 0.78), white);
}

.empty-state span {
    font-size: 3rem;
    color: var(--primary);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination-label {
    color: var(--muted);
    font-weight: 600;
}

.mobile-nav {
    display: none;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(25, 28, 33, 0.34);
    backdrop-filter: blur(10px);
}

.modal-shell.is-open {
    display: flex;
}

.modal-card {
    width: min(100%, 760px);
    max-height: min(90vh, 920px);
    overflow: auto;
}

.modal-card-wide {
    width: min(100%, 1080px);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
}

@media (max-width: 1100px) {
    .topnav {
        display: none;
    }

    .section-grid,
    .layout-with-sidebar,
    .hero-card,
    .auth-shell,
    .modal-layout {
        grid-template-columns: 1fr;
    }

    .support-grid,
    .process-grid,
    .summary-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .info-card-wide {
        grid-column: auto;
    }
}

@media (max-width: 860px) {
    .app-main {
        padding-top: 1rem;
        padding-bottom: 7rem;
    }

    .topbar {
        padding: 0.8rem;
    }

    .topbar-inner {
        padding: 0.8rem 1rem;
    }

    .brand-copy small,
    .user-pill small,
    .topbar-actions .btn {
        display: none;
    }

    .brand-copy strong {
        font-size: 0.88rem;
    }

    .user-pill div {
        display: none;
    }

    .wizard-steps,
    .form-grid-two,
    .form-grid-three,
    .record-row {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .field-span-3,
    .info-card-wide {
        grid-column: auto;
    }

    .filter-bar,
    .form-actions,
    .form-actions-split {
        align-items: stretch;
        flex-direction: column;
    }

    .selector-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .wizard-end-actions {
        width: 100%;
        flex-direction: column;
    }

    .wizard-end-actions .btn,
    .form-actions .btn,
    .filter-bar .btn {
        width: 100%;
    }

    .mobile-nav {
        position: fixed;
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        z-index: 35;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
        padding: 0.6rem;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
        box-shadow: 0 -6px 24px rgba(25, 28, 33, 0.08);
    }

    .mobile-nav a {
        display: grid;
        justify-items: center;
        gap: 0.2rem;
        padding: 0.7rem 0.3rem;
        border-radius: 18px;
        color: var(--muted);
        font-size: 0.7rem;
        font-weight: 700;
    }

    .mobile-nav a.is-active {
        color: white;
        background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    }
}

@media (max-width: 640px) {
    .app-main,
    .auth-main {
        width: min(calc(100% - 1rem), var(--content-width));
    }

    .surface-card,
    .form-stage-card,
    .hero-card,
    .auth-card,
    .hero-surface,
    .modal-card {
        padding: 1.25rem;
        border-radius: 24px;
    }

    h1 {
        font-size: 1.9rem;
    }

    .brand-copy strong {
        display: none;
    }
}
