/* ==========================================================================
   GARDI — sign in
   Brand: navy #1e2a5a · teal #0f9488
   ========================================================================== */

:root {
    --ink: #0a1a33;
    --navy: #1e2a5a;
    --teal: #0f9488;
    --teal-dark: #0b7a70;
    --teal-soft: #e8f7f4;
    --muted: #5b6b81;
    --line: #e2ecea;
    --danger: #d9434f;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100svh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    background: #f4faf8;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    font: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(15, 148, 136, 0.5);
    outline-offset: 3px;
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    min-height: 100svh;
}

/* Brand panel -------------------------------------------------------------- */

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 44px 56px;
    color: #c8d8e8;
    background: linear-gradient(140deg, #081327 0%, #102a4c 55%, #0b3a45 100%);
    overflow: hidden;
    isolation: isolate;
}

.auth-brand::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    top: -220px;
    right: -160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(24, 197, 178, 0.4), transparent 66%);
    z-index: -1;
    animation: brandGlow 14s ease-in-out infinite alternate;
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 70% at 30% 30%, #000 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(80% 70% at 30% 30%, #000 10%, transparent 80%);
    z-index: -1;
    pointer-events: none;
}

.auth-brand-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-brand-top img {
    height: 46px;
    width: auto;
}

.auth-brand-main {
    margin-block: auto;
    padding: 56px 0 40px;
    max-width: 520px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #d6e5f2;
    margin-bottom: 26px;
    animation: authFade 0.7s ease both;
}

.auth-badge i {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(61, 219, 199, 0.18);
    color: #5ee6d2;
}

.auth-badge svg {
    width: 12px;
    height: 12px;
}

.auth-brand h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 2.7vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    animation: authFade 0.7s ease 0.08s both;
}

.auth-brand h1 span {
    color: #4fe0cb;
}

.auth-brand-lead {
    font-size: 15px;
    line-height: 1.7;
    color: #a5bacd;
    max-width: 430px;
    margin: 0 0 32px;
    animation: authFade 0.7s ease 0.16s both;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    animation: authFade 0.7s ease 0.24s both;
}

.auth-points li {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.auth-points .tick {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(61, 219, 199, 0.12);
    border: 1px solid rgba(61, 219, 199, 0.22);
    color: #5ee6d2;
    flex: none;
}

.auth-points .tick svg {
    width: 17px;
    height: 17px;
}

.auth-points b {
    display: block;
    font-family: var(--font-display);
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.auth-points p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #93aabe;
}

.auth-brand-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #8da3b9;
    animation: authFade 0.7s ease 0.32s both;
}

.auth-brand-foot span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
}

.auth-brand-foot span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #3ddbc7;
}

/* Form panel --------------------------------------------------------------- */

.auth-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 28px;
    background:
        radial-gradient(60% 50% at 85% 0%, rgba(15, 148, 136, 0.09), transparent 70%),
        radial-gradient(50% 50% at 0% 100%, rgba(30, 42, 90, 0.06), transparent 70%),
        #f5fbf9;
    overflow: hidden;
}

.auth-side-inner {
    width: 100%;
    max-width: 428px;
}

.auth-card {
    background: #fff;
    border: 1px solid rgba(30, 42, 90, 0.08);
    border-radius: 24px;
    box-shadow: 0 30px 70px -44px rgba(10, 26, 51, 0.5), 0 2px 6px rgba(10, 26, 51, 0.03);
    padding: 34px 34px 30px;
    animation: authRise 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.auth-card-head {
    text-align: center;
    margin-bottom: 26px;
}

.auth-card-logo {
    display: inline-flex;
    margin-bottom: 18px;
}

.auth-card-logo img {
    height: 42px;
    width: auto;
}

.auth-card-head h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin: 0 0 6px;
}

.auth-card-head p {
    margin: 0;
    font-size: 13.5px;
    color: #7b8ba0;
}

/* Alerts ------------------------------------------------------------------- */

.auth-alert {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px 14px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}

.auth-alert--success {
    background: #e9f8f4;
    border: 1px solid #c8ece4;
    color: #0b7a70;
}

.auth-alert--error {
    background: #fdf0f1;
    border: 1px solid #f7d5d8;
    color: #b23b45;
}

/* Fields ------------------------------------------------------------------- */

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field > label,
.auth-label-row label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: #23344b;
    letter-spacing: -0.005em;
}

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

.auth-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--teal-dark);
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #075e56;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-control {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #dce8e5;
    border-radius: 12px;
    background: #f7fbfa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-control:focus-within {
    background: #fff;
    border-color: rgba(15, 148, 136, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 148, 136, 0.12);
}

.auth-control.is-invalid {
    border-color: #e7a2a8;
    background: #fffafa;
}

.auth-control.is-invalid:focus-within {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(217, 67, 79, 0.12);
}

.auth-control-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    flex: none;
    color: #93a9b5;
    transition: color 0.2s ease;
}

.auth-control:focus-within .auth-control-icon {
    color: var(--teal-dark);
}

.auth-control-icon svg {
    width: 18px;
    height: 18px;
}

.auth-control input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 14px 14px 14px 0;
    font-family: var(--font-body);
    font-size: 14.5px;
    color: var(--ink);
    border-radius: 12px;
}

.auth-control input::placeholder {
    color: #a5b5c4;
}

.auth-control input:focus {
    outline: none;
}

.auth-control input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #f7fbfa inset;
    -webkit-text-fill-color: var(--ink);
}

.auth-reveal {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8ba0b0;
    flex: none;
    transition: color 0.2s ease, background 0.2s ease;
}

.auth-reveal:hover {
    color: var(--teal-dark);
    background: rgba(15, 148, 136, 0.07);
}

.auth-reveal svg {
    width: 18px;
    height: 18px;
}

.auth-reveal .icon-hide {
    display: none;
}

.auth-reveal[aria-pressed="true"] .icon-show {
    display: none;
}

.auth-reveal[aria-pressed="true"] .icon-hide {
    display: block;
}

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--danger);
}

.auth-error svg {
    width: 14px;
    height: 14px;
    flex: none;
    margin-top: 3px;
}

/* Remember row ------------------------------------------------------------- */

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #51637a;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}

.auth-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1.5px solid #c8d8d4;
    border-radius: 5px;
    background: #fff;
    flex: none;
    display: grid;
    place-items: center;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.auth-check input::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) scale(0);
    transition: transform 0.15s ease;
    margin-top: -2px;
}

.auth-check input:checked {
    background: var(--teal);
    border-color: var(--teal);
}

.auth-check input:checked::after {
    transform: rotate(-45deg) scale(1);
}

.auth-check input:focus-visible {
    outline: 3px solid rgba(15, 148, 136, 0.3);
    outline-offset: 2px;
}

/* Submit ------------------------------------------------------------------- */

.auth-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #0f9488 0%, #10a595 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.005em;
    box-shadow: 0 16px 30px -16px rgba(15, 148, 136, 0.85);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 34px -16px rgba(15, 148, 136, 0.9);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.auth-submit:hover svg {
    transform: translateX(3px);
}

.auth-submit.is-loading {
    opacity: 0.85;
    pointer-events: none;
}

.auth-submit.is-loading svg {
    display: none;
}

.auth-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

.auth-submit.is-loading .auth-spinner {
    display: inline-block;
}

.auth-note {
    margin: 2px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: #7b8ba0;
}

.auth-note a {
    color: var(--teal-dark);
    font-weight: 600;
}

.auth-note a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    margin-top: 22px;
    font-size: 12px;
    color: #8496a9;
}

.auth-foot a {
    color: #51637a;
    font-weight: 600;
}

.auth-foot a:hover {
    color: var(--teal-dark);
}

.auth-mobile-brand {
    display: none;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes authFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes brandGlow {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-30px, 30px, 0) scale(1.1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-brand {
        display: none;
    }

    .auth-side {
        min-height: 100svh;
        padding: 28px 20px 32px;
        justify-content: flex-start;
    }

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 22px;
    }

    .auth-mobile-brand img {
        height: 44px;
        width: auto;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 26px 22px 24px;
        border-radius: 20px;
    }

    .auth-card-head h2 {
        font-size: 21px;
    }

    .auth-card-logo img {
        height: 38px;
    }

    .auth-control input {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
