:root {
    --cream: #faf8f3;
    --paper: #fffefa;
    --ink: #30372e;
    --muted: #777d72;
    --sage: #506a51;
    --sage-dark: #3d5540;
    --line: #e6e9df;
    --peach: #f5e4d8;
    --error: #bc4646;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background:
        radial-gradient(circle at 85% 20%, #f0f2e8 0, transparent 32%),
        var(--cream);
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    min-height: 100vh;
}
.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.navbar {
    max-width: 1240px;
    width: 100%;
    margin: auto auto 0;
    padding: 29px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.04em;
    font-size: 21px;
}
.brand-mark {
    color: #b47d63;
    margin-right: 8px;
    font-size: 25px;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
}
.nav-logout {
    border: 1px solid #cbd4c7;
    background: transparent;
    color: var(--sage);
    border-radius: 50px;
    padding: 9px 17px;
    cursor: pointer;
    font: inherit;
}
.nav-logout:hover {
    background: #eaf0e8;
}
main {
    flex: 1;
    display: flex;
    align-items: center;
}
.hero {
    max-width: 1180px;
    margin: 30px auto 75px;
    padding: 0 42px;
    width: 100%;
}
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 475px;
    align-items: center;
    gap: 85px;
}
.hero-copy {
    animation: rise 0.7s ease both;
}
.eyebrow,
.overline {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--sage);
    text-transform: uppercase;
}
.eyebrow-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #afc4a3;
    margin-right: 9px;
}
.hero h1,
.camera-layout h1 {
    font-family: "Playfair Display", serif;
    line-height: 1.13;
    font-size: clamp(44px, 5vw, 76px);
    font-weight: 500;
    letter-spacing: -0.045em;
    margin: 23px 0;
}
.hero h1 em,
.camera-layout h1 em {
    font-weight: 500;
    color: #9d745e;
}
.hero-copy > p,
.decor-card {
    margin-top: 62px;
    max-width: 360px;
    background: #edf1e7;
    border: 1px solid #e0e8d8;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: "Playfair Display", serif;
    font-size: 17px;
    box-shadow: 0 18px 45px #435d4110;
}
.sparkle {
    font-size: 27px;
    color: #9d745e;
}
.decor-line {
    height: 1px;
    flex: 1;
    background: #b8c9b2;
}
.form-card,
.camera-card {
    background: var(--paper);
    border: 1px solid #eeeee8;
    box-shadow: 0 22px 65px #394b3614;
    border-radius: 25px;
    padding: 35px 37px;
    animation: rise 0.75s 0.12s ease both;
}
.card-top {
    display: flex;
    align-items: center;
    gap: 15px;
}
.card-icon {
    height: 45px;
    width: 45px;
    border-radius: 14px;
    background: var(--peach);
    display: grid;
    place-items: center;
    color: #a77860;
    font-size: 20px;
}
.card-top h2 {
    font-family: "Playfair Display", serif;
    font-size: 27px;
    font-weight: 500;
    margin: 4px 0 0;
}
.card-intro {
    color: var(--muted);
    font-size: 13px;
    margin: 17px 0 25px;
}
.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f3f5ef;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 23px;
}
.tab {
    border: 0;
    background: transparent;
    padding: 11px;
    border-radius: 9px;
    color: var(--muted);
    font:
        600 13px "DM Sans",
        sans-serif;
    cursor: pointer;
    transition: 0.25s;
}
.tab.active {
    background: #fff;
    box-shadow: 0 3px 12px #35443613;
    color: var(--sage);
}
.field {
    margin-bottom: 15px;
}
.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
}
.field input {
    width: 100%;
    height: 44px;
    border: 1px solid #e1e5dc;
    border-radius: 9px;
    background: #fff;
    padding: 0 13px;
    color: var(--ink);
    font:
        13px "DM Sans",
        sans-serif;
    outline: none;
    transition: 0.2s;
}
.field input:focus {
    border-color: #90a98b;
    box-shadow: 0 0 0 3px #dce9d9;
}
.field input::placeholder {
    color: #a7aaa3;
}
.field input.invalid {
    border-color: var(--error);
}
.error,
.form-message,
.camera-error {
    display: block;
    color: var(--error);
    font-size: 12px;
    margin-top: 5px;
    min-height: 0;
}
.primary-button,
.secondary-button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 14px 18px;
    font:
        700 13px "DM Sans",
        sans-serif;
    cursor: pointer;
    transition:
        transform 0.2s,
        background 0.2s,
        box-shadow 0.2s;
}
.primary-button {
    background: var(--sage);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.primary-button:hover {
    background: var(--sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px #506a5133;
}
.primary-button:disabled {
    opacity: 0.65;
    cursor: wait;
}
.primary-button span {
    font-size: 18px;
    font-weight: 400;
}
.secondary-button {
    background: #f0f3ed;
    color: var(--sage);
}
.secondary-button:hover {
    background: #e4ebdf;
}
.hidden {
    display: none !important;
}
footer {
    padding: 20px;
    text-align: center;
    font-size: 11px;
    color: #9aa094;
}
footer span {
    color: #b8856d;
}
.camera-layout {
    max-width: 660px;
    width: 100%;
    padding: 35px 24px 70px;
    margin: auto;
    text-align: center;
    animation: rise 0.7s ease both;
}
.camera-layout h1 {
    font-size: clamp(44px, 6vw, 66px);
    margin: 15px 0;
}
.camera-card {
    text-align: left;
    padding: 24px;
}
.camera-stage {
    height: 340px;
    border-radius: 15px;
    overflow: hidden;
    background: #edf1e9;
    display: grid;
    place-items: center;
    position: relative;
}
.camera-placeholder {
    text-align: center;
    color: var(--sage);
}
.camera-illustration {
    font-size: 72px;
    line-height: 1;
    color: #9db29b;
}
.camera-placeholder h2 {
    font-family: "Playfair Display", serif;
    font-size: 23px;
    font-weight: 500;
    margin: 10px 0 4px;
}
.camera-placeholder p,
.camera-note {
    font-size: 12px;
    color: var(--muted);
}
#camera-video,
#picture-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.camera-actions {
    display: flex;
    gap: 10px;
    margin-top: 17px;
}
.camera-actions > * {
    flex: 1;
}
.camera-note {
    text-align: center;
    margin: 19px 0 0;
}
.camera-error {
    text-align: center;
}
.swal2-popup {
    font-family: "DM Sans", sans-serif !important;
    border-radius: 18px !important;
}
.swal2-confirm {
    background: var(--sage) !important;
}
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 850px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 600px;
    }
    .hero-copy {
        text-align: center;
    }
    .hero-copy > p {
        margin: auto;
    }
    .decor-card {
        display: none;
    }
    .hero h1 {
        font-size: 52px;
    }
    .hero {
        margin-top: 40px;
    }
}
@media (max-width: 560px) {
    .navbar {
        padding: 20px;
    }
    .brand {
        font-size: 18px;
    }
    .brand-mark {
        font-size: 20px;
    }
    .nav-user {
        gap: 9px;
        font-size: 12px;
    }
    .nav-logout {
        padding: 7px 11px;
        font-size: 11px;
    }
    .hero {
        padding: 0 18px;
        margin: 20px auto 45px;
    }
    .hero h1 {
        font-size: 43px;
    }
    .hero-copy > p {
        font-size: 14px;
    }
    .form-card {
        padding: 24px 20px;
        border-radius: 19px;
    }
    .camera-layout {
        padding: 18px 16px 45px;
    }
    .camera-card {
        padding: 15px;
    }
    .camera-stage {
        height: 290px;
    }
    .camera-actions {
        flex-wrap: wrap;
    }
}
