﻿*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: var(--hz-bg-page);
    color: var(--hz-text-primary);
    -webkit-font-smoothing: antialiased;
}

.login-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 32px 48px;
    overflow-x: hidden;
}

.login-page__shell {
    position: relative;
    z-index: 10;
    width: min(960px, 100%);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.login-page__ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(0, 153, 204, 0.05) 0%, transparent 55%),
        var(--hz-bg-page);
}

.login-page__grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 75%);
}

.login-page__glow {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.login-page__glow--left {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -80px;
    background: rgba(0, 212, 255, 0.07);
}

.login-page__glow--right {
    width: 360px;
    height: 360px;
    bottom: -100px;
    right: -60px;
    background: rgba(0, 153, 204, 0.06);
}

.login-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    animation: fadeDown 0.8s var(--ease-out) both;
}

.login-topbar__brand {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--hz-text-primary);
    letter-spacing: 0.42em;
    text-transform: uppercase;
}

.login-topbar__badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    color: var(--hz-text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid var(--hz-border-primary);
    border-radius: 999px;
    background: rgba(20, 20, 22, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-gate {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 560px;
    border: 1px solid var(--hz-border-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(20, 20, 22, 0.55);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow:
        var(--hz-shadow-lg),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        var(--hz-shadow-glow);
    animation: fadeUp 0.9s var(--ease-out) 0.1s both;
}

.login-gate__media {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-right: 1px solid var(--hz-border-primary);
}

.media-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.media-slide {
    position: absolute;
    inset: 0;
    background-image: url('../../../uploads/banner/1.png');
    background-size: cover;
    background-position: center;
}

.media-stage__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 11, 0.55) 0%, transparent 35%, rgba(10, 10, 11, 0.88) 100%),
        linear-gradient(90deg, rgba(10, 10, 11, 0.3) 0%, transparent 60%);
    pointer-events: none;
}

.media-stage__grain {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.media-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 40px 36px;
}

.media-copy {
    position: relative;
}

.copy-panel {
    width: 100%;
}

.copy-panel__index {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--hz-text-accent);
    letter-spacing: 0.16em;
    margin-bottom: 14px;
}

.copy-panel__title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 400;
    color: var(--hz-text-primary);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 14px;
}

.copy-panel__desc {
    font-size: 13px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    max-width: 340px;
}

.media-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.media-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.media-nav__dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hz-text-muted);
    flex-shrink: 0;
}

.media-nav__label {
    font-size: 11px;
    font-weight: 400;
    color: var(--hz-text-secondary);
    letter-spacing: 0.06em;
}

.login-gate__form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 44px;
    background: rgba(10, 10, 11, 0.45);
}

.form-container {
    width: 100%;
    max-width: 360px;
}

.form-header {
    margin-bottom: 36px;
}

.form-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    color: var(--hz-text-accent);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.form-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    color: var(--hz-text-primary);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 13px;
    font-weight: 300;
    color: var(--hz-text-secondary);
    letter-spacing: 0.01em;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--hz-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.input-wrapper {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 4px 0 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--hz-border-primary);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.input-wrapper:focus-within {
    border-color: var(--hz-border-secondary);
    background: rgba(0, 212, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.input-wrapper.has-error {
    border-color: rgba(255, 82, 82, 0.5);
    background: rgba(255, 82, 82, 0.04);
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.08);
}

.input-icon {
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.input-icon svg {
    width: 17px;
    height: 17px;
    color: var(--hz-text-muted);
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon svg {
    color: var(--hz-text-accent);
}

.input-wrapper input {
    flex: 1;
    height: 100%;
    padding: 0 14px 0 0;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--hz-text-primary);
    letter-spacing: 0.01em;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

.toggle-password {
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hz-text-muted);
    transition: color 0.3s ease;
    padding: 0;
}

.toggle-password:hover {
    color: var(--hz-text-secondary);
}

.toggle-password svg {
    width: 17px;
    height: 17px;
}

.input-error {
    display: none;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--hz-danger);
    animation: errorReveal 0.3s ease;
}

.input-error.visible {
    display: flex;
}

.input-error svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.login-btn {
    position: relative;
    width: 100%;
    height: 52px;
    margin-top: 8px;
    padding: 0;
    border: none;
    border-radius: var(--radius-md);
    background: var(--hz-accent-gradient);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.25);
}

.login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.35);
}

.login-btn:hover::before {
    opacity: 1;
}

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

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hz-bg-page);
}

.btn-arrow {
    width: 16px;
    height: 16px;
    color: var(--hz-bg-page);
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border: 2px solid rgba(10, 10, 11, 0.2);
    border-top-color: var(--hz-bg-page);
    border-radius: 50%;
    opacity: 0;
}

.login-btn.loading .btn-content {
    opacity: 0;
}

.login-btn.loading .btn-loading {
    opacity: 1;
    animation: btnSpin 0.8s linear infinite;
}

.login-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

.form-footer {
    margin-top: 28px;
}

.divider-line {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    color: var(--hz-text-muted);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.divider-line::before,
.divider-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hz-border-primary);
}

.divider-line span {
    padding: 0 14px;
}

.register-link {
    text-align: center;
    font-size: 13px;
    font-weight: 300;
    color: var(--hz-text-secondary);
}

.register-link a {
    color: var(--hz-text-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--hz-text-accent);
}

.login-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding-top: 8px;
    pointer-events: none;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.login-foot__line {
    display: block;
    width: 48px;
    height: 1px;
    background: var(--hz-border-primary);
}

.login-foot__text {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--hz-text-muted);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 11, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
}

.loading-ring {
    width: 48px;
    height: 48px;
    position: relative;
    margin: 0 auto 18px;
}

.ring-segment {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--hz-text-accent);
    border-radius: 50%;
    animation: ringSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ring-segment:nth-child(1) {
    animation-delay: -0.45s;
}

.ring-segment:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: rgba(0, 212, 255, 0.5);
}

.ring-segment:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: rgba(0, 212, 255, 0.25);
}

.loading-text {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.36em;
    text-transform: uppercase;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.toast-notification {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    min-width: 300px;
    max-width: 90vw;
    background: rgba(10, 10, 11, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--hz-shadow-lg);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 13px;
    font-weight: 400;
    color: var(--hz-text-primary);
}

.toast-notification.success {
    border-color: rgba(0, 230, 118, 0.35);
}

.toast-notification.success .toast-icon {
    color: var(--hz-success);
}

.toast-notification.success .toast-message {
    color: var(--hz-success);
}

.toast-notification.error {
    border-color: rgba(255, 82, 82, 0.35);
}

.toast-notification.error .toast-icon {
    color: var(--hz-danger);
}

.toast-notification.error .toast-message {
    color: var(--hz-danger);
}

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

@keyframes btnSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

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

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

@media (max-width: 900px) {
    .login-page {
        padding: 24px 20px 40px;
    }

    .login-page__shell {
        gap: 24px;
    }

    .login-gate {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-gate__media {
        min-height: 220px;
        border-right: none;
        border-bottom: 1px solid var(--hz-border-primary);
    }

    .media-content {
        padding: 28px 24px;
        gap: 20px;
    }

    .copy-panel__title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .copy-panel__desc {
        display: none;
    }

    .media-nav__list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .login-gate__form {
        padding: 36px 28px 40px;
    }

    .login-foot {
        animation: none;
    }
}

@media (max-width: 480px) {
    .login-topbar__badge {
        display: none;
    }

    .login-gate__media {
        min-height: 180px;
    }

    .login-gate__form {
        padding: 32px 22px 36px;
    }

    .form-title {
        font-size: 24px;
    }

    .input-wrapper {
        height: 48px;
    }

    .login-btn {
        height: 50px;
    }
}

@media (max-width: 360px) {
    .form-title {
        font-size: 22px;
    }

    .input-wrapper {
        height: 46px;
    }
}

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