:root {
    --bg-color: #f0f4f8;
    --card-bg: #ffffff;
    --primary-pastel: #aec6cf;
    --primary-hover: #96b3bd;
    --text-main: #4a5568;
    --text-light: #718096;
    --error-bg: #fff5f5;
    --error-text: #c53030;
    --success-bg: #f0fff4;
    --success-text: #2f855a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 16px;
    box-sizing: border-box;
    color: var(--text-main);
}

.card {
    background: var(--card-bg);
    padding: 24px 28px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

.logo-area {
    text-align: center;
    margin-bottom: 16px;
}

.logo-area img {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
}

h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.35;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    position: relative;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.2s;
    background: #fdfdfd;
    height: 44px;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--primary-pastel);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(174, 198, 207, 0.18);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #cbd5e0;
    font-size: 15px;
    z-index: 10;
}

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

button {
    width: 100%;
    padding: 12px;
    background: var(--primary-pastel);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 6px;
    height: 44px;
}

button:hover:not(:disabled) {
    background: var(--primary-hover);
}

button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.checkbox-container input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-hover);
    flex-shrink: 0;
}

.checkbox-container label {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
}

.se-link {
    color: #2b6cb0;
    text-decoration: none;
}

.se-link:hover {
    text-decoration: underline;
}

.alert {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    text-align: center;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #feb2b2;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #9ae6b4;
}

.policy-box {
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.policy-box span {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.4;
}

.user-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #edf2f7;
    padding: 8px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 12px;
}

.btn-cancel {
    color: var(--error-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 11.5px;
}

/* --- WELCOME POPUP --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 55, 72, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
}

.popup-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    animation: popup-in 0.25s ease-out;
}

@keyframes popup-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.popup-box i.fa-hand-sparkles {
    font-size: 30px;
    color: var(--primary-hover);
    margin-bottom: 10px;
}

.popup-box h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    color: #2d3748;
}

.popup-box p {
    font-size: 12.5px;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0 0 18px 0;
}

.popup-box button {
    margin-top: 0;
}

.popup-question {
    font-size: 13px;
    color: var(--text-main);
    margin: 4px 0 12px 0;
}

.popup-divider {
    border: none;
    border-top: 1px dashed #e2e8f0;
    margin: 14px 0;
}

.popup-btn-row {
    display: flex;
    gap: 10px;
}

.popup-btn-row button {
    margin-top: 0;
}

.btn-secondary {
    background: #e2e8f0 !important;
    color: var(--text-main) !important;
}

.btn-secondary:hover {
    background: #cbd5e0 !important;
}

.popup-reply-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    margin-bottom: 12px;
    background: #fdfdfd;
}

.popup-reply-form textarea:focus {
    border-color: var(--primary-pastel);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(174, 198, 207, 0.18);
}