/* ==============================================
   COMPONENTS CSS - LỮ ĐOÀN 6
   Các thành phần UI: Input, Button, Link...
   ============================================== */

/* ----- INPUT FIELDS ----- */
.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    /* rounded-xl */
    outline: none;
    transition: all 0.3s ease;
}

.form-input:hover {
    border-color: #d1d5db;
    background-color: #fff;
}

/* FOCUS STATE - Viền đỏ cờ */
.form-input:focus {
    border-color: #b91c1c;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* ----- INPUT WRAPPER VỚI ICON ----- */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.125rem;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #b91c1c;
}

/* ----- ICON ẨN/HIỆN MẬT KHẨU ----- */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #6b7280;
}

/* ----- NÚT BẤM CHÍNH (ĐỎ CỜ) ----- */
.btn-primary {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: white;
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    border: none;
    border-radius: 0.75rem;
    /* rounded-xl */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    box-shadow: 0 6px 20px rgba(185, 28, 28, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(185, 28, 28, 0.3);
}

/* ----- NÚT PHỤ (XANH LÁ) ----- */
.btn-secondary {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #14532d;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 2px solid #22c55e;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-secondary i {
    font-size: 1.125rem;
}

/* ----- LINK STYLES ----- */
.auth-link {
    color: #b91c1c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #991b1b;
    text-decoration: underline;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray {
    color: #6b7280;
}

/* ----- DIVIDER ----- */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}

.divider span {
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ----- ALERT MESSAGES ----- */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

.alert i {
    font-size: 1.25rem;
}