:root {
    --bg-navy: #031b35;
    --bg-midnight: #0a2d57;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-main: #14263b;
    --text-soft: #4f6073;
    --accent: #0f5a9e;
    --accent-hover: #0b4a82;
    --border: #d8e3ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: url("../img/signin_bg_img.png") center center / cover no-repeat fixed;
    color: #fff;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(130deg, rgba(3, 27, 53, 0.86) 0%, rgba(10, 45, 87, 0.79) 42%, rgba(14, 59, 104, 0.72) 100%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.08), transparent 26%),
        radial-gradient(circle at 84% 84%, rgba(255, 255, 255, 0.1), transparent 28%);
    z-index: -1;
}

.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(0.5px);
    animation: drift 12s ease-in-out infinite;
}

.shape-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(173, 216, 255, 0.26) 0%, rgba(173, 216, 255, 0) 65%);
    top: -70px;
    left: -50px;
}

.shape-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -120px;
    right: -80px;
    animation-delay: 2s;
}

.shape-3 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(154, 196, 255, 0.18) 0%, rgba(154, 196, 255, 0) 72%);
    top: 35%;
    right: 25%;
    animation-delay: 4s;
}

.signin-layout {
    position: relative;
    min-height: 100vh;
    width: min(1100px, 92vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
}

.brand-panel {
    padding: 24px;
    animation: slideInLeft 0.7s ease;
}

.brand-logo {
    width: min(560px, 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
    display: block;
    margin-bottom: 18px;
}

.brand-panel p {
    margin-top: 10px;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 1.25rem;
    text-shadow: 0 2px 10px rgba(1, 10, 20, 0.4);
}

.signin-card-wrap {
    display: flex;
    justify-content: center;
    animation: slideInUp 0.7s ease;
}

.signin-card {
    width: min(560px, 100%);
    background: rgba(248, 251, 255, 0.95);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    padding: 38px;
    box-shadow: 0 26px 50px rgba(2, 16, 31, 0.35);
    backdrop-filter: blur(6px);
}

.signin-card h2 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.subtext {
    margin: 10px 0 26px;
    color: var(--text-soft);
    font-size: 1rem;
}

.signin-form {
    display: grid;
    gap: 10px;
}

.signin-form label {
    color: var(--text-main);
    font-size: 1rem;
}

.signin-form input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.signin-form input:focus {
    border-color: #2f76b7;
    box-shadow: 0 0 0 4px rgba(47, 118, 183, 0.16);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 54px;
}

.toggle-pass {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    width: 36px;
    border: 0;
    border-radius: 10px;
    background: #eaf1f7;
    color: #17436a;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.toggle-pass svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.toggle-pass:hover {
    background: #d7e7f5;
}

.signin-btn {
    margin-top: 14px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--accent), #11497e);
    color: #fff;
    padding: 15px 18px;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    min-height: 56px;
}

.signin-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #1666b0, var(--accent-hover));
    box-shadow: 0 14px 24px rgba(15, 90, 158, 0.3);
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: bounce 1s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.15s;
}

.dot:nth-child(3) {
    animation-delay: 0.3s;
}

.signin-btn.loading .btn-label {
    display: none;
}

.signin-btn.loading .btn-loading {
    display: inline-flex;
}

.signin-btn.loading {
    cursor: wait;
    opacity: 0.95;
}

.kaveti-toast.toastify {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.toast-card {
    width: min(360px, calc(100vw - 24px));
    border-radius: 0;
    border: 1px solid;
    box-shadow: 0 12px 30px rgba(24, 34, 52, 0.16);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}

.toast-icon-box {
    height: 52px;
    width: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.toast-icon-box svg {
    width: 28px;
    height: 28px;
}

.toast-card--error {
    background: #efd8db;
    border-color: #e6c4ca;
}

.toast-card--error .toast-icon-box {
    background: #eabec5;
}

.toast-card--error .toast-icon-box svg {
    fill: #d83030;
}

.toast-card--success {
    background: #dcefe4;
    border-color: #c6e2d2;
}

.toast-card--success .toast-icon-box {
    background: #c2e4d0;
}

.toast-card--success .toast-icon-box svg {
    fill: #16784b;
}

.toast-card--info {
    background: #dbe8f6;
    border-color: #c7d9ee;
}

.toast-card--info .toast-icon-box {
    background: #c7dcf3;
}

.toast-card--info .toast-icon-box svg {
    fill: #1e5fa1;
}

.toast-message {
    color: #14223a;
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
    flex: 1 1 auto;
}

.toast-close {
    border: 0;
    background: transparent;
    color: #6b6f7f;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #4d5261;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes drift {
    0%,
    100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-12px) translateX(10px);
    }
}

@keyframes bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

@media (max-width: 960px) {
    .signin-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        width: min(720px, 92vw);
        padding: 24px 0 40px;
    }

    .brand-panel {
        text-align: center;
        padding-bottom: 0;
    }

    .brand-panel p {
        margin-inline: auto;
        font-size: 1.1rem;
    }

    .brand-logo {
        margin-inline: auto;
    }

    .signin-card {
        padding: 26px;
    }

    .signin-card h2 {
        font-size: 2.3rem;
    }
}
