/* ============================================================
   UngDungAI Mail Hub — Auth Forms CSS (login/register/forgot/reset)
   Classes: umh-auth-* (class-auth.php)
   ============================================================ */

.umh-auth-wrap {
    max-width: 460px;
    margin: 48px auto;
    padding: 0 16px;
}

.umh-auth-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.umh-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.umh-auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.umh-auth-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.umh-auth-form .umh-form-row {
    margin-bottom: 18px;
}

.umh-auth-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.umh-auth-form label .required {
    color: #dc2626;
}

.umh-auth-field,
.umh-auth-form input[type="text"],
.umh-auth-form input[type="email"],
.umh-auth-form input[type="password"],
.umh-auth-form input[type="tel"],
.umh-auth-form input[type="file"],
.umh-auth-form select,
.umh-auth-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.umh-auth-form input:focus,
.umh-auth-form select:focus,
.umh-auth-form textarea:focus {
    outline: none;
    border-color: #16a34a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

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

/* Button */
.umh-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.umh-btn--primary {
    background: #16a34a;
    color: #ffffff;
}

.umh-btn--primary:hover {
    background: #15803d;
}

.umh-btn--primary:active {
    transform: scale(0.98);
}

.umh-btn--block {
    display: block;
    width: 100%;
}

.umh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Links row */
.umh-auth-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.umh-auth-links a {
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
}

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

.umh-auth-links .umh-link-sep {
    margin: 0 8px;
    color: #d1d5db;
}

/* Messages */
.umh-auth-message,
.umh-auth-success,
.umh-auth-error,
.umh-login-message,
.umh-register-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.umh-auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    display: block;
}

.umh-auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    display: block;
}

/* Checkbox row (newsletter) */
.umh-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}

.umh-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #16a34a;
    cursor: pointer;
}

.umh-checkbox-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Password toggle */
.umh-pass-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 13px;
    padding: 4px;
}

.umh-pass-wrap {
    position: relative;
}

/* Verify page */
.umh-verify-success {
    text-align: center;
    padding: 24px;
}

.umh-verify-success .umh-verify-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ============================================================
   Profile Page (tai-khoan) — umh-profile-*
   ============================================================ */
.umh-profile-wrap {
    display: flex;
    gap: 28px;
    max-width: 1080px;
    margin: 40px auto;
    padding: 0 16px;
    align-items: flex-start;
}

.umh-profile-sidebar {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.umh-profile-avatar img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #16a34a;
    display: inline-block;
    margin-bottom: 8px;
}

.umh-profile-sidebar h3 {
    margin: 8px 0 2px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.umh-user-email {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
    word-break: break-all;
}

.umh-profile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    margin-top: 12px;
}

.umh-profile-nav a {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.umh-profile-nav a:hover {
    background: #f3f4f6;
    color: #16a34a;
}

.umh-profile-nav a.active {
    background: #16a34a;
    color: #fff;
}

.umh-profile-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.umh-profile-tab {
    display: none;
}

.umh-profile-tab.active {
    display: block;
}

.umh-profile-tab h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.umh-profile-form .umh-form-row {
    display: flex;
    gap: 16px;
}

.umh-profile-form .umh-form-row > .umh-auth-field {
    flex: 1;
}

.umh-auth-field {
    margin-bottom: 16px;
}

.umh-auth-field small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    font-size: 12px;
}

.umh-auth-field input[disabled] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* Buttons: secondary + small + danger */
.umh-btn--secondary {
    background: #f3f4f6;
    color: #374151;
}

.umh-btn--secondary:hover {
    background: #e5e7eb;
}

.umh-btn--sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.umh-btn--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.umh-btn--danger:hover {
    background: #fecaca;
}

/* Prefs options */
.umh-prefs-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}

.umh-prefs-options .umh-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.2s, background 0.2s;
}

.umh-prefs-options .umh-checkbox-label:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

/* Responsive profile */
@media (max-width: 768px) {
    .umh-profile-wrap {
        flex-direction: column;
    }
    .umh-profile-sidebar {
        flex: none;
        width: 100%;
    }
    .umh-profile-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .umh-auth-wrap {
        margin: 24px auto;
    }
    .umh-auth-card {
        padding: 28px 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .umh-auth-card {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
    .umh-auth-header h1 { color: #f9fafb; }
    .umh-auth-header p { color: #9ca3af; }
    .umh-auth-form label { color: #d1d5db; }
    .umh-auth-field,
    .umh-auth-form input[type="text"],
    .umh-auth-form input[type="email"],
    .umh-auth-form input[type="password"],
    .umh-auth-form input[type="tel"],
    .umh-auth-form select,
    .umh-auth-form textarea {
        background: #111827;
        border-color: #4b5563;
        color: #f9fafb;
    }
    .umh-auth-form input:focus {
        border-color: #22c55e;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    }
    .umh-auth-links { color: #9ca3af; }
}
