@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --gold: #c9a45c;
    --gold-light: #e5c77d;
    --black: #050505;
    --panel: rgba(13, 13, 13, .88);
    --text: #eee;
    --muted: #777;
}
html {
    min-height: 100%;
}
body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    overflow-x: hidden;
    color: var(--text);
    background: var(--black);
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
}
.background {
    position: fixed;
    inset: 0;
    z-index: -5;
    background:
        radial-gradient(circle at 50% 50%, rgba(201,164,92,.08), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(201,164,92,.035), transparent 25%),
        #050505;
}
.grid {
    position: fixed;
    inset: 0;
    z-index: -4;
    opacity: .3;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 55px 55px;
    mask-image: radial-gradient(circle, black, transparent 75%);
}
.orbit {
    position: fixed;
    width: min(650px, 90vw);
    aspect-ratio: 1;
    border: 1px solid rgba(201,164,92,.09);
    border-radius: 50%;
    pointer-events: none;
    animation: rotate 20s linear infinite;
}
.orbit::before {
    content: "";
    position: absolute;
    inset: 9%;
    border: 1px solid rgba(201,164,92,.05);
    border-radius: 50%;
}
.orbit::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    top: -3px;
    left: 50%;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 18px var(--gold);
}
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 30;
    opacity: .025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
.login-wrapper {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    animation: reveal .8s cubic-bezier(.2,.8,.2,1) both;
}
.brand {
    text-align: center;
    margin-bottom: 25px;
}
.brand a {
    color: var(--gold-light);
    text-decoration: none;
    font-family: "Cinzel", serif;
    font-size: 25px;
    letter-spacing: .3em;
}
.brand span {
    color: #fff;
}
.status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #55755d;
    font-size: 8px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #55755d;
    box-shadow: 0 0 8px rgba(85,117,93,.8);
}
.login-card {
    position: relative;
    padding: clamp(28px, 6vw, 48px);
    background: var(--panel);
    border: 1px solid rgba(201,164,92,.18);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 100px rgba(0,0,0,.55);
    overflow: hidden;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: .7;
}
.card-label {
    color: var(--gold);
    font-size: 8px;
    letter-spacing: .35em;
    text-transform: uppercase;
}
.login-card h1 {
    margin-top: 15px;
    font-family: "Cinzel", serif;
    font-size: clamp(31px, 7vw, 42px);
    font-weight: 400;
    line-height: 1;
}
.subtitle {
    margin-top: 13px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}
form {
    margin-top: 32px;
}
.field {
    margin-bottom: 20px;
}
.field label {
    display: block;
    margin-bottom: 9px;
    color: #999;
    font-size: 9px;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.input-wrapper {
    position: relative;
}
.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 65px;
}
.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 65px 0 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(201, 164, 92, 0.2);
    outline: none;
    color: #eee;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}
.input-wrapper input::placeholder {
    color: #555;
    font-size: 11px;
}
.input-wrapper input:focus {
    border-color: #c9a45c;
    background: rgba(201, 164, 92, 0.045);
    box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.07);
}
.input-wrapper input:hover {
    border-color: rgba(201, 164, 92, 0.4);
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 2;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color .25s ease;
}
.password-toggle:hover {
    color: var(--gold);
}
.submit-btn {
    width: 100%;
    height: 52px;
    border: 0;
    color: #050505;
    background: var(--gold);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: .3s ease;
}
.submit-btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(201,164,92,.15);
}
.submit-btn:active {
    transform: translateY(0);
}
.submit-btn:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}
.loading-dots {
    animation: pulse 1s infinite;
}
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 27px 0;
    color: #444;
    font-size: 8px;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255,255,255,.07);
}
.register {
    text-align: center;
    color: #666;
    font-size: 11px;
}
.register a {
    color: var(--gold-light);
    text-decoration: none;
    transition: color .25s ease;
}
.register a:hover {
    color: #fff;
}
.security-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 18px;
    color: #3e3e3e;
    font-size: 7px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.security-footer span:last-child {
    color: #4e684f;
}
.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    background: rgba(13, 13, 13, .97);
    border: 1px solid rgba(201, 164, 92, .2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .4);
    font-size: 11px;
    line-height: 1.6;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .3s ease, transform .3s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 15px;
}
.toast-content {
    flex: 1;
    min-width: 0;
}
.toast-title {
    margin-bottom: 4px;
    color: var(--gold-light);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .15em;
}
.toast-description {
    color: #999;
    font-size: 11px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.toast.success {
    border-left: 2px solid #79a77f;
}
.toast.success .toast-icon {
    color: #79a77f;
    background: rgba(50, 100, 60, .12);
}
.toast.error {
    border-left: 2px solid #c87979;
}
.toast.error .toast-icon {
    color: #c87979;
    background: rgba(120, 30, 30, .12);
}
.toast.warning {
    border-left: 2px solid var(--gold);
}
.toast.warning .toast-icon {
    color: var(--gold);
    background: rgba(201, 164, 92, .12);
}
.toast.info {
    border-left: 2px solid #78a9c8;
}
.toast.info .toast-icon {
    color: #78a9c8;
    background: rgba(70, 130, 170, .12);
}
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(25px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
@keyframes pulse {
    50% {
        opacity: .3;
    }
}
@media (max-width: 500px) {
    body {
        padding: 20px 16px;
    }
    .login-wrapper {
        max-width: 100%;
    }
    .brand {
        margin-bottom: 20px;
    }
    .brand a {
        font-size: 21px;
    }
    .login-card {
        padding: 28px 22px;
    }
    .login-card h1 {
        font-size: 32px;
    }
    .security-footer {
        flex-direction: column;
        text-align: center;
    }
    .orbit {
        width: 470px;
    }
    .toast-container {
        top: 15px;
        right: 16px;
        width: calc(100vw - 32px);
    }
    .toast {
        padding: 14px;
    }
}
@media (max-width: 350px) {
    .login-card {
        padding: 23px 18px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}