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

:root {
    --bg: #f7f6f5;
    --surface: #ffffff;
    --surface2: #f7f6f5;
    --border: #e6e2de;
    --accent: #d9534f;
    --accent2: #c0392b;
    --text: #201a17;
    --muted: #8a7e78;
    --danger: #b83232;
    --success: #2d9e6b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(44, 36, 32, 0.04), 0 1px 3px rgba(44, 36, 32, 0.03);
    --shadow-lg: 0 20px 50px rgba(44, 36, 32, 0.08), 0 6px 16px rgba(44, 36, 32, 0.04);
    --ring: rgba(217, 83, 79, 0.16);
}

body {
    font-family: 'Inter', 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated background blobs — kept, toned down to sit quietly behind the card */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.08;
    animation: float 9s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    width: 420px;
    height: 420px;
    background: #d9534f;
    top: -80px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 340px;
    height: 340px;
    background: #e8b4b8;
    bottom: -60px;
    right: -80px;
    animation-delay: 3s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #c0392b;
    bottom: 30%;
    left: 10%;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-24px) scale(1.04);
    }
}

/* Grid pattern overlay — subtler, thinner lines */
body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.35;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 75%);
    pointer-events: none;
}

.login-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    font-size: 18px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.brand h1 {
    font-family: 'Syne', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brand p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
}

.card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.card .subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 26px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
}

.form-control {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 13.5px;
    padding: 10px 14px 10px 38px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-control::placeholder {
    color: var(--muted);
}

.toggle-pass {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
}

.toggle-pass:hover {
    color: var(--text);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    cursor: pointer;
}

.check-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}

.forgot-link {
    font-size: 12.5px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

.forgot-link:hover {
    opacity: 0.75;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent2);
}

.btn-primary:active {
    transform: translateY(0.5px);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

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

.sso-btn {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', 'DM Sans', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color 0.15s, background 0.15s;
}

.sso-btn:hover {
    border-color: var(--accent);
    background: rgba(217, 83, 79, 0.04);
}

.sso-btn img {
    width: 17px;
    height: 17px;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--muted);
}

.register-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.alert-error {
    background: rgba(217, 83, 79, 0.06);
    border: 1px solid rgba(217, 83, 79, 0.25);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 12.5px;
    padding: 10px 13px;
    margin-bottom: 16px;
    display: none;
}

.alert-error.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: rgba(45, 158, 107, 0.08);
    border: 1px solid rgba(45, 158, 107, 0.25);
    border-radius: var(--radius-sm);
    color: var(--success);
    font-size: 12.5px;
    padding: 10px 13px;
    margin-bottom: 16px;
    display: none;
}

.alert-success.show {
    display: flex;
    align-items: center;
    gap: 8px;
}