/* =====================
   ACCOUNTS PAGES STYLES
   Matches website theme with dark mode support
===================== */

/* Container */
.auth-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-body);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin-bottom: 50px;
    background: var(--bg-box-white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

body.dark-mode .auth-container {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Header */
.auth-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-main);
}

.auth-logo {
    width: 120px;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Body */
.auth-body {
    padding: 24px 32px 32px;
}

/* Social Login Buttons */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 1.5px solid var(--border-main);
    border-radius: 10px;
    background: var(--bg-box-white);
    color: var(--text-normal);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.social-btn:hover {
    border-color: var(--text-blue);
    background: var(--bg-box-indexs);
    color: var(--text-normal);
    transform: translateY(-1px);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-btn.google:hover {
    border-color: #4285f4;
}

.social-btn.facebook:hover {
    border-color: #1877f2;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-main);
}

.auth-divider span {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Form Styles */
.auth-form {
    position: relative;
}

.auth-form .ty-ajax-loading-box,
#loginLoading {
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("../images/loading.47ec8bffe2d5.svg") no-repeat center center transparent;
    background-color: rgba(255, 255, 255, 0.7);
    margin: 0px;
    z-index: 10000;
}

body.dark-mode .auth-form .ty-ajax-loading-box,
body.dark-mode #loginLoading {
    background-color: rgba(13, 20, 33, 0.7);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-normal);
}

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

.auth-form .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1.5px solid var(--border-main);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-normal);
    transition: all 0.2s ease;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--text-blue);
    background: var(--bg-box-white);
    box-shadow: 0 0 0 3px rgba(57, 97, 251, 0.1);
}

.auth-form .form-control::placeholder {
    color: var(--text-muted);
}

body.dark-mode .auth-form .form-control {
    background: var(--bg-body);
}

body.dark-mode .auth-form .form-control:focus {
    background: var(--bg-box-white);
    box-shadow: 0 0 0 3px rgba(97, 136, 255, 0.15);
}

/* Password field with toggle */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

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

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1.5px solid var(--border-main);
    border-radius: 4px;
    background: var(--bg-body);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.form-check-input:checked {
    background-color: var(--text-blue-button);
    border-color: var(--text-blue-button);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-normal);
    line-height: 1.5;
}

.form-check-label a {
    color: var(--text-blue);
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3961fb 0%, #2952e8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #2952e8 0%, #1e44d8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(57, 97, 251, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-normal);
    background: var(--bg-body);
    border: 1.5px solid var(--border-main);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-box-indexs);
    color: var(--text-normal);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #b21f2d 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #dc3545;
    border: 1.5px solid #dc3545;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-danger-outline:hover {
    background: #dc3545;
    color: #ffffff;
}

/* Error Messages */
.error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc3545;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.3);
    color: #198754;
}

.alert-info {
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    color: #0d6efd;
}

body.dark-mode .alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.4);
}

body.dark-mode .alert-success {
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.4);
}

body.dark-mode .alert-info {
    background: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.4);
}

/* Footer Links */
.auth-footer {
    padding: 20px 32px;
    background: var(--bg-box-indexs);
    text-align: center;
    border-top: 1px solid var(--border-main);
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-blue);
    text-decoration: none;
    font-weight: 600;
}

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

/* Links */
.auth-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-blue);
    text-decoration: none;
}

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

/* Success/Info Icon Box */
.auth-icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-icon-box.success {
    background: rgba(25, 135, 84, 0.1);
}

.auth-icon-box.success svg {
    color: #198754;
}

.auth-icon-box.info {
    background: rgba(13, 110, 253, 0.1);
}

.auth-icon-box.info svg {
    color: #0d6efd;
}

.auth-icon-box.warning {
    background: rgba(255, 193, 7, 0.1);
}

.auth-icon-box.warning svg {
    color: #ffc107;
}

.auth-icon-box.danger {
    background: rgba(220, 53, 69, 0.1);
}

.auth-icon-box.danger svg {
    color: #dc3545;
}

.auth-icon-box svg {
    width: 40px;
    height: 40px;
}

/* Message Box */
.auth-message {
    text-align: center;
    padding: 20px 0;
}

.auth-message h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 12px;
}

.auth-message p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-group .btn-secondary,
.btn-group .btn-submit {
    flex: 1;
}

/* Password Hint */
.password-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Profile Page Styles */
.profile-page {
    padding: 40px 20px;
    background: var(--bg-body);
    min-height: calc(100vh - 200px);
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--bg-box-white);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.dark-mode .profile-header {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-header) 0%, var(--bg-box-white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px;
}

.profile-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.profile-section {
    background: var(--bg-box-white);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.dark-mode .profile-section {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.profile-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-main);
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-main);
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item--actions {
    gap: 8px;
    justify-content: flex-start;
    padding: 20px 0 0 0;
}

.btn-profile-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}
.btn-profile-action:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-profile-renew {
    background: var(--bg-thead);
    color: var(--text-main);
    border: 1px solid var(--border-soft);
}
.btn-profile-upgrade {
    background: #f5a502;
    color: #fff;
}
.btn-profile-upgrade-basic {
    background: #f8bb0f;
    color: #fff;
}

.profile-item-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-item-value {
    font-size: 14px;
    color: var(--text-normal);
    font-weight: 500;
}

a.profile-item-clickable {
    text-decoration: none;
    border-radius: 8px;
    margin: 0 -12px;
    padding: 14px 12px;
    transition: background-color 0.15s ease;
}

a.profile-item-clickable:hover {
    background-color: var(--bg-body);
}

a.profile-item-clickable .profile-item-value {
    color: var(--text-blue);
}

.profile-item-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.15s ease;
}

a.profile-item-clickable:hover .profile-item-chevron {
    color: var(--text-blue);
    transform: translateX(2px);
}

/* Social Account Items */
.social-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 1px solid var(--border-main);
}

.social-account-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.social-account-info svg {
    width: 28px;
    height: 28px;
}

.social-account-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-normal);
}

.social-account-status {
    font-size: 13px;
    color: var(--text-muted);
}

.social-account-status.connected {
    color: #198754;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.profile-actions .btn-primary {
    background: linear-gradient(135deg, #3961fb 0%, #2952e8 100%);
    color: #ffffff;
}

.profile-actions .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(57, 97, 251, 0.35);
    transform: translateY(-1px);
}

.profile-actions .btn-outline {
    background: var(--bg-body);
    color: var(--text-normal);
    border: 1.5px solid var(--border-main);
}

.profile-actions .btn-outline:hover {
    background: var(--bg-box-indexs);
}

.profile-actions .btn-danger-outline {
    background: transparent;
    color: #dc3545;
    border: 1.5px solid #dc3545;
}

.profile-actions .btn-danger-outline:hover {
    background: #dc3545;
    color: #ffffff;
}

/* Warning Box */
.warning-box {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

body.dark-mode .warning-box {
    background: rgba(220, 53, 69, 0.12);
    border-color: rgba(220, 53, 69, 0.3);
}

.warning-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: #dc3545;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-box ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-normal);
    font-size: 14px;
}

.warning-box li {
    margin-bottom: 8px;
}

.warning-box li:last-child {
    margin-bottom: 0;
}

/* Logout Icon */
.logout-icon {
    margin: 16px 0;
    color: var(--text-muted);
}

/* Button Row */
.btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-row .btn-secondary,
.btn-row .btn-submit {
    flex: 1;
    max-width: 160px;
}

/* Email Management */
.email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.auth-form label.email-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--border-main);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-item input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1.5px solid var(--border-main);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    background: var(--bg-body);
}

.email-item:hover,
.auth-form label.email-item.active {
    border-color: var(--text-blue);
    background: rgba(57, 97, 251, 0.04);
}

.email-item input[type="radio"]:checked {
    border-color: var(--text-blue);
}

.email-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: var(--text-blue);
    border-radius: 50%;
}

.email-item-content {
    flex: 1;
    min-width: 0;
}

.email-item-address {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-normal);
    word-break: break-all;
}

.email-item-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.email-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.email-badge.primary {
    background: rgba(57, 97, 251, 0.1);
    color: #3961fb;
}

.email-badge.verified {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.email-badge.unverified {
    background: rgba(255, 193, 7, 0.1);
    color: #cc8800;
}

body.dark-mode .email-badge.primary {
    background: rgba(97, 136, 255, 0.15);
    color: #6188ff;
}

body.dark-mode .email-badge.verified {
    background: rgba(25, 135, 84, 0.15);
    color: #5dd39e;
}

body.dark-mode .email-badge.unverified {
    background: rgba(255, 193, 7, 0.15);
    color: #f5a504;
}

.email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.email-actions button {
    padding: 8px 14px;
    font-size: 13px;
}

.email-add-section {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border-main);
}

.email-add-section input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border: 1.5px solid var(--border-main);
    border-radius: 8px;
    background: var(--bg-body-white);
    color: var(--text-normal);
    transition: all 0.2s ease;
}

.email-add-section input[type="email"]:focus {
    outline: none;
    border-color: var(--text-blue);
    box-shadow: 0 0 0 3px rgba(57, 97, 251, 0.1);
}

body.dark-mode .email-add-section input[type="email"] {
    background: var(--bg-body);
}

body.dark-mode .email-add-section input[type="email"]:focus {
    background: var(--bg-box-white);
    box-shadow: 0 0 0 3px rgba(97, 136, 255, 0.15);
}

.email-add-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
}

/* Email Highlight */
.email-highlight {
    font-weight: 600;
    color: var(--text-main);
}

/* Tier Badge */
.tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.tier-badge.tier-free {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.tier-badge.tier-basic {
    background: rgba(57, 97, 251, 0.1);
    color: #3961fb;
}

.tier-badge.tier-pro {
    background: linear-gradient(135deg, rgba(245, 165, 4, 0.15), rgba(255, 193, 7, 0.15));
    color: #d4900a;
}

body.dark-mode .tier-badge.tier-free {
    background: rgba(108, 117, 125, 0.2);
    color: #adb5bd;
}

body.dark-mode .tier-badge.tier-basic {
    background: rgba(97, 136, 255, 0.2);
    color: #6188ff;
}

body.dark-mode .tier-badge.tier-pro {
    background: rgba(245, 165, 4, 0.2);
    color: #f5a504;
}

/* API Key */
.api-key-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
}

.api-key-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-main);
    border-radius: 8px;
}

.api-key-value {
    flex: 1;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--text-normal);
    word-break: break-all;
    user-select: all;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    color: var(--text-blue);
    background: rgba(57, 97, 251, 0.1);
}

.btn-icon.copied {
    color: #198754;
}

.api-key-actions {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-main);
}

/* =====================
   Market Filter — profile page
===================== */

#rsFilterSection h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

#rsFilterSection h2 svg {
    color: #3961fb;
    flex-shrink: 0;
}

body.dark-mode #rsFilterSection h2 svg {
    color: #6188ff;
}

/* Field block */
.rs-field {
    margin-bottom: 16px;
}

.rs-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rs-field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.rs-exclude-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-body);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    padding: 1px 8px;
}

/* Tag input wrapper + locked state */
.filter-tag-input-wrap {
    position: relative;
}

.filter-tag-input-wrap.rs-locked .filter-tag-input {
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.rs-lock-overlay {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 1;
    line-height: 0;
}

.rs-lock-overlay:hover {
    color: var(--text-normal);
}

/* Tag input */
.filter-tag-input {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-height: 42px;
    padding: 5px 10px;
    border: 1.5px solid var(--border-main);
    border-radius: 10px;
    background: var(--bg-body);
    width: 100%;
    box-sizing: border-box;
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-tag-input:focus-within {
    border-color: #3961fb;
    box-shadow: 0 0 0 3px rgba(57, 97, 251, 0.1);
}

body.dark-mode .filter-tag-input:focus-within {
    border-color: #6188ff;
    box-shadow: 0 0 0 3px rgba(97, 136, 255, 0.12);
}

/* Tags */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(57, 97, 251, 0.1);
    color: #3961fb;
    border: 1px solid rgba(57, 97, 251, 0.2);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 4px 2px 8px;
    border-radius: 5px;
}

body.dark-mode .filter-tag {
    background: rgba(97, 136, 255, 0.12);
    color: #6188ff;
    border-color: rgba(97, 136, 255, 0.25);
}

.filter-tag-remove {
    background: none;
    border: none;
    color: rgba(57, 97, 251, 0.5);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0 1px;
    transition: color 0.12s;
}

.filter-tag-remove:hover { color: #dc3545; }

body.dark-mode .filter-tag-remove { color: rgba(97, 136, 255, 0.5); }

/* Search input */
.filter-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: var(--text-main);
    min-width: 100px;
    flex: 1;
    padding: 3px 0;
}

.filter-search-input::placeholder { color: var(--text-muted); }

/* Autocomplete dropdown */
.filter-autocomplete {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-box-white);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
}

body.dark-mode .filter-autocomplete {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.filter-ac-item {
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.1s;
}

.filter-ac-item:hover { background: var(--bg-body); }
.filter-ac-item b { font-weight: 700; margin-right: 5px; }
.filter-ac-item small { color: var(--text-muted); }

.rs-input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Apply-to card */
.rs-apply-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    margin-bottom: 20px;
}

.rs-apply-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-top: 4px;
}

.rs-apply-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rs-apply-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1.5px solid var(--border-main);
    border-radius: 4px;
    background: var(--bg-box-white);
    transition: background 0.15s, border-color 0.15s;
}

.rs-apply-item input:checked + .rs-apply-checkmark {
    background-color: #3961fb;
    border-color: #3961fb;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.rs-apply-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rs-apply-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-normal);
}

.rs-apply-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.rs-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-rs-save-config {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3961fb 0%, #2952e8 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}

.btn-rs-save-config:hover {
    box-shadow: 0 4px 12px rgba(57, 97, 251, 0.35);
    transform: translateY(-1px);
}

.btn-rs-save-config:active { transform: translateY(0); }

.filter-save-status {
    font-size: 13px;
    font-weight: 500;
}

.filter-save-status.saved { color: #198754; }
.filter-save-status.error { color: #dc3545; }

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        max-width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-header,
    .auth-body,
    .auth-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .profile-section {
        padding: 20px;
    }

    .profile-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .profile-item--actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-group {
        flex-direction: column;
    }

    .social-account-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }

    .social-account-item .btn-secondary {
        width: 100%;
    }
}
/* =====================
   PARTNER DASHBOARD
===================== */
.partner-code {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 6px;
    border-radius: 6px;
    background: var(--bg-box-grey, #f1f5f9);
    color: var(--text-main, #0f172a);
    font-weight: 600;
    font-family: monospace;
}
.partner-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0;
}
.partner-stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-main, #e5e7eb);
    border-radius: 10px;
    background: var(--bg-box-white, #fff);
}
.partner-stat-card .ps-label {
    font-size: 12px;
    color: var(--text-muted, #64748b);
}
.partner-stat-card .ps-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}
.partner-stat-card .ps-paid { color: #22c55e; }
.partner-stat-card .ps-pending { color: #f59e0b; }
.partner-empty {
    text-align: center;
    color: var(--text-muted, #64748b);
    padding: 24px 0;
}
@media (max-width: 768px) {
    .partner-stats-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Partner: bộ chọn khoảng thời gian */
.partner-range {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 14px 0 4px;
}
.partner-range-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-main, #e5e7eb);
    border-radius: 999px;
    background: var(--bg-box-white, #fff);
    color: var(--text-muted, #64748b);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.partner-range-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}
.partner-range-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Partner: mã + mức giảm */
.partner-code-pair {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}
.partner-code-discount {
    font-size: 13px;
    color: var(--text-muted, #64748b);
}

/* Partner: ghi chú thuế */
.partner-note {
    margin: 10px 0 0;
    font-size: 12px;
    font-style: italic;
    color: var(--text-muted, #64748b);
}

/* Partner: card tài khoản nhận hoa hồng */
.partner-bank-card {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--border-main, #e5e7eb);
    border-radius: 12px;
    background: var(--bg-box-grey, #f8fafc);
}
.partner-bank-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}
.partner-bank-head svg { color: #3b82f6; }
.partner-bank-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.pb-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pb-field--full { grid-column: 1 / -1; }
.pb-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}
.pb-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-main, #e5e7eb);
    border-radius: 9px;
    background: var(--bg-box-white, #fff);
    color: var(--text-main, #0f172a);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.pb-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.partner-bank-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 14px;
}
.partner-bank-status { font-size: 13px; font-weight: 600; }
.partner-bank-status.saved { color: #16a34a; }
.partner-bank-status.error { color: #dc2626; }
@media (max-width: 768px) {
    .partner-bank-grid { grid-template-columns: 1fr; }
    .partner-bank-actions { justify-content: stretch; }
    .partner-bank-actions .btn-profile-action { flex: 1; }
}
