:root {
    --alert-danger-bg: #f8d7da;
    --alert-danger-border: #dc3545;
    --alert-danger-color: #721c24;
    --alert-warning-bg: #fff3cd;
    --alert-warning-border: #ff9800;
    --alert-warning-color: #856404;
    --alert-success-bg: #d4edda;
    --alert-success-border: #28a745;
    --alert-success-color: #155724;
}

[data-theme="dark"] {
    --alert-danger-bg: #3a1a1d;
    --alert-danger-border: #dc3545;
    --alert-danger-color: #ffb3ba;
    --alert-warning-bg: #3d2f1a;
    --alert-warning-border: #ff9800;
    --alert-warning-color: #ffd699;
    --alert-success-bg: #1a3a2d;
    --alert-success-border: #28a745;
    --alert-success-color: #b3ffcc;
}

.login-container {
    display: flex;
    justify-content: center;
    padding: 120px 16px 80px;
    min-height: calc(100vh - 72px);
}

.login-card {
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(25, 31, 40, 0.08);
    overflow: hidden;
}

.login-header {
    padding: 40px 36px 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.login-header h3 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.login-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-body {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.alert-custom {
    border-radius: 14px;
    padding: 18px 20px;
    border-left-width: 4px !important;
}

.alert-custom.alert-danger {
    border-left: 4px solid var(--alert-danger-border);
    background: var(--alert-danger-bg);
    color: var(--alert-danger-color);
}

.alert-custom.alert-warning {
    border-left: 4px solid var(--alert-warning-border);
    background: var(--alert-warning-bg);
    color: var(--alert-warning-color);
}

.alert-custom.alert-success {
    border-left: 4px solid var(--alert-success-border);
    background: var(--alert-success-bg);
    color: var(--alert-success-color);
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-social:hover {
    transform: translateY(-2px);
}

.btn-kakao {
    background: #fee500;
    color: #181600;
}

.btn-naver {
    background: #03c75a;
    color: #fff;
}

.btn-naver strong {
    font-weight: 900;
    font-size: 1rem;
}

.or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

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

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

.input-group + .input-group {
    margin-top: 18px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: transparent;
}

.input-wrapper input:focus::placeholder {
    color: var(--text-tertiary);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.12);
}

[data-theme="dark"] .input-wrapper input:focus {
    background: var(--bg-secondary);
}

.input-wrapper label {
    position: absolute;
    top: 50%;
    left: 46px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 0.72rem;
    color: var(--primary-color);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1rem;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-size: 1rem;
}

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

.toggle-password:focus {
    outline: none;
    color: var(--primary-color);
}

.btn-login {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    background: var(--primary-color);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 16px;
}

.btn-login:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(49, 130, 246, 0.24);
}

.btn-login:disabled {
    background: var(--border-color);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.bottom-links {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bottom-links a {
    color: var(--primary-color);
    font-weight: 600;
}

.bottom-links a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .login-container {
        padding: 96px 16px 64px;
        min-height: calc(100vh - 68px);
    }

    .login-card {
        max-width: 440px;
    }

    .social-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 88px 12px 56px;
        min-height: calc(100vh - 64px);
    }

    .login-card {
        border-radius: 16px;
    }

    .login-header {
        padding: 32px 24px 20px;
    }

    .login-body {
        padding: 28px 24px 32px;
    }
}

