/* --- Notification Styles --- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-header {
    padding: 16px 20px 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-success .notification-icon {
    background-color: #dcfce7;
    color: #16a34a;
}

.notification-error .notification-icon {
    background-color: #fef2f2;
    color: #dc2626;
}

.notification-message {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.notification-close:hover {
    background-color: #f3f4f6;
    color: #6b7280;
}

.notification-progress {
    height: 3px;
    background-color: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    width: 100%;
    transform-origin: left;
    animation: progressShrink 5s linear forwards;
}

.notification-error .notification-progress-bar {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

@keyframes progressShrink {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* --- General Setup --- */
* {
    box-sizing: border-box;
}

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

/* --- Auth Container & Card --- */
.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
}

.auth-card {
    background-color: #ffffff;
    padding: 2.5rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 5px solid #dc2626;
    animation: fadeIn 0.5s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Logo --- */
.auth-logo {
    font-size: 2.5rem;
    color: #dc2626;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.auth-logo .fa-star {
    position: absolute;
    font-size: 1rem;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #f59e0b;
}

/* --- Titles & Text --- */
.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* --- Form & Input --- */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    text-align: left;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #ffffff;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    z-index: 1;
}

/* --- Date Input Styling --- */
.input-group input[type="date"] {
    color: #374151;
    cursor: pointer;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: #dc2626;
    font-size: 1.2rem;
}

.input-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: white;
    padding: 0 8px;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* --- Select Dropdown Styling --- */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    cursor: pointer;
}

.input-group select option {
    padding: 0.5rem;
    font-size: 1rem;
}

/* --- Location Section --- */
.location-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin: 0.5rem 0;
}

.location-section::before {
    content: "📍 Thông tin địa chỉ";
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
}

/* --- Password Strength Meter --- */
.strength-meter {
    height: 20px;
    width: 100%;
    background-color: #e5e7eb;
    border-radius: 5px;
    margin-top: -0.5rem;
    text-align: left;
}

.strength-bar {
    height: 100%;
    width: 0;
    background-color: #ef4444;
    border-radius: 5px;
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1.1rem;
    padding: 0.25rem;
    z-index: 2;
}

.toggle-password:hover {
    color: #dc2626;
}

/* --- Form Options --- */
.form-options {
    text-align: right;
    margin-top: -0.5rem;
}

.forgot-password-link {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* --- Buttons --- */
.auth-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
    margin-top: 1rem;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.auth-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Switch Auth Link --- */
.switch-auth {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.switch-auth a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
}

.switch-auth a:hover {
    text-decoration: underline;
}

/* --- Loading State --- */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
    }
    
    .auth-container {
        max-width: 100%;
        padding: 0.5rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 10px;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .location-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }

    .input-group input,
    .input-group select {
        padding: 0.875rem 0.875rem 0.875rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .input-group label {
        left: 0.875rem;
        font-size: 1rem;
    }
}