/* ==========================================================================
   Auth pages (log in / register)
   ========================================================================== */

.sg-auth {
    background:
        radial-gradient(circle at 0% 0%, rgba(194, 154, 72, .14), transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(94, 22, 36, .06), transparent 40%),
        var(--sg-ivory);
}

.sg-auth__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    max-width: 1080px;
    margin: 0 auto;
    border-radius: 32px;
    background: #fff;
    box-shadow: var(--sg-shadow-lg);
    overflow: hidden;
}

/* Visual panel ------------------------------------------------------------ */
.sg-auth__visual {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2.5rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(228, 201, 135, .22), transparent 45%),
        var(--sg-wine);
    color: rgba(255, 255, 255, .82);
    overflow: hidden;
}

.sg-auth__brand { display: flex; align-items: center; gap: .75rem; }
.sg-auth__brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(228, 201, 135, .5); }
.sg-auth__brand span { display: flex; flex-direction: column; color: #fff; font-family: var(--sg-serif); font-size: 1.45rem; font-weight: 600; line-height: 1; }
.sg-auth__brand small { margin-top: .3rem; font-family: var(--sg-sans); font-size: .58rem; letter-spacing: .5em; text-transform: uppercase; color: var(--sg-gold-300); }

.sg-auth__mosaic {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: .75rem;
    flex: none;
    height: 300px;
}

.sg-auth__mosaic img { min-height: 0; }

.sg-auth__mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid rgba(228, 201, 135, .35);
    padding: 4px;
}

.sg-auth__mosaic img:first-child { grid-row: span 2; border-radius: 999px 999px 20px 20px; }
.sg-auth__mosaic img:nth-child(2) { border-radius: 20px 20px 20px 80px; }
.sg-auth__mosaic img:nth-child(3) { border-radius: 20px; }

.sg-auth__pitch h2 { margin-bottom: 1rem; font-family: var(--sg-serif); font-size: 2.3rem; font-weight: 600; color: #fff; }
.sg-auth__pitch h2 em { color: var(--sg-gold-300); }
.sg-auth__pitch ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.sg-auth__pitch li { display: flex; align-items: center; gap: .7rem; font-size: .92rem; }

.sg-auth__pitch li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    color: var(--sg-gold-300);
}

/* Form -------------------------------------------------------------------- */
.sg-auth__form { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 3.5rem); }

.sg-auth__title {
    margin: .6rem 0 .4rem;
    font-family: var(--sg-serif);
    font-size: clamp(2.4rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1;
    color: var(--sg-ink);
}

.sg-auth__lead { margin: 0 0 1.5rem; color: var(--sg-muted); }

.sg-auth__alert {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border-radius: 14px;
    font-size: .9rem;
    font-weight: 500;
}

.sg-auth__alert.is-success { background: #E3F4EA; color: var(--sg-success); }
.sg-auth__alert.is-info { background: var(--sg-gold-100); color: var(--sg-wine); }

.sg-auth__fields { display: flex; flex-direction: column; gap: 1.1rem; }

.sg-auth__field label,
.sg-auth__label-row label { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--sg-ink); }

.sg-auth__label-row { display: flex; align-items: baseline; justify-content: space-between; }
.sg-auth__label-row a { color: var(--sg-wine); font-size: .82rem; text-decoration: none; }
.sg-auth__label-row a:hover { text-decoration: underline; }

.sg-auth__control { position: relative; }

.sg-auth__control > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sg-muted);
    pointer-events: none;
    transition: color .2s var(--sg-ease);
}

.sg-auth__control input {
    width: 100%;
    min-height: 54px;
    padding: .8rem 3rem .8rem 2.8rem;
    border: 1px solid var(--sg-line);
    border-radius: 16px;
    background: var(--sg-ivory);
    color: var(--sg-ink);
    font-family: var(--sg-sans);
    font-size: 1rem;
    outline: 0;
    transition: border-color .2s var(--sg-ease), background .2s var(--sg-ease), box-shadow .2s var(--sg-ease);
}

.sg-auth__control input::placeholder { color: #B4AAA0; }

.sg-auth__control input:focus {
    border-color: var(--sg-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(194, 154, 72, .15);
}

.sg-auth__control:focus-within > i { color: var(--sg-wine); }
.sg-auth__control input.is-invalid { border-color: var(--sg-sale); background: #FFF7F8; }

.sg-auth__reveal {
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--sg-muted);
}

.sg-auth__reveal:hover { background: #fff; color: var(--sg-wine); }

.sg-auth__error { display: flex; align-items: center; gap: .35rem; margin-top: .45rem; color: var(--sg-sale); font-size: .84rem; }

.sg-auth__remember { display: inline-flex; align-items: center; gap: .55rem; color: var(--sg-text); font-size: .92rem; cursor: pointer; }
.sg-auth__remember input { width: 18px; height: 18px; accent-color: var(--sg-wine); }

.sg-auth__submit { width: 100%; padding: 1.05rem 1.25rem; margin-top: .25rem; }
.sg-auth__submit i { transition: transform .25s var(--sg-ease); }
.sg-auth__submit:hover i { transform: translateX(4px); }

.sg-auth__divider { display: flex; align-items: center; gap: 1rem; margin: 1.75rem 0 1.1rem; color: var(--sg-muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.sg-auth__divider::before, .sg-auth__divider::after { content: ''; flex: 1; height: 1px; background: var(--sg-line); }

.sg-auth__alt { width: 100%; padding: .95rem 1.25rem; }

.sg-auth__note { display: flex; gap: .5rem; margin: 1rem 0 0; color: var(--sg-muted); font-size: .84rem; line-height: 1.5; }
.sg-auth__note i { color: var(--sg-gold); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sg-auth__card { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
    .sg-auth__visual { padding: 1.5rem 1.75rem; gap: 0; }
    .sg-auth__mosaic, .sg-auth__pitch ul { display: none; }
    .sg-auth__visual { flex-direction: row; align-items: center; justify-content: space-between; }
    .sg-auth__pitch h2 { margin: 0; font-size: 1.6rem; }
}

@media (max-width: 575.98px) {
    .sg-auth .container { padding-left: 0; padding-right: 0; }
    .sg-auth__card { border-radius: 0; box-shadow: none; }
    .sg-auth__visual { padding: 1.1rem 1.25rem; }
    .sg-auth__brand img { width: 42px; height: 42px; }
    .sg-auth__brand span { font-size: 1.2rem; }
    .sg-auth__pitch h2 { font-size: 1.3rem; }
    .sg-auth__form { padding: 1.75rem 1.25rem 2rem; }
}

/* Register: password strength + match + terms */
.sg-auth__strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .55rem; }
.sg-auth__strength span { height: 4px; border-radius: 4px; background: var(--sg-line); transition: background .25s var(--sg-ease); }
.sg-auth__strength small { grid-column: 1 / -1; color: var(--sg-muted); font-size: .78rem; }
.sg-auth__strength[data-level="1"] span:nth-child(-n+1) { background: var(--sg-sale); }
.sg-auth__strength[data-level="2"] span:nth-child(-n+2) { background: #D98B2B; }
.sg-auth__strength[data-level="3"] span:nth-child(-n+3) { background: var(--sg-gold); }
.sg-auth__strength[data-level="4"] span { background: var(--sg-success); }

.sg-auth__match { display: flex; align-items: center; gap: .35rem; margin-top: .45rem; font-size: .84rem; }
.sg-auth__match.is-ok { color: var(--sg-success); }
.sg-auth__match.is-bad { color: var(--sg-sale); }

.sg-auth__error a { color: var(--sg-wine); font-weight: 600; }
.sg-auth__terms { margin: .25rem 0 0; color: var(--sg-muted); font-size: .8rem; text-align: center; }
.sg-auth__terms a { color: var(--sg-wine); }