﻿:root {
    --bg: #f4f3ee;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #1f9d5c;
    --accent-dark: #18824b;
    --border: #e6e6e0;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --bg-deep: #ebe6db;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
    --shadow-lift: 0 26px 60px rgba(15, 23, 42, 0.14);
    --panel-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 247, 241, 0.94));
    --surface-highlight: rgba(255, 255, 255, 0.84);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    isolation: isolate;
    font-family: "Space Grotesk", "Montserrat", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.94) 0%, rgba(250, 249, 246, 0.96) 16%, rgba(244, 243, 238, 0.98) 58%, rgba(235, 230, 219, 0.98) 100%),
        linear-gradient(180deg, #fbfaf7 0%, #f3f1ea 100%);
    color: var(--text);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: min(46vw, 620px);
    height: min(46vw, 620px);
    border-radius: 999px;
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.85;
    z-index: -1;
}

body::before {
    top: -18vw;
    left: -10vw;
    background: radial-gradient(circle, rgba(31, 157, 92, 0.18) 0%, rgba(31, 157, 92, 0.08) 34%, rgba(31, 157, 92, 0) 72%);
    animation: ambientFloatOne 18s var(--ease-smooth) infinite alternate;
}

body::after {
    right: -12vw;
    bottom: -20vw;
    background: radial-gradient(circle, rgba(31, 157, 92, 0.12) 0%, rgba(216, 188, 120, 0.08) 36%, rgba(255, 255, 255, 0) 76%);
    animation: ambientFloatTwo 24s var(--ease-smooth) infinite alternate;
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 52px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-smooth);
}

body.page-ready .app {
    opacity: 1;
    transform: translateY(0);
}

.app-header {
    margin-bottom: 28px;
    position: relative;
    z-index: 80;
    overflow: visible;
    text-align: left;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.header-brand-shell {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
}

.interactive-glow-frame {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-opacity: 0;
}

.interactive-glow-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background:
        radial-gradient(
            circle 170px at var(--glow-x) var(--glow-y),
            rgba(31, 157, 92, 0.26) 0%,
            rgba(31, 157, 92, 0.12) 28%,
            rgba(31, 157, 92, 0.04) 52%,
            transparent 74%
        );
    opacity: var(--glow-opacity);
    transition: opacity 0.32s ease;
    pointer-events: none;
    z-index: 0;
}

.interactive-glow-frame > * {
    position: relative;
    z-index: 1;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(31, 157, 92, 0.16);
    background:
        linear-gradient(135deg, rgba(31, 157, 92, 0.10), rgba(255, 255, 255, 0.96)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 247, 242, 0.92));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: transform 0.45s var(--ease-smooth), box-shadow 0.45s var(--ease-smooth), border-color 0.45s var(--ease-smooth);
}

.brand-link:hover {
    text-decoration: none;
    transform: translateY(-4px);
    border-color: rgba(31, 157, 92, 0.28);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex-shrink: 0;
    filter: hue-rotate(-72deg) saturate(1.28) brightness(1.04) drop-shadow(0 16px 22px rgba(31, 157, 92, 0.18));
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
    line-height: 1;
}

.brand-tagline {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.header-copy {
    min-width: 0;
}

h1 {
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 30px;
    font-family: "Georgia", "Palatino Linotype", "Book Antiqua", serif;
    text-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 20px;
    align-items: start;
}

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

.main-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.draw-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.draw-tools .button-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.draw-tools .field {
    margin: 0;
    min-width: 180px;
}

.draw-tools .button-row button {
    min-height: 54px;
}

.panel {
    position: relative;
    overflow: hidden;
    background: var(--panel-gradient);
    border: 1px solid rgba(209, 214, 202, 0.88);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth), border-color 0.5s var(--ease-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, rgba(31, 157, 92, 0), rgba(31, 157, 92, 0.24), rgba(31, 157, 92, 0));
}

.panel::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: -110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 157, 92, 0.10) 0%, rgba(31, 157, 92, 0.05) 40%, rgba(31, 157, 92, 0) 72%);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
    pointer-events: none;
}

.panel:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 157, 92, 0.22);
    box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.panel:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.panel-error {
    border-color: #d14343;
}

.panel-error > summary {
    color: #d14343;
    border-bottom-color: #f0c4c4;
    animation: shake 0.35s ease;
}

.panel-error:not([open]) > summary {
    background: rgba(209, 67, 67, 0.06);
}

.collapsible {
    padding: 0;
}

.collapsible > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.35s var(--ease-smooth), color 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
}

.collapsible > summary:hover {
    background: linear-gradient(90deg, rgba(31, 157, 92, 0.06), rgba(255, 255, 255, 0.36));
    color: var(--accent-dark);
    border-bottom-color: rgba(31, 157, 92, 0.16);
}

.collapsible > summary::after {
    content: "\25BE";
    font-size: 10px;
    color: var(--muted);
    display: inline-flex;
    transition: transform 0.35s var(--ease-smooth), color 0.35s var(--ease-smooth);
}

.collapsible[open] > summary::after {
    transform: rotate(180deg);
    color: var(--accent-dark);
}

.collapsible > summary::-webkit-details-marker {
    display: none;
}

.collapsible .panel-body {
    padding: 16px;
}

.collapsible[open] .panel-body {
    animation: panelBodyIn 0.46s var(--ease-smooth);
}

.panel-canvas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.panel-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-self: flex-start;
    justify-content: flex-end;
    position: relative;
    z-index: 90;
}

body.app-locked {
    overflow: hidden;
}

body.app-locked .app {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

body.auth-modal-open .auth-gate {
    display: flex;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.status-badge.status-authenticated {
    border-color: rgba(31, 157, 92, 0.35);
    background: rgba(31, 157, 92, 0.12);
    color: #126d41;
}

.status-badge.status-guest {
    border-color: rgba(180, 122, 0, 0.3);
    background: rgba(244, 180, 0, 0.14);
    color: #8a5a00;
}

.status-badge.status-anonymous {
    border-color: rgba(107, 114, 128, 0.25);
    background: rgba(107, 114, 128, 0.08);
}

.user-menu {
    position: relative;
    z-index: 95;
}

.avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    padding: 0;
    border: 1px solid rgba(31, 157, 92, 0.28);
    background: linear-gradient(135deg, rgba(31, 157, 92, 0.2), rgba(31, 157, 92, 0.08));
    color: #126d41;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.03em;
    box-shadow: 0 14px 28px rgba(31, 157, 92, 0.18);
}

.avatar-btn:hover {
    background: linear-gradient(135deg, rgba(31, 157, 92, 0.26), rgba(31, 157, 92, 0.12));
    transform: translateY(-3px) scale(1.02);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
    animation: fadeLiftIn 0.34s var(--ease-smooth);
}

.user-dropdown-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 6px 10px;
    border-bottom: 1px solid var(--border);
}

.user-dropdown-head strong {
    font-size: 13px;
    color: var(--text);
}

.user-dropdown-head span {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

.user-dropdown-action {
    width: 100%;
    text-align: left;
    font-size: 12px;
    padding: 9px 10px;
    transition: transform 0.28s var(--ease-smooth), background-color 0.28s var(--ease-smooth), border-color 0.28s var(--ease-smooth);
}

.user-dropdown-action:hover {
    transform: translateX(3px);
}

.account-notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.account-notice.is-info {
    border-color: rgba(31, 157, 92, 0.28);
    background: rgba(31, 157, 92, 0.08);
}

.account-notice.is-warning {
    border-color: rgba(244, 180, 0, 0.35);
    background: rgba(255, 244, 229, 0.95);
    color: #8a5a00;
}

.account-notice.is-error {
    border-color: rgba(209, 67, 67, 0.28);
    background: rgba(255, 245, 245, 0.98);
    color: #a33a3a;
}

.section-title {
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 700;
}

.panel-canvas .section-title {
    margin: 0;
}

.hint {
    color: var(--muted);
    font-size: 12px;
}

.hint-secondary {
    display: block;
    max-width: 560px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.derived-field {
    margin-top: 4px;
}

.field span {
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.field-note {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.side-selection-guide {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(209, 214, 202, 0.94);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 243, 0.94));
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 12px;
}

.side-selection-guide strong {
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}

.side-selection-guide-intro {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.side-selection-guide-grid {
    display: grid;
    gap: 10px;
}

.side-selection-guide-card {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(214, 216, 208, 0.92);
    background: rgba(255, 255, 255, 0.88);
    display: grid;
    gap: 8px;
}

.side-selection-guide-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
}

.side-selection-guide-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.55;
}

.side-selection-guide-steps li::marker {
    color: var(--accent);
    font-weight: 700;
}

.side-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.side-summary-card {
    padding: 12px 10px;
    border-radius: 16px;
    border: 1px solid rgba(214, 216, 208, 0.96);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 242, 0.92));
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-summary-card small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.side-summary-card strong {
    font-size: 26px;
    line-height: 1;
}

.side-summary-usable strong {
    color: #1f9d5c;
}

.side-summary-passante strong {
    color: #b88700;
}

.side-summary-unavailable strong {
    color: #1f2933;
}

.password-input-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.password-input-wrap input {
    flex: 1;
}

.password-toggle {
    width: auto;
    min-width: 86px;
    margin-top: 0;
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
}

input,
select,
button {
    font: inherit;
    padding: 11px 13px;
    border: 1px solid rgba(214, 216, 208, 0.96);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    transition:
        border-color 0.35s var(--ease-smooth),
        box-shadow 0.35s var(--ease-smooth),
        transform 0.35s var(--ease-smooth),
        background-position 0.55s var(--ease-soft),
        background-color 0.35s var(--ease-smooth);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

input.field-error,
select.field-error,
button.field-error {
    border-color: #d14343;
    box-shadow: 0 0 0 3px rgba(209, 67, 67, 0.18);
    animation: shake 0.35s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

input:focus,
select:focus,
button:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(31, 157, 92, 0.14), 0 16px 26px rgba(31, 157, 92, 0.10);
}

input:hover,
select:hover {
    border-color: rgba(31, 157, 92, 0.26);
}

input[readonly] {
    background: linear-gradient(180deg, rgba(247, 247, 244, 0.94), rgba(243, 243, 238, 0.94));
    color: #4b5563;
}

button {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 242, 0.95)),
        linear-gradient(135deg, rgba(31, 157, 92, 0.04), rgba(255, 255, 255, 0));
    background-size: 100% 100%, 160% 160%;
    background-position: 0 0, 0% 50%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

button:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 157, 92, 0.4);
    background-position: 0 0, 100% 50%;
}

button[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

button:active {
    transform: translateY(0);
}

button.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 157, 92, 0.15);
}

#squareBtn.is-active,
#eraserBtn.is-active {
    border-color: var(--accent-dark);
    background: linear-gradient(135deg, rgba(31, 157, 92, 0.18), rgba(31, 157, 92, 0.08));
    color: #126d41;
}

button.is-locked:hover,
button.is-locked:focus {
    border-color: #d14343;
    box-shadow: 0 0 0 3px rgba(209, 67, 67, 0.18);
}

.button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.primary {
    background:
        linear-gradient(135deg, #24b169 0%, #1f9d5c 50%, #177b45 100%);
    border-color: var(--accent);
    color: #fff;
    width: 100%;
    margin-top: 6px;
    box-shadow: 0 18px 34px rgba(31, 157, 92, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.primary:hover {
    background:
        linear-gradient(135deg, #27bb6f 0%, #18824b 100%);
    border-color: var(--accent-dark);
    box-shadow: 0 22px 40px rgba(31, 157, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.ghost {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 242, 0.92));
    border-color: rgba(214, 216, 208, 0.96);
    font-size: 12px;
    padding: 8px 10px;
}

.ghost:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 242, 0.96));
}

.hidden {
    display: none;
}

.info-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
}

.info-panel p {
    margin: 0;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 140;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


.modal.sides-picker {
    background: rgba(15, 23, 42, 0.2);
    pointer-events: none;
}

.modal.sides-picker .modal-card {
    pointer-events: auto;
}
.modal.hidden {
    display: none;
}

.modal:not(.hidden) {
    animation: modalBackdropIn 0.34s var(--ease-soft);
}

.modal:not(.hidden) .modal-card {
    animation: modalCardIn 0.42s var(--ease-smooth);
}

.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at 18% 12%, rgba(31, 157, 92, 0.10), transparent 28%),
        radial-gradient(circle at 82% 84%, rgba(31, 157, 92, 0.08), transparent 32%),
        #ffffff;
}

.auth-gate.hidden {
    display: none;
}

body.auth-modal-open .auth-gate-content,
body.auth-modal-open .auth-gate-visual {
    filter: saturate(0.96);
}

.auth-gate-card {
    width: min(1180px, 100%);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.auth-gate-layout {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(280px, 1fr);
    align-items: center;
    gap: 48px;
}

.auth-gate-content {
    max-width: 520px;
}

.auth-kicker {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.auth-gate-card h2 {
    margin: 0 0 16px;
    font-size: clamp(40px, 5.2vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    max-width: 11ch;
    color: var(--accent-dark);
}

.auth-brand-word {
    color: var(--accent);
    display: block;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.auth-gate-copy {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 48ch;
}

body.page-ready .auth-kicker,
body.page-ready .auth-gate-card h2,
body.page-ready .auth-gate-copy,
body.page-ready #authGateMessage,
body.page-ready .auth-entry-actions > * {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeLiftIn 0.8s var(--ease-smooth) forwards;
}

body.page-ready .auth-kicker { animation-delay: 0.08s; }
body.page-ready .auth-gate-card h2 { animation-delay: 0.14s; }
body.page-ready .auth-gate-copy { animation-delay: 0.2s; }
body.page-ready #authGateMessage { animation-delay: 0.26s; }
body.page-ready .auth-entry-actions > :nth-child(1) { animation-delay: 0.32s; }
body.page-ready .auth-entry-actions > :nth-child(2) { animation-delay: 0.38s; }
body.page-ready .auth-entry-actions > :nth-child(3) { animation-delay: 0.44s; }

.auth-entry-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
}

.auth-entry-actions .primary,
.auth-entry-actions .ghost,
.guest-entry-btn {
    margin-top: 0;
    min-height: 52px;
    font-size: 14px;
    letter-spacing: 0.04em;
}

.auth-secondary-action {
    background: rgba(255, 255, 255, 0.82);
}

.guest-entry-btn {
    border: 1px dashed rgba(31, 157, 92, 0.42);
    border-radius: 14px;
    background: rgba(31, 157, 92, 0.08);
    color: #126d41;
    font-weight: 700;
}

.guest-entry-btn:hover {
    background: rgba(31, 157, 92, 0.12);
}

.auth-gate-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-gate-logo-wrap {
    width: min(100%, 520px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px;
    border-radius: 36px;
    background:
        radial-gradient(circle at top, rgba(31, 157, 92, 0.14), rgba(31, 157, 92, 0.03) 48%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(31, 157, 92, 0.16);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.55s var(--ease-smooth), box-shadow 0.55s var(--ease-smooth), border-color 0.55s var(--ease-smooth);
}

body.page-ready .auth-gate-logo-wrap {
    animation: authVisualIn 1.1s var(--ease-smooth) 0.18s both, ambientBreath 9s ease-in-out 1.3s infinite;
}

.auth-gate-logo-wrap:hover {
    transform: translateY(-6px) rotate(-1deg);
    border-color: rgba(31, 157, 92, 0.24);
    box-shadow: 0 36px 88px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.auth-gate-logo {
    width: min(100%, 360px);
    max-height: 100%;
    object-fit: contain;
    filter: hue-rotate(-72deg) saturate(1.28) brightness(1.04) drop-shadow(0 24px 30px rgba(31, 157, 92, 0.22));
}

.auth-stage-modal {
    z-index: 95;
    padding: 32px;
    background: rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-modal-frame {
    width: min(1180px, 100%);
    display: flex;
    justify-content: flex-start;
}

.auth-modal-card {
    width: min(520px, 94vw);
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(31, 157, 92, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 248, 244, 0.97));
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.auth-step {
    display: flex;
    flex-direction: column;
}

.auth-step.hidden {
    display: none;
}

.auth-inline-link {
    align-self: flex-start;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font-weight: 700;
}

.auth-inline-link:hover {
    background: transparent;
    color: var(--accent);
    text-decoration: underline;
}

.auth-actions {
    justify-content: space-between;
}

.auth-actions .primary,
.auth-actions .ghost {
    margin-top: 0;
}

.auth-actions-wide {
    flex-wrap: wrap;
}

.auth-feedback {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f8faf8;
    color: var(--text);
    font-size: 12px;
    line-height: 1.5;
}

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

.auth-feedback-action {
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0;
    text-transform: uppercase;
}

.auth-feedback-action:hover {
    color: var(--accent);
    text-decoration: underline;
}

.auth-feedback.is-success {
    border-color: rgba(31, 157, 92, 0.3);
    background: rgba(31, 157, 92, 0.08);
    color: #126d41;
}

.auth-feedback.is-error {
    border-color: rgba(209, 67, 67, 0.28);
    background: rgba(255, 245, 245, 0.98);
    color: #a33a3a;
}

.auth-feedback.is-warning {
    border-color: rgba(244, 180, 0, 0.35);
    background: rgba(255, 244, 229, 0.96);
    color: #8a5a00;
}

.projects-modal-card {
    width: min(760px, 96vw);
}

.projects-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.projects-toolbar p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.projects-list {
    display: grid;
    gap: 12px;
}

.project-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
}

.project-row:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 157, 92, 0.24);
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.10);
}

.project-row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-row-main strong {
    font-size: 15px;
}

.project-row-meta {
    font-size: 12px;
    color: var(--muted);
}

.project-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed var(--border);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.modal-card {
    width: min(560px, 92vw);
    background: var(--panel-gradient);
    border: 1px solid rgba(209, 214, 202, 0.88);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.canvas-container {
    margin-top: 8px;
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 242, 0.96));
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(209, 214, 202, 0.92);
    transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.canvas-container:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 157, 92, 0.20);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
}

.panel-canvas.is-sides-selecting .canvas-container {
    transform: scale(1.02);
    border-color: rgba(31, 157, 92, 0.55);
    box-shadow: 0 0 0 3px rgba(31, 157, 92, 0.15);
}

body.side-selection-lock-active .sidebar .panel,
body.side-selection-lock-active .legend-row,
body.side-selection-lock-active .app-header .header-actions {
    opacity: 0.72;
    transition: opacity 0.25s var(--ease-smooth);
}

body.side-selection-lock-active .panel-canvas,
body.side-selection-lock-active #sidesHint,
body.side-selection-lock-active #sideSelectionGuardModal,
body.side-selection-lock-active #sidesInfoModal {
    opacity: 1;
}

.sides-hint {
    position: absolute;
    top: 64px;
    right: 16px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.14);
    font-size: 12px;
    color: var(--text);
    z-index: 5;
}

.sides-hint strong {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sides-hint p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.sides-hint-progress {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(31, 157, 92, 0.08);
    border: 1px solid rgba(31, 157, 92, 0.12);
    color: #126d41;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.sides-hint-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.sides-hint-actions .primary {
    flex: 3;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 12px;
}

.sides-hint-actions .ghost {
    flex: 1;
    margin-top: 10px;
    padding: 6px 10px;
    font-size: 12px;
}

#sideSelectionGuardModal .modal-card {
    width: min(520px, 92vw);
}

#sideSelectionGuardText strong {
    color: var(--text);
}

canvas {
    width: 100%;
    height: auto;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfa 100%);
    border: 1px solid rgba(47, 47, 47, 0.78);
    border-radius: 12px;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

canvas.is-erasing {
    cursor: cell;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.legend-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.legend-actions .primary,
.legend-actions .ghost {
    padding: 8px 14px;
    font-size: 12px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(214, 216, 208, 0.86);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.28s var(--ease-smooth), border-color 0.28s var(--ease-smooth), box-shadow 0.28s var(--ease-smooth);
}

.legend-item:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 157, 92, 0.22);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.side-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.side-status-chip.is-usable {
    background: rgba(31, 157, 92, 0.12);
    border-color: rgba(31, 157, 92, 0.2);
    color: #137243;
}

.side-status-chip.is-passante {
    background: rgba(244, 180, 0, 0.16);
    border-color: rgba(184, 135, 0, 0.2);
    color: #8a5a00;
}

.side-status-chip.is-unavailable {
    background: rgba(31, 41, 51, 0.12);
    border-color: rgba(31, 41, 51, 0.18);
    color: #111827;
}

#sidesInfoModal .info-panel p:nth-child(1) strong {
    color: #1f9d5c;
}

#sidesInfoModal .info-panel p:nth-child(2) strong {
    color: #b88700;
}

#sidesInfoModal .info-panel p:nth-child(3) strong {
    color: #111827;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dot-snap {
    background: #9b59b6;
}

.dot-nozzle {
    background: #007bff;
}

.line-sample {
    width: 18px;
    height: 2px;
    background: #1f2933;
    display: inline-block;
    border-radius: 999px;
}

#result {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

#result h3 {
    margin: 0 0 12px;
    color: var(--text);
    border-bottom: 1px solid rgba(214, 216, 208, 0.86);
    padding-bottom: 10px;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#result h3 + .result-grid {
    margin-bottom: 14px;
}

.warnings {
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #f0c4c4;
    background: linear-gradient(180deg, #fff7f7, #fff1f1);
    color: #a33a3a;
    font-size: 12px;
    box-shadow: 0 18px 34px rgba(163, 58, 58, 0.08);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 14px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(214, 216, 208, 0.9);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 244, 0.94)),
        linear-gradient(135deg, rgba(31, 157, 92, 0.06), rgba(255, 255, 255, 0));
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
}

.result-item:hover {
    transform: translateY(-4px);
    border-color: rgba(31, 157, 92, 0.24);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.10);
}

.result-item span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result-item strong {
    font-size: 16px;
    line-height: 1.35;
}

.dimensionamento-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dimensionamento-row {
    display: grid;
    gap: 10px 14px;
}

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

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

.side-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 6px 0 14px;
    border: 1px solid rgba(214, 216, 208, 0.92);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.05);
}

.side-table td {
    border-right: 1px solid rgba(224, 226, 219, 0.94);
    border-bottom: 1px solid rgba(224, 226, 219, 0.94);
    padding: 12px 14px;
    vertical-align: top;
}

.side-table td:last-child {
    border-right: 0;
}

.side-table tr:last-child td {
    border-bottom: 0;
}

.side-title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.side-line {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.component-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
}

.component-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    border: 1px solid rgba(214, 216, 208, 0.9);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 248, 244, 0.94));
    font-size: 12px;
    color: var(--muted);
    min-width: 110px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.35s var(--ease-smooth), box-shadow 0.35s var(--ease-smooth), border-color 0.35s var(--ease-smooth);
}

.component-item:hover {
    transform: translateY(-5px);
    border-color: rgba(31, 157, 92, 0.24);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.10);
}

.component-item img {
    width: 56px;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s var(--ease-smooth), filter 0.35s var(--ease-smooth);
}

.component-item:hover img {
    transform: translateY(-3px) scale(1.05);
    filter: drop-shadow(0 10px 18px rgba(31, 157, 92, 0.16));
}

.materials-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0 14px;
    font-size: 12px;
    border: 1px solid rgba(214, 216, 208, 0.92);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.materials-table th,
.materials-table td {
    border-right: 1px solid rgba(224, 226, 219, 0.94);
    border-bottom: 1px solid rgba(224, 226, 219, 0.94);
    padding: 10px 12px;
    text-align: left;
}

.materials-table th:last-child,
.materials-table td:last-child {
    border-right: 0;
}

.materials-table tbody tr:last-child td {
    border-bottom: 0;
}

.materials-table tbody tr td {
    transition: background-color 0.24s ease;
}

.materials-table tbody tr:hover td {
    background: rgba(31, 157, 92, 0.04);
}
.materials-table .desc-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.materials-table .product-more {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 11px;
}
.materials-table details {
    display: inline-block;
}
.materials-table summary {
    cursor: pointer;
    color: #1f9d5c;
    font-weight: 600;
    list-style: none;
}
.materials-table summary::-webkit-details-marker {
    display: none;
}
.materials-table .full-desc {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    max-width: 420px;
}

.materials-table thead th {
    background: linear-gradient(180deg, rgba(247, 247, 244, 0.98), rgba(239, 243, 238, 0.96));
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.materials-total td {
    font-weight: 600;
}

.product-list {
    border: 1px solid rgba(214, 216, 208, 0.92);
    border-radius: 16px;
    padding: 12px 14px;
    margin: 10px 0 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.06);
}

.product-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(224, 226, 219, 0.92);
    font-size: 12px;
    color: var(--text);
}

.product-item:last-child {
    border-bottom: 0;
}

.cell-center {
    text-align: center;
    vertical-align: middle;
}

.panel-canvas:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 18px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.panel-canvas:fullscreen .canvas-container {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-canvas:fullscreen canvas {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    transition:
        opacity 0.8s var(--ease-smooth),
        transform 0.9s var(--ease-smooth);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes ambientFloatOne {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(3vw, 4vh, 0) scale(1.08);
    }
}

@keyframes ambientFloatTwo {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-4vw, -3vh, 0) scale(1.12);
    }
}

@keyframes panelBodyIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes modalBackdropIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalCardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authVisualIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ambientBreath {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body::before,
    body::after {
        display: none;
    }
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-brand-shell {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .status-badge,
    .user-menu {
        width: 100%;
    }

    .avatar-btn {
        width: 100%;
        border-radius: 14px;
        justify-content: flex-start;
        padding-left: 14px;
    }

    .user-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .panel-canvas {
        order: -1;
    }

    .draw-tools {
        grid-template-columns: 1fr;
    }

    .draw-tools .button-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .side-summary-cards,
    .password-input-wrap {
        grid-template-columns: 1fr;
    }

    .password-input-wrap {
        display: grid;
    }

    .password-toggle {
        width: 100%;
    }

    .dimensionamento-row-2,
    .dimensionamento-row-3 {
        grid-template-columns: 1fr;
    }

    .button-row {
        grid-template-columns: 1fr;
    }

    .auth-gate {
        padding: 20px;
    }

    .auth-gate-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .auth-gate-content {
        max-width: none;
        order: 2;
    }

    .auth-gate-card h2 {
        max-width: none;
        font-size: clamp(34px, 9vw, 56px);
    }

    .auth-gate-copy {
        font-size: 15px;
    }

    .auth-gate-visual {
        order: 1;
    }

    .auth-gate-logo-wrap {
        width: min(100%, 360px);
        padding: 26px;
        border-radius: 28px;
    }

    .auth-stage-modal {
        padding: 20px;
        align-items: center;
        justify-content: center;
    }

    .auth-modal-frame {
        justify-content: center;
    }

    .projects-toolbar,
    .project-row {
        grid-template-columns: 1fr;
    }

    .project-row-actions {
        justify-content: flex-start;
    }
}



