:root {
    --primary-accent: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary-accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-sidebar: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.markdown-content {
    color: var(--text-primary);
    line-height: 1.75;
    word-break: break-word;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    font-weight: 800;
    margin: 0.75rem 0 0.5rem;
}

.markdown-content h1 { font-size: 1.35rem; }
.markdown-content h2 { font-size: 1.2rem; }
.markdown-content h3 { font-size: 1.08rem; }
.markdown-content p { margin-bottom: 0.75rem; }
.markdown-content ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.markdown-content blockquote {
    border-left: 4px solid var(--primary-accent);
    padding-left: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-hover);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}
.markdown-content code {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-radius: 6px;
    padding: 0.1rem 0.35rem;
}
.markdown-content pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--border-radius-md);
    padding: 0.85rem;
    overflow-x: auto;
}
.markdown-content img { max-width: 100%; border-radius: var(--border-radius-md); }
.delivery-plain {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 0.75rem;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.navbar-brand i {
    -webkit-text-fill-color: initial;
    color: var(--primary-accent);
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-center .nav-link {
    flex: 0 1 auto;
    text-align: center;
    min-width: 90px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-accent);
    background: var(--primary-light);
}

.nav-link i {
    margin-right: 0.4rem;
}

.btn {
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
    color: white;
}

.btn-outline {
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    background: rgba(99, 102, 241, 0.05);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    border: none;
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.05);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    border: none;
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.product-card .product-image {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: linear-gradient(135deg, #f5f3ff 0%, #e0e7ff 50%, #ede9fe 100%);
}

.product-custom-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-custom-img.detail {
    border-radius: 16px;
}

.product-detail-image {
    width: 100%;
    min-height: 220px;
    max-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    background: linear-gradient(135deg, #f5f3ff, #e0e7ff);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
}

.product-image-uploader {
    border: 1.5px dashed var(--border-color);
    border-radius: 16px;
    background: var(--bg-hover);
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 150px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.product-image-uploader:hover,
.product-image-uploader.dragover {
    border-color: var(--primary-accent);
    background: var(--primary-light);
}

.product-image-preview-placeholder {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

.product-image-preview-placeholder i {
    font-size: 2rem;
    color: var(--primary-accent);
}

.product-image-preview-placeholder img,
#pubImagePreview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.product-card .product-image.image-error,
.product-detail-image.image-error,
.product-image-preview-placeholder.image-error {
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
}

.product-card .product-image.image-error i,
.product-detail-image.image-error i,
.product-image-preview-placeholder.image-error i {
    font-size: 2rem;
    color: var(--primary-accent);
}

.product-card .product-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card .product-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.product-card .product-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    flex: 1;
    line-height: 1.5;
}

.product-card .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.product-card .price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--danger);
}

.product-card .stock-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.stock-badge.in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    display: block;
}

.form-control {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    background: var(--bg-surface);
}

.form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.form-select {
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    background: var(--bg-surface);
}

.form-select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-accent);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
}

.avatar.has-image {
    background: #fff;
    border: 1px solid rgba(99, 102, 241, .18);
}

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

.nav-avatar-clickable {
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.nav-avatar-clickable:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .22);
}

.nav-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

.nav-icon-btn:hover {
    color: var(--primary-accent);
    border-color: var(--primary-accent);
    background: var(--primary-light);
    box-shadow: 0 10px 22px rgba(99, 102, 241, .12);
    transform: translateY(-1px);
}

.nav-announcement-btn i {
    font-size: 1rem;
}

.nav-dot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .62rem;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.avatar-lg {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.avatar-xl {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-header-bar {
    background: var(--bg-surface);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header-bar .avatar {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
}

.sidebar {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.sidebar-nav {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid transparent;
    white-space: nowrap;
    gap: 0.5rem;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.sidebar-nav-item i {
    font-size: 1rem;
    width: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(10px);
}

.captcha-card {
    position: relative;
    width: min(420px, 100%);
    border-radius: 24px;
    background: #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
    animation: modalSlideIn .22s ease;
}

.captcha-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.25rem;
    line-height: 1;
}

.captcha-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #fff;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-accent));
}

.captcha-card h5 {
    font-weight: 800;
    margin-bottom: .45rem;
}

.captcha-card p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.captcha-widget {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.captcha-inline-box {
    margin-bottom: .75rem;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.auth-modal {
    z-index: 2100;
}

body:has(.auth-modal.show) .modal-backdrop.show {
    z-index: 2050;
}

.auth-modal .modal-dialog {
    max-width: 860px;
}

.auth-modal .modal-content {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.auth-modal-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    overflow: hidden;
    min-height: 560px;
    border-radius: 24px;
    background: transparent;
    animation: authPanelIn .28s cubic-bezier(.22, 1, .36, 1);
}

.auth-art-pane {
    position: relative;
    grid-column: 1 / 3;
    grid-row: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.35rem;
    color: #fff;
    min-height: 560px;
    overflow: hidden;
    background: transparent;
    border-radius: 24px;
}

.auth-form-shell {
    position: relative;
    z-index: 4;
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    min-height: 560px;
    border-radius: 0 24px 24px 0;
    background: transparent;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1), border-radius .42s cubic-bezier(.22, 1, .36, 1);
}

.auth-modal-content.is-register .auth-form-shell {
    transform: translateX(-110.5%);
    border-radius: 24px 0 0 24px;
}

.auth-modal-content.is-forgot .auth-form-shell {
    transform: translateX(-55.25%);
    border-radius: 24px;
}

.auth-form-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}

.auth-modal-content.is-forgot .auth-form-track {
    transform: translateX(-33.3333%);
}

.auth-modal-content.is-register .auth-form-track {
    transform: translateX(-66.6667%);
}

.auth-form-pane {
    width: 33.3333%;
    min-height: 560px;
    position: relative;
    z-index: 3;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.auth-form-pane .modal-body {
    padding: 1rem 2rem 2rem;
    background: transparent;
}

.auth-form-pane .modal-header {
    padding: 1.5rem 2rem 0;
    background: transparent;
}

.auth-form-pane .modal-title,
.auth-form-pane .form-label,
.auth-form-pane .text-muted {
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(15, 23, 42, .75);
}

.auth-form-pane .btn-close {
    filter: invert(1) drop-shadow(0 2px 6px rgba(15, 23, 42, .55));
    opacity: .88;
}

.auth-form-pane .form-control {
    min-height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .72);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}

.auth-form-pane .input-group .btn {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}

.auth-main-btn {
    min-height: 46px;
    justify-content: center;
    border-radius: 14px;
}

.auth-anime-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
}

@keyframes authPanelIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-art-pane::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.18) 52%, rgba(15, 23, 42, 0.58) 100%);
}

.auth-art-caption {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 22px;
    background: rgba(15, 23, 42, .28);
    box-shadow: 0 18px 50px rgba(15,23,42,.22);
    text-align: center;
    backdrop-filter: blur(10px);
}

.auth-art-caption h4 {
    font-weight: 900;
    margin-bottom: .45rem;
    text-shadow: 0 2px 14px rgba(0,0,0,.24);
}

.auth-art-caption p {
    margin: 0;
    color: rgba(255,255,255,.9);
    line-height: 1.7;
    font-size: .9rem;
}

.btn-close {
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.chat-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-bubble.sent {
    background: var(--gradient-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: var(--bg-hover);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble .chat-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    display: block;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
    background: var(--bg-hover);
}

.table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.stat-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card.primary i { color: var(--primary-accent); }
.stat-card.success i { color: var(--success); }
.stat-card.warning i { color: var(--warning); }
.stat-card.danger i { color: var(--danger); }

.delivery-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
}

.delivery-card .copy-btn {
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-fast);
    margin-left: 0.5rem;
}

.delivery-card .copy-btn:hover {
    opacity: 1;
    color: var(--primary-accent);
}

.star-rating {
    display: inline-flex;
    gap: 0.25rem;
}

.star-rating i {
    cursor: pointer;
    color: #d1d5db;
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.star-rating i:hover,
.star-rating i.active {
    color: #fbbf24;
}

        .star-rating i:hover {
    transform: scale(1.2);
}

.rating-radio-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
}

.rating-radio {
    cursor: pointer;
}

.rating-radio input {
    display: none;
}

.rating-radio span {
    display: block;
    text-align: center;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 0.65rem 0.4rem;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 700;
    transition: var(--transition-fast);
}

.rating-radio input:checked + span {
    border-color: var(--primary-accent);
    background: var(--primary-light);
    color: var(--primary-accent);
}

.complaint-reason-box {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    min-height: 76px;
    white-space: pre-wrap;
    word-break: break-word;
}

.seller-product-card {
    cursor: pointer;
    border: 1px solid rgba(99, 102, 241, 0.12);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.seller-product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.seller-product-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.seller-stock-action {
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.seller-product-delete {
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.18);
}

.seller-product-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .45rem;
}

.stock-manage-actions {
    justify-content: flex-end;
}

.seller-stock-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.seller-stock-summary > .seller-stock-stat {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #f8fafc;
    padding: .75rem;
    text-align: center;
    cursor: pointer;
    transition: all .18s ease;
}

.seller-stock-summary > .seller-stock-stat:hover,
.seller-stock-summary > .seller-stock-stat.active {
    border-color: var(--primary-color);
    background: #eef4ff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}

.seller-stock-summary strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.25rem;
    line-height: 1.1;
}

.seller-stock-summary span {
    color: var(--text-muted);
    font-size: .8rem;
}

.seller-stock-list {
    display: grid;
    gap: .65rem;
    max-height: min(58vh, 520px);
    overflow-y: auto;
    padding-right: .2rem;
}

.seller-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    padding: .75rem;
}

.seller-stock-row.sold {
    background: #f8fafc;
    opacity: .78;
}

.seller-stock-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1;
}

.seller-stock-index {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 800;
}

.seller-stock-buyer {
    white-space: nowrap;
    flex-shrink: 0;
}

.seller-stock-content {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: .84rem;
    color: var(--text-primary);
}

.seller-stock-select {
    flex: 0 0 auto;
    margin-top: 0;
}

.seller-stock-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.seller-stock-toolbar .form-select {
    width: 150px;
    border-radius: 12px;
}

.seller-stock-page-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .seller-product-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .stock-manage-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-manage-actions .btn {
        width: 100%;
        justify-content: center;
        padding-left: .45rem;
        padding-right: .45rem;
    }

    .seller-stock-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem;
    }

    .seller-stock-summary > .seller-stock-stat {
        padding: .6rem .35rem;
    }

    .seller-stock-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .seller-stock-toolbar .form-select {
        width: 100%;
    }

    .seller-stock-page-actions {
        justify-content: space-between;
    }

    .seller-stock-row {
        align-items: stretch;
        flex-direction: column;
    }

    .seller-stock-main {
        width: 100%;
        align-items: flex-start;
        gap: .5rem;
    }

    .seller-stock-content {
        white-space: normal;
        word-break: break-all;
    }

    .seller-stock-row .btn {
        align-self: flex-end;
    }
}

.review-modal-head {
    padding: 0.5rem 0 0.25rem;
}

.review-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
    font-size: 1.35rem;
}

.rating-radio-beauty .rating-radio span {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.rating-radio-beauty .rating-radio span small {
    color: #f59e0b;
    letter-spacing: -1px;
}

.rating-radio-beauty .rating-radio input:checked + span {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    color: #b45309;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.16);
}

.review-textarea {
    resize: vertical;
    border-radius: 16px;
}

.complaint-manage-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.85rem;
    background: var(--bg-surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.complaint-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.complaint-thread-list.compact {
    max-height: 240px;
}

.complaint-thread-item {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}

.complaint-thread-item.seller {
    border-color: #67e8f9;
    background: #ecfeff;
}

.complaint-thread-item.buyer {
    border-color: #dbeafe;
    background: #eff6ff;
}

.purchase-quantity-box {
    max-width: 180px;
}

.product-rating-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.seller-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0;
}

.seller-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.seller-level-badge.custom-label-badge {
    margin-left: 0.25rem;
}

.seller-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.seller-level-badge.vip {
    color: #7c2d12;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.14);
}

.seller-level-badge.free {
    color: var(--text-muted);
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.page-link {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    padding: 0.5rem 0.85rem;
    transition: var(--transition-fast);
}

.page-link:hover {
    background: var(--primary-light);
    color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-accent);
}

.payment-select-card {
    transition: all 0.2s ease;
}

.payment-select-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.payment-select-card.border-primary {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.payment-method-card {
    transition: all 0.2s ease;
}

.payment-method-card:hover {
    border-color: var(--primary-light);
}

.recharge-payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.purchase-payment-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.recharge-payment-option,
.purchase-payment-option {
    min-height: 58px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .85rem 1rem;
    font-weight: 700;
    text-align: left;
    transition: all .2s ease;
}

.purchase-payment-option {
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: .75rem .55rem;
}

.purchase-payment-option i {
    font-size: 1.45rem;
    color: var(--primary-accent);
}

.purchase-payment-option small {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    font-size: .74rem;
    line-height: 1.15;
}

.purchase-payment-option.disabled,
.purchase-payment-option:disabled {
    cursor: not-allowed;
    opacity: .55;
    background: #f8fafc;
}

.recharge-payment-option:hover,
.purchase-payment-option:not(:disabled):hover {
    border-color: var(--primary-accent);
    box-shadow: 0 10px 24px rgba(99, 102, 241, .12);
    transform: translateY(-1px);
}

.recharge-payment-option > i {
    color: var(--primary-accent);
    opacity: 0;
    font-size: 1.25rem;
    transition: opacity .2s ease;
}

.recharge-payment-option.active,
.purchase-payment-option.active {
    border-color: var(--primary-accent);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .16);
    color: var(--primary-accent);
}

.recharge-payment-option.active > i {
    opacity: 1;
}

.purchase-payment-option.active small {
    color: var(--primary-accent);
}

.qr-payment-modal {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.qr-payment-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: .5rem 1rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-accent);
    font-weight: 800;
    margin-bottom: .75rem;
}

.qr-payment-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.qr-payment-box {
    width: 236px;
    height: 236px;
    margin: 0 auto;
    padding: .8rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .14);
}

.qr-payment-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-payment-box iframe {
    border: 0;
    width: 360px;
    height: 560px;
    transform: translate(-72px, -140px) scale(1.08);
    transform-origin: top left;
    pointer-events: none;
    background: #fff;
}

.qr-payment-iframe-crop {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
}

.qr-payment-iframe-crop.hidden,
.qr-payment-box img.hidden,
.qr-payment-fallback.hidden {
    display: none;
}

.qr-payment-fallback {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: #f8fafc;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.qr-payment-fallback-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff7ed;
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: .65rem;
}

.qr-payment-status {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: .9rem;
}

.search-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-input input {
    width: 100%;
    padding-left: 2.5rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-group select {
    min-width: 140px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.55rem 0 0.65rem;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 0.45rem 0.5rem;
        align-items: center;
    }

    .navbar-brand {
        font-size: 1.15rem;
        max-width: 36vw;
        min-height: 40px;
    }

    .navbar-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-actions {
        margin-left: auto;
        max-width: calc(64vw - 0.5rem);
    }

    #navUserArea {
        gap: 0.35rem !important;
    }

    #navBalance,
    #navUsername {
        display: none !important;
    }

    .nav-actions .btn,
    .nav-icon-btn,
    .nav-avatar-clickable {
        min-width: 38px;
        min-height: 38px;
    }

    .nav-center {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.2rem 0 0.05rem;
        scrollbar-width: none;
    }

    .nav-center::-webkit-scrollbar {
        display: none;
    }

    .nav-center .nav-link {
        min-width: auto;
        min-height: 40px;
        flex: 0 0 auto;
        padding: 0.55rem 0.85rem !important;
        border-radius: 999px;
        background: rgba(99, 102, 241, 0.06);
        border: 1px solid rgba(99, 102, 241, 0.08);
        font-size: 0.88rem;
    }

    .nav-center .nav-link.active {
        background: var(--primary-light);
        border-color: rgba(99, 102, 241, 0.22);
    }

    .main-content {
        padding-top: 1rem;
    }

    #homePage > .d-flex:first-child {
        margin-top: 0.35rem;
        margin-bottom: 1rem !important;
        padding: 0.9rem 1rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(226, 232, 240, 0.9);
    }

    #homePage > .d-flex:first-child h3 {
        font-size: 1.15rem;
    }

    .product-card .product-image {
        height: 100px;
        font-size: 2.5rem;
    }

    .product-detail-image {
        min-height: 180px;
        max-height: 220px;
    }

    .sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .chat-bubble {
        max-width: 90%;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .auth-modal-content {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 22px;
    }

    .auth-art-pane {
        display: block;
        grid-column: 1;
        grid-row: 1;
        min-height: min(82vh, 640px);
        padding: 0;
        border-radius: 22px;
    }

    .auth-art-caption {
        display: none;
    }

    .auth-art-pane::before {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.20) 0%, rgba(15, 23, 42, 0.42) 44%, rgba(15, 23, 42, 0.68) 100%);
    }

    .auth-form-shell {
        grid-column: 1;
        grid-row: 1;
        min-height: min(82vh, 640px);
        border-radius: 22px;
        background: transparent;
    }

    .auth-modal-content.is-register .auth-form-shell,
    .auth-modal-content.is-forgot .auth-form-shell {
        transform: none;
        border-radius: 22px;
    }

    .auth-form-track {
        min-height: min(82vh, 640px);
    }

    .auth-form-pane {
        min-height: min(82vh, 640px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-form-pane .modal-body,
    .auth-form-pane .modal-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }
}

.text-primary { color: var(--primary-accent) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted) !important; }

.membership-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .membership-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .membership-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.membership-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
}

.membership-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.membership-card.current {
    border-color: var(--primary-accent);
}

.membership-activation-card {
    border-color: rgba(79, 70, 229, 0.28);
}

.membership-activation-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.12), transparent 35%);
}

.membership-activation-card .card-footer {
    position: relative;
    z-index: 1;
}

.membership-card .card-header {
    background: var(--card-gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.membership-card .card-header i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.membership-card .card-header h5 {
    margin: 0;
    font-weight: 700;
}

.membership-card .current-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.membership-card .card-body {
    padding: 1.5rem;
}

.membership-card .privilege-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.membership-card .privilege-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.membership-card .privilege-list li:last-child {
    border-bottom: none;
}

.membership-card .privilege-list li i {
    color: var(--success);
}

.membership-card .card-footer {
    padding: 1rem 1.5rem 1.5rem;
}

.membership-current-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-accent) 100%);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
}

.membership-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.membership-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.privileges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.privilege-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
}

.privilege-item i {
    color: var(--primary-accent);
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .membership-cards {
        grid-template-columns: 1fr;
    }
    
    .membership-current-card {
        flex-direction: column;
        text-align: center;
    }
    
    .privileges-grid {
        grid-template-columns: 1fr;
    }
}

.bg-primary-light { background: var(--primary-light) !important; }
.bg-success-light { background: rgba(16, 185, 129, 0.1) !important; }

.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-xl { border-radius: var(--border-radius-xl) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.announcement-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.announcement-card:last-child {
    margin-bottom: 0 !important;
}

.announcement-list {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

#navAnnouncementBtn {
    flex: 0 0 38px;
}

.payment-receive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.payment-receive-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.payment-receive-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.payment-receive-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 800;
    color: var(--text-primary);
}

.payment-receive-title i {
    color: var(--primary-accent);
    font-size: 1.25rem;
}

.payment-account-lock-wrap {
    position: relative;
}

.payment-account-lock-wrap .form-control.locked {
    padding-right: 6.2rem;
    color: #64748b;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.payment-account-lock {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
    pointer-events: none;
}

.payment-upload-zone {
    display: block;
    border: 1.5px dashed var(--border-color);
    border-radius: 16px;
    background: #f8fafc;
    min-height: 178px;
    cursor: pointer;
    transition: all .2s ease;
    overflow: hidden;
    position: relative;
}

.payment-upload-zone:hover,
.payment-upload-zone.dragover {
    border-color: var(--primary-accent);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.payment-upload-zone.locked {
    cursor: not-allowed;
    border-style: solid;
    background: #f8fafc;
}

.payment-upload-zone.locked:hover {
    border-color: var(--border-color);
    background: #f8fafc;
    box-shadow: none;
}

.payment-upload-preview {
    min-height: 178px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--text-muted);
    font-weight: 700;
}

.payment-upload-preview i {
    font-size: 2rem;
    color: var(--primary-accent);
}

.payment-upload-preview img {
    width: 100%;
    height: 178px;
    object-fit: contain;
    padding: .5rem;
    background: #fff;
}

.payment-upload-lock {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
}

.payment-upload-lock i {
    color: #fff;
    font-size: .8rem;
}

.payment-methods-notice {
    display: flex;
    align-items: center;
    gap: .55rem;
    border-radius: 14px;
    padding: .75rem .9rem;
    font-weight: 700;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
}

.payment-methods-notice.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.payment-methods-notice.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.payment-upload-error {
    min-height: 178px;
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    color: #b91c1c;
    background: #fef2f2;
    text-align: center;
    word-break: break-word;
}

.payment-upload-error i {
    color: #dc2626;
    font-size: 1.8rem;
}

.payment-upload-error span {
    max-width: 100%;
    font-size: .88rem;
    font-weight: 600;
}

.payment-verify-box {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 14px;
    padding: .75rem;
}

.withdraw-payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.withdraw-payment-option {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    padding: .85rem;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    transition: all .2s ease;
    font-weight: 800;
}

.withdraw-payment-option i {
    color: var(--primary-accent);
    font-size: 1.35rem;
}

.withdraw-payment-option small {
    max-width: 100%;
    color: var(--text-muted);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.withdraw-payment-option:hover,
.withdraw-payment-option.active {
    border-color: var(--primary-accent);
    background: var(--primary-light);
    color: var(--primary-accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .14);
}

.withdraw-payment-empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--warning);
    border-radius: 16px;
    background: rgba(245, 158, 11, .08);
    color: #92400e;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    font-weight: 700;
}

.withdraw-payment-empty i {
    font-size: 1.2rem;
}

.profile-card-soft {
    padding: 1.35rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--shadow-sm);
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.profile-avatar-upload {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.profile-main-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.45rem;
    box-shadow: 0 14px 30px rgba(79, 70, 229, .2);
}

.profile-avatar-camera {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-accent);
    color: #fff;
    border: 2px solid #fff;
    display: grid;
    place-items: center;
    font-size: .72rem;
    box-shadow: var(--shadow-sm);
}

.profile-avatar-upload:hover .profile-main-avatar {
    transform: translateY(-1px) scale(1.02);
}

.profile-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-info-row:last-of-type {
    border-bottom: 0;
}

.agreement-check-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 0.58rem;
    width: 100%;
    margin: 0;
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 16px;
    background: rgba(15, 23, 42, .24);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 26px rgba(15,23,42,.12);
    backdrop-filter: blur(8px);
}

.agreement-check-wrap .form-check-input {
    float: none;
    margin: 0.18rem 0 0;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.agreement-check-wrap .form-check-label {
    min-width: 0;
    line-height: 1.55;
    word-break: break-word;
}

.agreement-check-wrap .form-check-label,
.agreement-check-wrap a {
    color: #fff;
    text-shadow: 0 2px 12px rgba(15, 23, 42, .55);
}

.agreement-check-wrap a {
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.agreement-check-wrap .form-check-input:checked {
    background-color: var(--primary-accent);
    border-color: #fff;
}

@media (max-width: 767.98px) {
    .payment-receive-grid,
    .withdraw-payment-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .auth-modal .modal-dialog {
        width: calc(100vw - 1.5rem);
        max-width: calc(100vw - 1.5rem);
        margin: 0.75rem auto;
    }

    .auth-modal .modal-content,
    .auth-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 1.5rem);
        min-height: 0;
        border-radius: 22px;
        overflow: hidden;
    }

    .auth-art-pane {
        position: absolute;
        inset: 0;
        display: block;
        min-height: 0;
        height: 100%;
        padding: 0;
        border-radius: 22px;
    }

    .auth-form-shell,
    .auth-modal-content.is-register .auth-form-shell,
    .auth-modal-content.is-forgot .auth-form-shell {
        position: relative;
        z-index: 4;
        width: 100%;
        min-height: 0;
        max-height: calc(100dvh - 1.5rem);
        border-radius: 22px;
        overflow: hidden;
        transform: none;
    }

    .auth-form-track {
        width: 300%;
        min-height: 0;
        max-height: calc(100dvh - 1.5rem);
        align-items: stretch;
    }

    .auth-modal-content.is-forgot .auth-form-track {
        transform: translateX(-33.3333%);
    }

    .auth-modal-content.is-register .auth-form-track {
        transform: translateX(-66.6667%);
    }

    .auth-form-pane {
        width: 33.3333%;
        min-height: 0;
        max-height: calc(100dvh - 1.5rem);
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .auth-form-pane .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 1rem 1rem 0.55rem;
        background: linear-gradient(180deg, rgba(15, 23, 42, .42), rgba(15, 23, 42, 0));
    }

    .auth-form-pane .modal-body {
        padding: 0.35rem 1rem 1rem;
        overflow: visible;
    }

    .auth-form-pane .form-group {
        margin-bottom: 0.62rem;
    }

    .auth-form-pane .form-label {
        margin-bottom: 0.28rem;
        font-size: 0.82rem;
    }

    .auth-form-pane .form-control {
        min-height: 42px;
        border-radius: 13px;
        font-size: 0.88rem;
        padding: 0.56rem 0.85rem;
    }

    .auth-form-pane .input-group {
        flex-wrap: nowrap;
    }

    .auth-form-pane .input-group .form-control {
        min-width: 0;
    }

    .auth-form-pane .input-group .btn {
        flex: 0 0 auto;
        min-width: 94px;
        padding-inline: 0.65rem;
        font-size: 0.78rem;
        justify-content: center;
    }

    .agreement-check-wrap {
        display: flex;
        align-items: flex-start;
        gap: 0.55rem;
        margin: 0.5rem 0 0.75rem !important;
        padding: 0.65rem 0.72rem;
        border-radius: 13px;
        background: rgba(15, 23, 42, .24);
        backdrop-filter: blur(8px);
    }

    .agreement-check-wrap .form-check-input {
        flex: 0 0 auto;
        margin: 0.15rem 0 0;
        width: 1.05rem;
        height: 1.05rem;
    }

    .agreement-check-wrap .form-check-label {
        flex: 1 1 auto;
        min-width: 0;
        line-height: 1.55;
        white-space: normal;
        word-break: break-word;
        font-size: 0.82rem;
    }

    .auth-main-btn {
        min-height: 42px;
        border-radius: 13px;
    }

    .auth-form-pane .text-center.mt-3 {
        margin-top: 0.65rem !important;
        padding: 0.55rem 0.65rem;
        border-radius: 13px;
        background: rgba(15, 23, 42, .22);
        backdrop-filter: blur(8px);
        line-height: 1.45;
    }

    .auth-art-caption {
        display: none !important;
    }
}

@media (max-width: 380px), (max-height: 700px) {
    .auth-modal .modal-dialog {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        margin: 0.5rem auto;
    }

    .auth-modal .modal-content,
    .auth-modal-content,
    .auth-form-shell,
    .auth-modal-content.is-register .auth-form-shell,
    .auth-modal-content.is-forgot .auth-form-shell,
    .auth-form-track,
    .auth-form-pane {
        max-height: calc(100dvh - 1rem);
    }

    .auth-form-pane .modal-header {
        padding: 0.78rem 0.9rem 0.35rem;
    }

    .auth-form-pane .modal-body {
        padding: 0.25rem 0.9rem 0.85rem;
    }

    .auth-form-pane .form-group {
        margin-bottom: 0.48rem;
    }

    .auth-form-pane .form-control,
    .auth-main-btn {
        min-height: 39px;
    }

    .agreement-check-wrap {
        padding: 0.55rem 0.62rem;
        margin-bottom: 0.6rem !important;
    }
}

.hidden { display: none !important; }
.visible { display: block !important; }

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.membership-current-card,
.privileges-grid,
.privilege-item {
    display: none !important;
}

.membership-card {
    min-height: 100%;
}

.membership-card .card-header {
    min-height: 118px;
}

.membership-card .card-header small {
    display: block;
    margin-top: 0.35rem;
    opacity: 0.8;
    font-weight: 500;
}

.membership-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.membership-status-text {
    font-size: 0.86rem;
    font-weight: 600;
}

@media (min-width: 992px) {
    .membership-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .membership-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Adaptive layout enhancements: desktop, tablet and mobile */
html,
body {
    overflow-x: hidden;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-lg);
}

@media (min-width: 1200px) {
    .container {
        max-width: 1240px;
    }

    #productGrid > [class*="col-"] {
        width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 100%;
        padding-inline: 1.25rem;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .nav-center::-webkit-scrollbar,
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    #productGrid > [class*="col-"] {
        width: 50%;
    }

    .product-card .product-image {
        height: 150px;
    }

    .sidebar-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        position: sticky;
        top: 72px;
        z-index: 20;
    }

    .sidebar-nav-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-inline: 0.75rem;
    }

    .main-content {
        padding: 1rem 0 1.5rem;
    }

    .navbar {
        padding: 0.55rem 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        gap: 0.55rem;
    }

    .navbar-brand {
        font-size: 1.18rem;
        max-width: calc(100vw - 150px);
        overflow: hidden;
    }

    .navbar-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        gap: 0.35rem;
        padding: 0.15rem 0 0.05rem;
        scrollbar-width: none;
    }

    .nav-center::-webkit-scrollbar,
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-center .nav-link {
        min-width: auto;
        flex: 0 0 auto;
        padding: 0.48rem 0.72rem !important;
        border-radius: 999px;
        background: #fff;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
    }

    .nav-link i {
        margin-right: 0.28rem;
    }

    .nav-actions {
        margin-left: auto;
        gap: 0.35rem;
    }

    #navUserArea {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    #navBalance {
        display: none;
    }

    .nav-icon-btn,
    .nav-actions .btn-sm {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    #homePage > .d-flex:first-child {
        align-items: stretch !important;
    }

    #homePage > .d-flex:first-child > div:first-child,
    .search-bar,
    .filter-group,
    .filter-group select {
        width: 100%;
    }

    #homePage h3 {
        font-size: 1.2rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 0.6rem;
    }

    .search-input {
        min-width: 100%;
    }

    #productGrid {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    #productGrid > [class*="col-"] {
        width: 50%;
        flex: 0 0 auto;
    }

    .product-card {
        border-radius: 14px;
    }

    .product-card:hover {
        transform: none;
    }

    .product-card .product-image {
        height: 108px;
        font-size: 2.6rem;
    }

    .product-card .product-body {
        padding: 0.72rem;
    }

    .product-card .category-tag {
        font-size: 0.65rem;
        margin-bottom: 0.35rem;
    }

    .product-card .product-title {
        font-size: 0.86rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-card .product-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.74rem;
    }

    .product-card .product-footer {
        align-items: flex-start;
        gap: 0.35rem;
        flex-direction: column;
    }

    .product-card .price {
        font-size: 1rem;
    }

    .dashboard-header-bar {
        padding: 0.85rem;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .dashboard-header-bar .avatar {
        width: 40px;
        height: 40px;
    }

    .sidebar,
    .sidebar-nav {
        position: static;
    }

    .sidebar-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        padding: 0.45rem 0.75rem;
        margin: 0 0 0.85rem;
        border-radius: var(--border-radius-lg);
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        scrollbar-width: none;
    }

    .sidebar-nav-item {
        flex: 0 0 auto;
        padding: 0.52rem 0.72rem;
        font-size: 0.8rem;
        border-radius: 999px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .sidebar-nav-item i {
        width: auto;
    }

    #dashContentArea h5,
    #dashContentArea h6 {
        font-size: 1rem;
    }

    .stat-card {
        padding: 0.85rem;
    }

    .stat-card i {
        font-size: 1.35rem;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }

    .table-responsive {
        margin-inline: -0.75rem;
        padding-inline: 0.75rem;
        border-radius: 0;
    }

    .table {
        min-width: 620px;
    }

    .table thead th,
    .table tbody td {
        padding: 0.62rem;
        font-size: 0.8rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 18px;
        max-height: calc(100dvh - 1rem);
        overflow: hidden;
    }

    .modal-body {
        padding: 1rem;
        overflow-y: auto;
    }

    .modal-header,
    .modal-footer {
        padding: 0.85rem 1rem;
    }

    .modal-footer {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 0;
        justify-content: center;
        padding-inline: 0.7rem;
    }

    .auth-modal .modal-dialog {
        margin: 0.5rem;
    }

    .auth-form-shell,
    .auth-modal-content.is-register .auth-form-shell,
    .auth-modal-content.is-forgot .auth-form-shell {
        width: 100%;
        margin-left: 0;
        transform: none;
        border-radius: 18px;
    }

    .auth-form-pane {
        min-height: auto;
        border-radius: 18px;
    }

    .auth-form-pane .modal-body,
    .auth-form-pane .modal-header {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .product-detail-image {
        min-height: 170px;
        max-height: 220px;
        font-size: 4rem;
    }

    .product-image-uploader,
    .product-image-preview-placeholder {
        min-height: 128px;
    }

    .toast-container {
        top: auto;
        right: 0.75rem;
        left: 0.75rem;
        bottom: 0.75rem;
        align-items: stretch;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    .payment-receive-grid,
    .withdraw-payment-options,
    .purchase-payment-options,
    .recharge-payment-options,
    .membership-cards {
        grid-template-columns: 1fr;
    }

    .membership-card .card-header,
    .membership-card .card-body,
    .membership-card .card-footer {
        padding-inline: 1rem;
    }

    .profile-info-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .seller-stock-summary {
        grid-template-columns: 1fr;
    }

    .seller-product-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .stock-manage-actions,
    .stock-manage-actions .btn {
        width: 100%;
    }

    .seller-stock-row,
    .seller-stock-main {
        align-items: stretch;
        flex-direction: column;
    }

    .seller-stock-row .btn {
        width: 100%;
    }

    .seller-stock-content {
        white-space: normal;
        word-break: break-all;
    }
}

@media (max-width: 420px) {
    #productGrid > [class*="col-"] {
        width: 100%;
    }

    .product-card .product-image {
        height: 140px;
    }

    .navbar-brand {
        max-width: calc(100vw - 126px);
        font-size: 1.08rem;
    }

    .btn {
        font-size: 0.84rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

.subdomain-unavailable-wrap {
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
}

.subdomain-unavailable-card {
    width: min(100%, 520px);
    text-align: center;
    padding: 2.25rem 2rem 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.subdomain-unavailable-card.tone-info {
    border-color: rgba(99, 102, 241, 0.25);
}

.subdomain-unavailable-card.tone-warning {
    border-color: rgba(245, 158, 11, 0.28);
}

.subdomain-unavailable-card.tone-danger {
    border-color: rgba(239, 68, 68, 0.24);
}

.subdomain-unavailable-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.subdomain-unavailable-card.tone-warning .subdomain-unavailable-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.subdomain-unavailable-card.tone-danger .subdomain-unavailable-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.subdomain-unavailable-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    margin-bottom: 0.85rem;
}

.subdomain-unavailable-card.tone-warning .subdomain-unavailable-badge {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
}

.subdomain-unavailable-card.tone-danger .subdomain-unavailable-badge {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.subdomain-unavailable-domain {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
    margin-bottom: 0.85rem;
}

.subdomain-unavailable-message {
    color: #334155;
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.subdomain-unavailable-hint {
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 0;
}

body.subdomain-unavailable-page {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

body.subdomain-unavailable-page .page-wrapper > .navbar,
body.subdomain-unavailable-page footer,
body.subdomain-unavailable-page #homePage > :not(#emptyProductState),
body.subdomain-unavailable-page #sellerStoreBanner,
body.subdomain-unavailable-page #productGrid {
    display: none !important;
}

body.subdomain-unavailable-page .main-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

body.subdomain-unavailable-page .main-content > .container {
    width: 100%;
    max-width: 720px;
}

body.subdomain-unavailable-page #emptyProductState {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.subdomain-unavailable-page #emptyProductState.hidden {
    display: none !important;
}

body.subdomain-unavailable-page .subdomain-unavailable-wrap {
    padding: 0;
}

/* 二级商铺公告样式 */
.shop-announcement-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    color: #92400e;
}

.shop-announcement-icon {
    font-size: 1.5rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.shop-announcement-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #78350f;
}

.shop-announcement-content {
    color: #92400e;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 二级商铺自定义样式注入容器 */
#shop-custom-css-container {
    display: none;
}
