/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #1a1a2e;
    --navy-light: #16213e;
    --gold: #e8c56d;
    --gold-light: #f2d98a;
    --white: #ffffff;
    --gray-100: #f5f5f7;
    --gray-200: #e8e8ec;
    --gray-400: #9a9aaa;
    --gray-600: #5c5c6e;
    --gray-800: #2a2a3a;
    --text: #1a1a2e;
    --text-muted: #6b6b80;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 20px 60px rgba(26, 26, 46, 0.12), 0 4px 16px rgba(26, 26, 46, 0.06);
    --transition: 0.2s ease;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font);
    background-color: #f0f0f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* ===== Background Shapes ===== */
.bg-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(26, 26, 46, 0.08);
    top: -100px;
    right: -80px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: rgba(232, 197, 109, 0.15);
    bottom: -60px;
    left: -60px;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: rgba(26, 26, 46, 0.05);
    top: 50%;
    left: 30%;
    transform: translateY(-50%);
}

/* ===== Layout ===== */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

/* ===== Card ===== */
.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Card Header ===== */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-mark {
    display: inline-flex;
    margin-bottom: 1.25rem;
}

.logo-mark svg {
    filter: drop-shadow(0 4px 12px rgba(26, 26, 46, 0.2));
}

.card-header h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== Form ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.field-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-800);
    letter-spacing: 0.01em;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 14px;
    color: var(--gray-400);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 44px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text);
    background: var(--gray-100);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
}

.input-wrap input::placeholder {
    color: var(--gray-400);
    font-weight: 300;
}

.input-wrap input:hover {
    border-color: var(--gray-400);
}

.input-wrap input:focus {
    background: var(--white);
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.toggle-pw {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.toggle-pw:hover {
    color: var(--navy);
    background: var(--gray-200);
}

/* ===== Submit Button ===== */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 0.5rem;
    padding: 0 1.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    background: var(--navy);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.btn-submit:hover {
    background: var(--navy-light);
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.25);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-submit svg {
    transition: transform var(--transition);
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: flex-end;
    }

    .login-card {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        padding: 2rem 1.5rem 2.5rem;
        animation: slideUpMobile 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes slideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-container {
        max-width: 100%;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .login-card {
        padding: 2rem 1.75rem;
    }
}

/* ===== Safe area untuk notch/home bar ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 480px) {
        .login-card {
            padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
        }
    }
}