:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-light: #d1fae5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 240px;
    --sidebar-collapsed: 68px;
    --header-height: 56px;
}
.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-light: #064e3b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
svg { stroke-linecap: round; stroke-linejoin: round; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
}
.sidebar.open { transform: translateX(0); }
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-logo {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar.has-memorial .sidebar-logo {
    border-bottom: none;
}
.sidebar-logo img { width: 100%; max-width: 140px; height: auto; object-fit: contain; flex-shrink: 0; transition: max-width 0.25s ease; }
.sidebar.collapsed .sidebar-logo img { max-width: 32px; }
@media (min-width: 1024px) {
    .sidebar.collapsed .sidebar-logo img { display: none; }
}
.sidebar-nav { padding: 8px; flex: 1; overflow-y: auto; overflow-x: hidden; }
.nav-section { margin-bottom: 4px; }
.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .nav-section-title { opacity: 0; height: 0; padding: 0; margin: 0; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}
.nav-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge-new {
    margin-left: auto;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    border-radius: 9999px;
    background: var(--accent);
    color: #fff;
    letter-spacing: 0.3px;
}
.sidebar.collapsed .nav-badge-new { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
.sidebar-collapse-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}
.sidebar-collapse-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-collapse-btn svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.main-content {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.dark .header { background: rgba(15, 23, 42, 0.9); }
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; }
.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}
.hamburger-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.page-title { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.header-clock {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 10px;
    border-radius: var(--radius);
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.header-right { display: flex; align-items: center; gap: 8px; }
.theme-toggle-group {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 2px;
    gap: 2px;
}
.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s ease;
}
.theme-btn:hover { color: var(--text-primary); }
.theme-btn.active { background: var(--bg-secondary); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.user-menu-wrapper { position: relative; }
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.user-menu-btn:hover { background: var(--bg-tertiary); }
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.user-avatar.has-photo {
    background: transparent;
    border: 1.5px solid var(--border-color);
}
.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.user-menu-btn .user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-menu-btn svg { width: 14px; height: 14px; color: var(--text-muted); }
.notif-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
    overflow: hidden;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.dropdown-header .name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dropdown-header .email { font-size: 12px; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s ease;
}
.dropdown-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.dropdown-item svg { width: 16px; height: 16px; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #fef2f2; }
.dark .dropdown-item.danger:hover { background: #450a0a; }
.content { flex: 1; padding: 20px; }
.footer {
    border-top: 1px solid var(--border-color);
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); }
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    flex: 1 1 200px;
    min-width: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.stat-card .stat-icon.green { background: #d1fae5; color: #059669; }
.stat-card .stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card .stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-card .stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.dark .stat-card .stat-icon.green { background: #064e3b; }
.dark .stat-card .stat-icon.blue { background: #1e3a5f; }
.dark .stat-card .stat-icon.yellow { background: #451a03; }
.dark .stat-card .stat-icon.purple { background: #2e1065; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--text-primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.5;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--border-color); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border-color); }
.btn-outline:hover { background: var(--bg-tertiary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-hover); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 5px; }
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
    outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12); }
.form-input-group { position: relative; display: flex; align-items: center; }
.form-input-group .form-input { padding-right: 40px; }
.form-input-group .toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-hint.warning { color: var(--warning); }
.table-wrapper { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left;
    padding: 9px 14px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-tertiary); }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-muted { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.dark .badge-success { background: #064e3b; color: #6ee7b7; }
.dark .badge-warning { background: #451a03; color: #fcd34d; }
.dark .badge-danger { background: #450a0a; color: #fca5a5; }
.dark .badge-info { background: #1e3a5f; color: #93c5fd; }
.dark .badge-purple { background: #2e1065; color: #c4b5fd; }
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal.user-detail-modal {
    position: relative;
    width: min(760px, 92vw);
    max-width: min(760px, 92vw);
    min-width: min(560px, 92vw);
    max-height: 92vh;
    overflow: visible;
    resize: both;
}
.modal.user-detail-modal.modal-expanded {
    width: min(1200px, 96vw);
    max-width: min(1200px, 96vw);
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 15px; font-weight: 600; }
.modal-close {
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}
.modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 8px; }
.user-detail-modal-body {
    max-height: calc(92vh - 134px);
    overflow: auto;
}
.user-detail-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-side-inline-toggle,
.modal-side-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.modal-side-inline-toggle:hover,
.modal-side-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.modal-side-toggle {
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: var(--shadow-lg);
    z-index: 2;
}
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast {
    min-width: 280px;
    max-width: 420px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: bottom center;
    pointer-events: auto;
}
.toast-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast-icon svg { display: block; }
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-success { border-left: 3px solid var(--accent); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }
.toast-close { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(16px) scale(0.96); } }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 35; display: none; }
.sidebar-overlay.open { display: block; }
.info-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.info-item { flex: 1 1 160px; min-width: 0; padding: 12px; background: var(--bg-tertiary); border-radius: var(--radius); }
.info-item .label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.info-item .value { font-size: 14px; font-weight: 600; color: var(--text-primary); word-break: break-all; }
.m3u-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    word-break: break-all;
    color: var(--text-secondary);
    line-height: 1.8;
}
.empty-state { text-align: center; padding: 40px 24px; color: var(--text-muted); }
.empty-state svg { width: 44px; height: 44px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; margin-bottom: 14px; }
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-primary); }
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 32px;
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { height: 48px; width: auto; object-fit: contain; }
.auth-logo p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { font-weight: 500; }
.search-input-wrapper { position: relative; max-width: 280px; }
.search-input-wrapper svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-muted); }
.search-input-wrapper .form-input { padding-left: 32px; }
.skeleton { background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: var(--radius); }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.packages-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.package-card {
    flex: 1 1 260px;
    min-width: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.package-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.package-card.popular { border-color: var(--accent); }
.package-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
}
.package-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.package-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--tag-color, #f59e0b);
    animation: tagPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}
.package-tag::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: tagShimmer 3s ease-in-out infinite;
}
@keyframes tagPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50% { transform: scale(1.03); box-shadow: 0 0 8px 2px rgba(245,158,11,0.2); }
}
@keyframes tagShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}
.package-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.package-card .price { font-size: 28px; font-weight: 800; color: var(--accent); margin: 10px 0; }
.package-card .price small { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.package-card .monthly { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.package-card .features { list-style: none; flex: 1; margin-bottom: 16px; }
.package-card .features li { font-size: 13px; color: var(--text-secondary); padding: 4px 0; display: flex; align-items: center; gap: 6px; }
.package-card .features li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.content-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.content-tag { padding: 4px 10px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 9999px; font-size: 11px; color: var(--text-secondary); }
.content-tag.adult { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.dark .content-tag.adult { background: #450a0a; color: #fca5a5; border-color: #7f1d1d; }
.profile-card { max-width: none; }
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}
.toggle-switch input { display: none; }
.toggle-track {
    width: 40px;
    height: 22px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    position: relative;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.toggle-track::after {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-muted);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.25s ease;
}
.toggle-switch input:checked + .toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(18px);
    background: #ffffff;
}
.toggle-label { line-height: 1.4; }
.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.profile-grid > .card {
    flex: 1 1 100%;
    min-width: 0;
}
.profile-grid > .profile-card-full {
    flex: 1 1 100%;
}
.purchase-modal-content { text-align: center; padding: 8px 0; }
.purchase-modal-content h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.purchase-modal-content p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.purchase-options { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.purchase-success { padding: 20px; text-align: center; }
.purchase-success svg { margin-bottom: 12px; color: var(--accent); }
.purchase-success h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.purchase-success p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.progress-bar { height: 6px; background: var(--bg-tertiary); border-radius: 9999px; overflow: hidden; margin-top: 6px; }
.progress-bar-fill { height: 100%; background: var(--accent); border-radius: 9999px; transition: width 0.5s ease; }
@media (min-width: 768px) and (max-width: 1023px) {
    .stats-grid { gap: 10px; }
    .stat-card { flex: 1 1 160px; }
    .info-grid { gap: 8px; }
    .info-item { flex: 1 1 140px; }
    .profile-grid > .card:not(.profile-card-full) { flex: 1 1 calc(50% - 8px); }
}
@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .sidebar-collapse-btn { display: flex; }
    .main-content { margin-left: var(--sidebar-width); }
    .sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }
    .hamburger-btn { display: none; }
    .profile-grid > .card:not(.profile-card-full) { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 1023px) {
    .sidebar-collapse-btn { display: flex; }
}
@media (max-width: 640px) {
    .stats-grid { gap: 8px; }
    .stat-card { flex: 1 1 calc(50% - 4px); }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card { padding: 14px; }
    .auth-card { padding: 24px; }
    .content { padding: 10px; }
    .table { font-size: 11px; }
    .table th, .table td { padding: 7px 8px; }
    .info-grid { gap: 8px; }
    .info-item { flex: 1 1 120px; }
    .header { padding: 0 12px; }
    .toast { min-width: auto; max-width: calc(100vw - 24px); }
    .packages-grid { gap: 10px; }
    .package-card { flex: 1 1 100%; }
    .user-menu-btn .user-name { display: none; }
    .card-header { padding: 12px 14px; }
    .card-body { padding: 14px; }
    .card-header h3 { font-size: 13px; }
    .su-apps-grid { grid-template-columns: 1fr; }
    .user-detail-grid { gap: 8px; }
    .user-detail-item { flex: 1 1 140px; }
    .profile-card { max-width: 100%; }
}
.sidebar-toggle-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 2;
    padding: 0;
}
@media (min-width: 1024px) {
    .sidebar-toggle-icon { display: flex; }
    .sidebar.collapsed .sidebar-toggle-icon { display: none; }
}
.sidebar-logo { position: relative; }
.memorial-container {
    padding: 0 12px 8px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}
.memorial-text {
    font-style: italic;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
.memorial-text.memorial-scroll {
    text-align: left;
}
.memorial-text.memorial-scroll span {
    display: inline-block;
    padding-left: 100%;
    animation: memorialScroll 10s linear infinite;
}
@keyframes memorialScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.sidebar.collapsed .memorial-container { display: none !important; }
#screenRecordToggle { display: flex; align-items: center; gap: 8px; }
#screenRecordToggle svg { flex-shrink: 0; }
.ticket-msg {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}
.ticket-msg-user {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--border-color);
}
.ticket-msg-admin {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
}
.ticket-msg-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid var(--border-color);
}
.ticket-msg-body {
    flex: 1;
    min-width: 0;
}
.ticket-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}
.ticket-msg-name {
    font-size: 13px;
    font-weight: 600;
}
.ticket-msg-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: help;
}
.ticket-msg-content {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
    word-break: break-word;
}
.ticket-sig-fancy {
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}
.ticket-sig-fancy .sig-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 8px auto;
    width: 100%;
    max-width: 200px;
}
.ticket-sig-fancy .sig-brand {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
}
.ticket-sig-fancy .sig-quote {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
    margin: 6px 0;
    line-height: 1.5;
    opacity: 0.8;
}
.ticket-sig-fancy .sig-footer {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    opacity: 0.7;
}
.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 20px;
}
.profile-photo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: pointer;
}
.profile-photo-wrapper::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent), #6366f1, var(--accent));
    z-index: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.profile-photo-wrapper:hover::before { opacity: 1; }
.profile-photo-preview {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.profile-photo-wrapper:hover .profile-photo-preview {
    transform: scale(1.03);
}
.profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-photo-preview .photo-initials {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-muted);
    user-select: none;
}
.profile-photo-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
    border: 3px solid transparent;
}
.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
}
.profile-photo-overlay svg {
    color: #fff;
}
.profile-photo-overlay span {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
}
.profile-photo-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.profile-photo-actions .photo-btns {
    display: flex;
    gap: 8px;
}
.profile-photo-actions .photo-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}
.profile-info-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    margin-top: 2px;
}
.profile-info-header .profile-username {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.profile-info-header .profile-email {
    font-size: 13px;
    color: var(--text-muted);
}
.revenue-card {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    border: none;
    color: #fff;
}
.revenue-card .stat-icon {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}
.revenue-card .stat-value { color: #fff; }
.revenue-card .stat-label { color: rgba(255,255,255,0.8); }
.user-detail-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.user-detail-item {
    flex: 1 1 160px;
    min-width: 0;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}
.user-detail-item:hover {
    border-color: var(--accent);
}
.user-detail-item .detail-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.user-detail-item .detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}
.action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.user-detail-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.user-detail-hero-avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-muted);
    overflow: hidden;
}
.user-detail-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-detail-hero-info {
    flex: 1;
    min-width: 0;
}
.user-detail-hero-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.user-detail-hero-email {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.user-detail-hero-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.user-detail-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 18px 0 10px;
}
.user-detail-summary-card {
    padding: 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
    border: 1px solid var(--border-color);
}
.user-detail-summary-card .summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.user-detail-summary-card .summary-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}
.user-detail-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.user-detail-section-title svg {
    color: var(--accent);
    flex-shrink: 0;
}
.user-detail-section {
    border: 1px solid rgba(255,255,255,0.07);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.14);
}
.user-detail-section-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    text-align: left;
}
.user-detail-section-toggle-main,
.user-detail-section-toggle-side {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.user-detail-section-toggle-main {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}
.user-detail-section-toggle-side {
    color: var(--text-muted);
    flex-shrink: 0;
}
.user-detail-section-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.user-detail-section-caret {
    transition: transform var(--transition-normal);
}
.user-detail-section-content {
    padding: 0 18px 18px;
}
.user-detail-section.is-collapsed .user-detail-section-content {
    display: none;
}
.user-detail-section.is-collapsed .user-detail-section-caret {
    transform: rotate(-90deg);
}
.user-detail-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.user-detail-savebar {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}
.user-detail-actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.user-detail-referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.user-detail-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-height: 280px;
    overflow: auto;
}
.user-detail-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}
@media (max-width: 480px) {
    .page-title { display: none; }
    .user-detail-hero { flex-direction: column; text-align: center; }
    .user-detail-hero-badges { justify-content: center; }
    .user-detail-grid { gap: 6px; }
    .user-detail-item { flex: 1 1 100%; }
    .user-detail-summary-row { grid-template-columns: 1fr; }
    .user-detail-section-toggle { padding: 14px; }
    .user-detail-section-content { padding: 0 14px 14px; }
    .user-detail-management-grid { grid-template-columns: 1fr; }
    .user-detail-table-wrap { max-height: 220px; }
    .modal.user-detail-modal {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        resize: none;
    }
    .modal-side-toggle { display: none; }
    .action-bar { justify-content: center; }
    .stats-grid { gap: 6px; }
    .stat-card { flex: 1 1 calc(50% - 3px); }
    .stat-card .stat-value { font-size: 18px; }
    .info-grid { gap: 6px; }
    .info-item { flex: 1 1 100%; }
    .content { padding: 8px; }
}
@media (max-width: 640px) {
    .ticket-msg { padding: 12px; gap: 10px; }
    .ticket-msg-avatar { width: 30px; height: 30px; min-width: 30px; font-size: 12px; }
}
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.25s ease;
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.modal-overlay.open ~ .scroll-top-btn,
body.modal-open-active .scroll-top-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transform: translateY(12px) !important;
}
.scroll-top-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.su-hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.su-hero-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.08;
    pointer-events: none;
}
.su-hero-content {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}
.su-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}
.su-hero-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.su-hero-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    max-width: 520px;
}

.su-quick-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.su-qs-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s, transform 0.2s;
}
.su-qs-card:hover {
    transform: translateY(-3px);
}
.su-qs-1:hover { border-color: #10b981; }
.su-qs-2:hover { border-color: #3b82f6; }
.su-qs-3:hover { border-color: #f59e0b; }
.su-qs-4:hover { border-color: #8b5cf6; }
.su-qs-num {
    position: absolute;
    top: 10px;
    left: 12px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}
.su-qs-1 .su-qs-num { background: rgba(16,185,129,0.15); color: #10b981; }
.su-qs-2 .su-qs-num { background: rgba(59,130,246,0.15); color: #3b82f6; }
.su-qs-3 .su-qs-num { background: rgba(245,158,11,0.15); color: #f59e0b; }
.su-qs-4 .su-qs-num { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.su-qs-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.su-qs-1 .su-qs-icon-wrap { background: rgba(16,185,129,0.1); color: #10b981; box-shadow: 0 0 20px rgba(16,185,129,0.12); }
.su-qs-2 .su-qs-icon-wrap { background: rgba(59,130,246,0.1); color: #3b82f6; box-shadow: 0 0 20px rgba(59,130,246,0.12); }
.su-qs-3 .su-qs-icon-wrap { background: rgba(245,158,11,0.1); color: #f59e0b; box-shadow: 0 0 20px rgba(245,158,11,0.12); }
.su-qs-4 .su-qs-icon-wrap { background: rgba(139,92,246,0.1); color: #8b5cf6; box-shadow: 0 0 20px rgba(139,92,246,0.12); }
.su-qs-card strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.su-qs-card span {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.4;
}
.su-qs-arrow {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    z-index: 2;
}
.su-qs-1 .su-qs-arrow { color: #10b981; }
.su-qs-2 .su-qs-arrow { color: #3b82f6; }
.su-qs-3 .su-qs-arrow { color: #f59e0b; }

.su-tabs-scroll {
    overflow-x: auto;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-tertiary);
    padding-bottom: 8px;
}
.su-tabs-scroll::-webkit-scrollbar { height: 6px; }
.su-tabs-scroll::-webkit-scrollbar-track { background: var(--bg-tertiary); border-radius: 10px; }
.su-tabs-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.su-tabs-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }
.su-tabs {
    display: flex;
    gap: 6px;
    min-width: max-content;
}
.su-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.su-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}
.su-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.su-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.su-platform-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.su-platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.su-platform-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px;
}
.su-platform-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.su-section {
    margin-bottom: 20px;
}
.su-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.su-section-head svg {
    color: var(--accent);
    flex-shrink: 0;
}
.su-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.su-apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}
.su-app-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.su-app-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
}
.su-app-highlight {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
}
.su-app-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.su-app-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.su-app-highlight .su-app-rank {
    background: var(--accent);
    color: #fff;
}
.su-app-info { flex: 1; min-width: 0; }
.su-app-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.su-app-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
}
.su-app-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.su-app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.su-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: color-mix(in srgb, var(--su-tag-c) 12%, transparent);
    color: var(--su-tag-c);
    white-space: nowrap;
}
.su-app-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.su-store-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.su-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    min-width: max-content;
}
.su-dl-btn:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.su-dl-btn svg { flex-shrink: 0; }

.su-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.su-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    padding-bottom: 18px;
}
.su-step:last-child { padding-bottom: 0; }
.su-step:last-child .su-step-line { display: none; }
.su-step-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.su-step-line {
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}
.su-step-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 5px;
}
.su-step-text strong {
    color: var(--text-primary);
}

.su-faq {
    margin-top: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.su-faq-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-tertiary);
    padding-bottom: 8px;
}
.su-faq-scroll::-webkit-scrollbar { height: 6px; }
.su-faq-scroll::-webkit-scrollbar-track { background: var(--bg-tertiary); border-radius: 10px; }
.su-faq-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.su-faq-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }
.su-faq-grid {
    display: flex;
    gap: 12px;
    min-width: max-content;
}
.su-faq-item {
    width: 260px;
    min-width: 260px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.su-faq-item:hover {
    border-color: var(--accent);
}
.su-faq-item strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.su-faq-item p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.su-faq-item a {
    color: var(--accent);
    text-decoration: none;
}
.su-faq-item a:hover { text-decoration: underline; }
.payment-methods-grid {
    display: grid;
    gap: 14px;
}
.payment-method-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s;
}
.payment-method-card:hover {
    border-color: var(--accent);
}
.payment-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-method-info strong {
    font-size: 14px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}
.payment-method-info p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}
.payment-result-content {
    text-align: center;
    padding: 20px 10px;
}
.payment-result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.payment-result-icon.success {
    background: rgba(16,185,129,0.12);
    color: var(--accent);
}
.payment-result-icon.failed {
    background: rgba(239,68,68,0.12);
    color: var(--danger);
}
.payment-result-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.payment-result-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}
@media (max-width: 768px) {
    .su-quick-steps {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 16px 16px 16px 36px;
        margin-bottom: 20px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
    }
    .su-qs-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 16px 0 16px 28px;
        border: none;
        background: transparent;
        border-radius: 0;
        border-left: 2.5px solid var(--border-color);
        gap: 14px;
        transition: none;
    }
    .su-qs-card:last-child { padding-bottom: 4px; }
    .su-qs-card:first-child { padding-top: 4px; }
    .su-qs-card:hover { transform: none; }
    .su-qs-1 { border-left-color: #10b981; }
    .su-qs-1:hover { border-left-color: #10b981; }
    .su-qs-2 { border-left-color: #3b82f6; }
    .su-qs-2:hover { border-left-color: #3b82f6; }
    .su-qs-3 { border-left-color: #f59e0b; }
    .su-qs-3:hover { border-left-color: #f59e0b; }
    .su-qs-4 { border-left-color: #8b5cf6; }
    .su-qs-4:hover { border-left-color: #8b5cf6; }
    .su-qs-num {
        position: absolute;
        top: 50%;
        left: -13px;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 11px;
        font-weight: 800;
        border: 2.5px solid var(--bg-secondary);
    }
    .su-qs-1 .su-qs-num { background: #10b981; color: #fff; box-shadow: 0 0 8px rgba(16,185,129,0.4); }
    .su-qs-2 .su-qs-num { background: #3b82f6; color: #fff; box-shadow: 0 0 8px rgba(59,130,246,0.4); }
    .su-qs-3 .su-qs-num { background: #f59e0b; color: #fff; box-shadow: 0 0 8px rgba(245,158,11,0.4); }
    .su-qs-4 .su-qs-num { background: #8b5cf6; color: #fff; box-shadow: 0 0 8px rgba(139,92,246,0.4); }
    .su-qs-icon-wrap {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 12px;
        margin-bottom: 0;
    }
    .su-qs-icon-wrap svg { width: 20px; height: 20px; }
    .su-qs-arrow { display: none; }
    .su-qs-card strong { font-size: 13.5px; margin-bottom: 0; }
    .su-qs-card span { font-size: 11.5px; color: var(--text-muted); }
}
@media (max-width: 600px) {
    .su-hero-content { flex-direction: column; text-align: center; }
    .su-hero-desc { max-width: 100%; }
    .su-platform-head { flex-direction: column; text-align: center; }
    .su-apps-grid { grid-template-columns: 1fr; }
    .su-app-bottom { flex-direction: column; align-items: flex-start; }
    .su-faq-item { width: 220px; min-width: 220px; }
    .su-tabs { gap: 4px; }
    .su-tab { padding: 8px 12px; font-size: 12px; }
    .su-tab svg { width: 15px; height: 15px; }
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}
.pagination-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}
.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pagination-per-page select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 3px 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}
.pagination-per-page select:focus { border-color: var(--accent); }
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 3px;
}
.pg-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.pg-btn:hover:not(:disabled):not(.pg-active) {
    background: var(--bg-tertiary);
    border-color: var(--accent);
    color: var(--accent);
}
.pg-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.pg-btn.pg-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.pg-dots {
    min-width: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}
@media (max-width: 640px) {
    .pagination-container { flex-direction: column; align-items: stretch; gap: 8px; }
    .pagination-info { justify-content: space-between; }
    .pagination-buttons { justify-content: center; flex-wrap: wrap; }
    .pg-btn { min-width: 26px; height: 26px; font-size: 11px; }
}

.onboarding-highlight {
    position: relative;
    z-index: 50001;
    border-radius: var(--radius);
    box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(16,185,129,0.35);
    animation: onboardingPulse 1.5s ease-in-out infinite;
}
@keyframes onboardingPulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent), 0 0 20px rgba(16,185,129,0.35); }
    50% { box-shadow: 0 0 0 6px var(--accent), 0 0 30px rgba(16,185,129,0.5); }
}

.ctx-menu {
    position: fixed;
    z-index: 99999;
    min-width: 140px;
    max-width: 170px;
    max-height: min(280px, 60vh);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.16), 0 1px 4px rgba(0,0,0,0.06);
    padding: 3px;
    opacity: 0;
    transform: scale(0.92) translateY(-3px);
    transform-origin: top left;
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.ctx-menu::-webkit-scrollbar { width: 4px; }
.ctx-menu::-webkit-scrollbar-track { background: transparent; }
.ctx-menu::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.dark .ctx-menu {
    box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.15);
}
.ctx-menu.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
.ctx-menu-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 4px 7px 2px;
    user-select: none;
}
.ctx-menu-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ctx-menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.ctx-menu-item.active {
    background: var(--accent-light);
    color: var(--accent);
}
.ctx-menu-item.danger {
    color: var(--danger);
}
.ctx-menu-item.danger:hover {
    background: #fef2f2;
}
.dark .ctx-menu-item.danger:hover {
    background: #450a0a;
}
.ctx-menu-item svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.ctx-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 2px 4px;
}
@media (max-width: 640px) {
    .ctx-menu {
        min-width: 130px;
        max-width: 150px;
        max-height: min(240px, 55vh);
    }
    .ctx-menu-item { font-size: 10px; padding: 4px 6px; gap: 6px; }
    .ctx-menu-item svg { width: 11px; height: 11px; }
    .ctx-menu-label { font-size: 7px; }
}

.formatted-content-preview .content-item {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent);
    transition: transform 0.15s, box-shadow 0.15s;
}
.formatted-content-preview .content-item:last-child { margin-bottom: 0; }
.formatted-content-preview .content-item:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
}
.formatted-content-preview .content-item-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.formatted-content-preview .content-item-emoji {
    font-size: 20px;
    line-height: 1.3;
    flex-shrink: 0;
}
.formatted-content-preview .content-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}
.formatted-content-preview .content-item-desc {
    margin: 6px 0 0 30px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.dashboard-banners {
    max-width: 680px;
    margin: 0 auto 20px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.dark .dashboard-banners {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.dashboard-banners.single {
    text-align: center;
}
.dashboard-banners.single a,
.dashboard-banners.single div {
    display: block;
}
.dashboard-banner-img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}
@media (max-width: 768px) {
    .dashboard-banners {
        max-width: 100%;
    }
    .dashboard-banner-img {
        max-height: 100px;
    }
}
@media (max-width: 480px) {
    .dashboard-banner-img {
        max-height: 80px;
    }
}
.banner-slides {
    position: relative;
    width: 100%;
    min-height: 120px;
}
.banner-slide {
    display: none;
    width: 100%;
    animation: bannerFadeIn 0.5s ease;
}
.banner-slide.active {
    display: block;
}
@keyframes bannerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
}
.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.banner-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}
.banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.banner-nav:hover {
    background: rgba(0,0,0,0.65);
}
.banner-prev {
    left: 10px;
}
.banner-next {
    right: 10px;
}
@media (max-width: 480px) {
    .banner-nav {
        width: 26px;
        height: 26px;
    }
    .banner-nav svg {
        width: 12px;
        height: 12px;
    }
}

#landingBannerArea {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}
.landing-banners {
    margin: 12px 0 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.dark .landing-banners {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.landing-banners.single {
    text-align: center;
}
.landing-banners.single a,
.landing-banners.single div {
    display: block;
}
.landing-banner-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}
@media (max-width: 768px) {
    .landing-banner-img {
        max-height: 180px;
    }
    #landingBannerArea {
        padding: 0 16px;
    }
}
@media (max-width: 480px) {
    .landing-banner-img {
        max-height: 120px;
    }
    .landing-banners {
        border-radius: 10px;
    }
    .landing-banner-img {
        border-radius: 10px;
    }
}

.txn-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.txn-summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.txn-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.txn-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.txn-summary-info { min-width: 0; }
.txn-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.txn-summary-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.txn-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.txn-filter-btn {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.txn-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.txn-filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.txn-filter-count {
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.txn-filter-btn:not(.active) .txn-filter-count {
    background: var(--border-color);
    color: var(--text-muted);
}

.txn-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px !important;
}
.txn-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.txn-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}
.txn-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.txn-status-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.txn-status-success { background: rgba(16,185,129,0.12); color: var(--accent); }
.txn-status-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.txn-status-danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.txn-status-info { background: rgba(59,130,246,0.12); color: var(--info); }
.txn-status-muted { background: var(--bg-tertiary); color: var(--text-muted); }

.txn-card-info { min-width: 0; }
.txn-card-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.txn-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.txn-meta-sep { opacity: 0.4; }

.txn-card-right {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.txn-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.txn-badge-success { background: rgba(16,185,129,0.12); color: #059669; }
.dark .txn-badge-success { color: #34d399; }
.txn-badge-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.dark .txn-badge-warning { color: #fbbf24; }
.txn-badge-danger { background: rgba(239,68,68,0.12); color: #dc2626; }
.dark .txn-badge-danger { color: #f87171; }
.txn-badge-info { background: rgba(59,130,246,0.12); color: #2563eb; }
.dark .txn-badge-info { color: #60a5fa; }
.txn-badge-muted { background: var(--bg-tertiary); color: var(--text-muted); }

.txn-card-date {
    font-size: 11px;
    color: var(--text-muted);
}
.txn-crypto-amount {
    font-size: 10px;
    color: var(--warning);
    font-weight: 600;
}

.txn-detail-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.txn-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}
.txn-detail-row:last-child { border-bottom: none; }
.txn-detail-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}
.txn-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}
.txn-detail-fun {
    background: linear-gradient(135deg, var(--accent-light), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 12px;
}

.txn-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    gap: 12px;
    flex-wrap: wrap;
}
.txn-page-info {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}
.txn-page-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}
.txn-page-btn {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.txn-page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}
.txn-page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}
.txn-page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .txn-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .txn-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .txn-card-right {
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }
    .txn-pagination {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .txn-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .txn-summary-card {
        padding: 12px;
    }
    .txn-summary-value {
        font-size: 18px;
    }
    .txn-filters {
        gap: 4px;
    }
    .txn-filter-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .txn-page-btn {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

.ref-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ref-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.ref-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}
.ref-card-body {
    padding: 18px;
}

.ref-code-box {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.ref-code-tag {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 6px 16px;
    border-radius: var(--radius);
    letter-spacing: 2px;
}
.dark .ref-code-tag {
    background: rgba(16, 185, 129, 0.15);
}
.ref-link-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.ref-link-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ref-copy-btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ref-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.ref-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 10px;
    text-align: center;
}
.ref-stat-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.ref-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.ref-rule-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 14px 0;
}
.ref-claim-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ref-claim-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
}
.ref-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.ref-empty {
    padding: 28px 18px;
    text-align: center;
}
.ref-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}
.ref-empty p + p {
    margin-top: 4px;
    font-size: 12px;
}
.ref-list {
    padding: 4px 0;
}
.ref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}
.ref-row:last-child {
    border-bottom: none;
}
.ref-row:hover {
    background: var(--bg-tertiary);
}
.ref-row-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.ref-row-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ref-row-date {
    font-size: 11px;
    color: var(--text-muted);
}
.ref-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ref-badge-none {
    color: var(--text-muted);
    background: var(--bg-tertiary);
}
.ref-badge-active {
    color: var(--info);
    background: rgba(59, 130, 246, 0.1);
}
.ref-badge-qualified {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}
.ref-badge-expired {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

@media (max-width: 640px) {
    .ref-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .ref-stat-val {
        font-size: 22px;
    }
    .ref-link-row {
        flex-direction: column;
    }
    .ref-code-tag {
        font-size: 17px;
        padding: 5px 12px;
    }
    .ref-card-body {
        padding: 14px;
    }
    .ref-card-header {
        padding: 12px 14px;
        font-size: 13px;
    }
    .ref-row {
        padding: 10px 14px;
    }
    .ref-claim-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Bulk Xtream URL Changer ===== */
.bulk-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.bulk-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.bulk-card-header svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}
.bulk-card-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.bulk-card-body {
    padding: 24px;
}
.bulk-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.6;
}
.bulk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.bulk-form-row .form-group {
    margin: 0;
}
.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.bulk-toolbar .form-label {
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bulk-toolbar .form-input,
.bulk-toolbar .form-select {
    max-width: 320px;
    font-size: 13px;
}
.bulk-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}
.bulk-selected-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 9999px;
    white-space: nowrap;
}
.bulk-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.bulk-table-scroll {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: auto;
}
.bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.bulk-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
.bulk-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.bulk-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}
.bulk-table tbody tr:last-child td {
    border-bottom: none;
}
.bulk-table tbody tr:hover td {
    background: var(--bg-tertiary);
}
.bulk-table .user-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bulk-table .user-cell strong {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}
.bulk-table .user-cell span {
    font-size: 11px;
    color: var(--text-muted);
}
.bulk-table .url-cell {
    font-size: 12px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
    color: var(--text-muted);
}
.bulk-table .xtream-user-cell {
    font-size: 12px;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}
.bulk-table .slot-cell {
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}
.bulk-table .remaining-cell {
    font-size: 12px;
    white-space: nowrap;
}
.bulk-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 4px;
}
.bulk-result-text {
    font-size: 13px;
    color: var(--text-muted);
}
.bulk-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.bulk-empty svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Bulk Xtream Responsive */
@media (max-width: 768px) {
    .bulk-card-body {
        padding: 16px;
    }
    .bulk-form-row {
        grid-template-columns: 1fr;
    }
    .bulk-toolbar {
        padding: 12px;
        gap: 10px;
    }
    .bulk-toolbar .form-input,
    .bulk-toolbar .form-select {
        max-width: 100%;
        width: 100%;
    }
    .bulk-toolbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
    .bulk-table-scroll {
        max-height: 400px;
    }
    .bulk-footer {
        flex-wrap: wrap;
    }
}
@media (max-width: 480px) {
    .bulk-card-header {
        padding: 14px 16px;
    }
    .bulk-card-header h3 {
        font-size: 14px;
    }
    .bulk-card-body {
        padding: 12px;
    }
    .bulk-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .bulk-toolbar-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    .bulk-table th,
    .bulk-table td {
        padding: 8px 10px;
    }
    .bulk-table .url-cell {
        max-width: 140px;
    }
    .bulk-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}