@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 100%;
    max-width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 18px;
}

.login-form h2 {
    font-size: 22px;
    margin-bottom: 6px;
    color: #1a202c;
}

.subtitle {
    color: #718096;
    font-size: 13px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #2d3748;
    font-weight: 500;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 40px;
}

.password-wrapper input::-ms-reveal,
.password-wrapper input::-ms-clear {
    display: none;
}

.password-wrapper input::-webkit-credentials-auto-fill-button,
.password-wrapper input::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #718096;
    width: 20px;
    height: 20px;
    user-select: none;
}

.toggle-password:hover {
    color: #4a5568;
}

.toggle-password svg {
    width: 100%;
    height: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
}

.checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.forgot-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
}

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

.btn-primary {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.signup-link {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: #4a5568;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

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

.error-message {
    color: #f56565;
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .container {
        max-width: 360px;
        padding: 24px 26px;
    }

    .login-form h2 {
        font-size: 20px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 9px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .container {
        max-width: 100%;
        padding: 20px 18px;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    .login-form h2 {
        font-size: 18px;
    }

    .form-group input {
        padding: 8px 10px;
    }

    .password-wrapper input {
        padding-right: 38px;
    }

    .form-options {
        flex-direction: row;
        justify-content: space-between;
        gap: 6px;
    }

    .checkbox {
        font-size: 12px;
    }

    .forgot-link {
        font-size: 12px;
        white-space: nowrap;
    }

    .btn-primary {
        font-size: 13.5px;
        padding: 8px;
    }
}


/* =============================================
   TOAST NOTIFICATIONS  (added below)
   ============================================= */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 320px;
    width: calc(100% - 40px);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 14px;
    pointer-events: all;
    position: relative;
    overflow: hidden;
    transform: translateX(calc(100% + 30px));
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.35s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(calc(100% + 30px));
    opacity: 0;
}

/* Toast type — border + icon color */
.toast.success { border-left-color: #38a169; }
.toast.error   { border-left-color: #e53e3e; }
.toast.warning { border-left-color: #dd6b20; }
.toast.info    { border-left-color: #3182ce; }

/* Icon wrapper circle */
.toast-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon-wrap { background: #f0fff4; }
.toast.error   .toast-icon-wrap { background: #fff5f5; }
.toast.warning .toast-icon-wrap { background: #fffaf0; }
.toast.info    .toast-icon-wrap { background: #ebf8ff; }

.toast-icon-wrap svg {
    width: 16px;
    height: 16px;
}

.toast.success .toast-icon-wrap svg { stroke: #38a169; }
.toast.error   .toast-icon-wrap svg { stroke: #e53e3e; }
.toast.warning .toast-icon-wrap svg { stroke: #dd6b20; }
.toast.info    .toast-icon-wrap svg { stroke: #3182ce; }

/* Text */
.toast-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 2px;
    line-height: 1.3;
}

.toast-msg {
    font-size: 12px;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

/* Close button */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    margin-top: 1px;
}

.toast-close:hover {
    background: #edf2f7;
    color: #4a5568;
}

/* Progress bar at bottom */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    animation: toastShrink linear forwards;
}

.toast.success .toast-progress { background: #38a169; }
.toast.error   .toast-progress { background: #e53e3e; }
.toast.warning .toast-progress { background: #dd6b20; }
.toast.info    .toast-progress { background: #3182ce; }

@keyframes toastShrink {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 480px) {
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: 100%;
        width: auto;
    }
}