@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    /* Aligned with Admin Dashboard palette */
    --bg-main: #09090b;
    --bg-card: #141416;
    --bg-hover: #1f1f23;
    --bg-panel-2: #1a1a1d;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --text-main: #f4f4f5;
    --text-muted: #71717a;
    --text-dim: #a1a1aa;

    --accent-purple: #e4e4e7;
    --accent-purple-hover: #fafafa;
    --accent-purple-transparent: rgba(228, 228, 231, 0.08);
    --accent-purple-glow: rgba(228, 228, 231, 0.15);

    --status-green: #22c55e;
    --status-green-bg: rgba(34, 197, 94, 0.1);

    --status-orange: #f59e0b;
    --status-orange-bg: rgba(245, 158, 11, 0.1);

    --status-red: #ef4444;
    --status-red-bg: rgba(239, 68, 68, 0.1);

    --radius: 14px;
    --radius-sm: 10px;

    --font-main: 'DM Sans', system-ui, sans-serif;
    --transition-smooth: all 0.2s ease;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fadeInPage 0.5s ease-out forwards;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Global Dark Scrollbar ── */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-main);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-purple), var(--accent-purple-hover));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple-hover);
}


::-webkit-scrollbar-corner {
    background: #0b0b0c;
}


body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-purple);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
    gap: 12px;
    flex-shrink: 0;
}

.navbar .logo img {
    height: 32px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 28px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.mobile-only-logout {
    display: none !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-right: -8px;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Badge Styles */
.badge-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.icon-btn:hover {
    background: var(--bg-hover);
}

.profile-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
}

.profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Container */
.container {
    max-width: 1120px;
    margin: 36px auto 48px;
    padding: 0 20px;
}

/* Cards & Alerts — Clean & Premium */
.alert-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: fadeInPage 0.5s ease-out;
}

.alert-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-icon {
    font-size: 18px;
    opacity: 0.9;
}

.alert-orange { border-left: 4px solid var(--status-orange); }
.alert-orange .alert-icon { color: var(--status-orange); }

.alert-green { border-left: 4px solid var(--status-green); }
.alert-green .alert-icon { color: var(--status-green); }

.alert-red { border-left: 4px solid var(--status-red); }
.alert-red .alert-icon { color: var(--status-red); }

.alert-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-desc {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* Buttons */
.btn {
    background-color: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn:hover {
    background-color: #2a2a2a;
}

.btn-primary {
    background-color: var(--accent-purple);
    color: #09090b;
    border-color: var(--accent-purple);
}

.btn-primary:hover {
    background-color: var(--accent-purple-hover);
    border-color: var(--accent-purple-hover);
    color: #09090b;
}

/* Content Card */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.card-title {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.badge-online {
    background-color: var(--status-green-bg);
    color: var(--status-green);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.card-body {
    padding: 24px;
}

/* Shoutbox */
.shoutbox-messages {
    height: 300px;
    overflow-y: auto;
    padding: 14px 16px;
    font-size: 13px;
    font-family: var(--font-main);
    background-color: var(--bg-main);
}

.shoutbox-messages .msg {
    margin-bottom: 6px;
}

.shoutbox-messages .msg-user {
    font-weight: bold;
}

.msg-user.role-admin {
    color: var(--status-red);
}

.msg-user.role-staff {
    color: #00E5FF;
}

.msg-user.role-customer {
    color: #f1c40f;
}

.msg-user.role-user {
    color: var(--text-muted);
}

.shoutbox-input-area {
    display: flex;
    padding: 12px 16px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    gap: 12px;
}

.input-field {
    flex: 1;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.input-field:focus {
    border-color: var(--accent-purple);
}

/* Grid Layouts (Store/Status) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img {
    height: 140px;
    width: 100%;
    object-fit: cover;
    background-color: #222;
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.product-price-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
}

/* Status List */
.status-list {
    display: flex;
    flex-direction: column;
}

.status-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item:hover {
    background: var(--bg-hover);
}

.status-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.status-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    object-fit: cover;
    flex-shrink: 0;
}

.status-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.status-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.updating {
    background-color: var(--status-orange-bg);
    color: var(--status-orange);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-badge.updating::before {
    background-color: var(--status-orange);
}

.status-badge.undetected {
    background-color: var(--status-green-bg);
    color: var(--status-green);
    border-color: rgba(34, 197, 94, 0.2);
}

.status-badge.undetected::before {
    background-color: var(--status-green);
}

.status-badge.offline {
    background-color: var(--status-red-bg);
    color: var(--status-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.status-badge.offline::before {
    background-color: var(--status-red);
}

@media (max-width: 640px) {
    .status-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* FAQ Accordion */
.faq-item {
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    background: transparent;
}

.faq-question {
    width: 100%;
    padding: 12px 0;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-family: inherit;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.faq-item:last-child .faq-question {
    border-bottom: none;
}

.faq-item.is-open .faq-question {
    border-bottom-color: transparent;
    color: var(--text-main);
}

.faq-question:hover {
    color: var(--text-dim);
    background: none;
}

.faq-question i {
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-answer {
    padding: 0 0 14px;
    margin-top: -2px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    display: none;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child .faq-answer {
    border-bottom: none;
}

.faq-item.is-open .faq-answer {
    display: block;
}

.faq-item.is-open .faq-question i {
    transform: rotate(180deg);
}

/* Account Dropdown Styles */
.account-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.account-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.account-trigger img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.account-trigger span {
    font-size: 14px;
    font-weight: 600;
    color: #e2e2e2;
}

.account-trigger i {
    font-size: 12px;
    color: #888;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 9999;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

.account-dropdown.active {
    display: block;
}

.account-tabs {
    display: flex;
    background: #18181b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-tabs .tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.account-tabs .tab:hover {
    color: #fff;
}

.account-tabs .tab.active {
    color: #fff;
}

.account-tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #f31c00ff;
    /* Pink/Red accent */
}

.account-content {
    padding: 20px;
}

.account-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.account-avatar-big img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.05);
    object-fit: cover;
}

.account-meta .name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.account-meta .role {
    font-size: 12px;
    font-weight: 800;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.account-meta .stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-meta .stat {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #777;
}

.account-meta .stat .value {
    color: #f31c00ff;
    font-weight: 600;
}

.account-links {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.account-links .link-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.account-links a {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: all 0.2s;
}

.account-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.account-links hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 10px 0;
}

.account-links .logout-link {
    display: block;
    padding: 5px 0;
    color: #999;
}

.account-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.account-status input {
    width: 100%;
    background: #09090b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 8px 12px;
    color: #e2e2e2;
    font-size: 13px;
    outline: none;
}

.account-status input:focus {
    border-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notifications Dropdown */
.notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    background: #e8e8e8;
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--bg-main);
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
    display: none;
    z-index: 2000;
    overflow: hidden;
    animation: notifFadeIn 0.12s ease;
}

@keyframes notifFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #e8e8e8;
    letter-spacing: -0.01em;
}

.notif-clear {
    background: transparent;
    border: none;
    color: #666;
    font-size: 11px;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s;
}

.notif-clear:hover {
    color: #bbb;
}

.notif-body {
    max-height: 280px;
    overflow-y: auto;
}

.notif-body::-webkit-scrollbar { width: 5px; }
.notif-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.notif-item {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: default;
    transition: background 0.12s;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.is-clickable {
    cursor: pointer;
}

.notif-item.is-clickable:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #888;
    margin-top: 6px;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    font-size: 12.5px;
    line-height: 1.45;
    color: #c8c8c8;
    word-break: break-word;
}

.notif-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notif-time {
    font-size: 11px;
    color: #555;
}

.notif-go {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.notif-item.is-clickable:hover .notif-go {
    color: #ccc;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 12.5px;
    color: #555;
}


/* Ticket Chat UI */
.ticket-chat-box {
    height: 350px;
    overflow-y: auto;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.chat-msg.admin .chat-bubble {
    background-color: var(--bg-panel-2);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 2px solid var(--status-red);
    box-shadow: none;
}

.chat-msg.staff .chat-bubble {
    background-color: var(--bg-panel-2);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-left: 2px solid #38bdf8;
    box-shadow: none;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-msg.admin .chat-avatar {
    border-color: rgba(239, 68, 68, 0.45);
}

.chat-msg.staff .chat-avatar {
    border-color: rgba(56, 189, 248, 0.45);
}

.chat-msg.premium .chat-avatar {
    border-color: rgba(184, 115, 51, 0.5);
}

.chat-content {
    flex: 1;
}

.chat-header {
    font-size: 11px;
    margin-bottom: 6px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-username {
    font-weight: 700;
    color: var(--text-main);
}

.chat-username.admin {
    color: var(--status-red);
}

.chat-username.staff {
    color: #38bdf8;
}

.role-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-badge.admin {
    background: var(--status-red-bg);
    color: var(--status-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.role-badge.staff {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.chat-bubble {
    background-color: var(--bg-panel-2);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    display: block;
    max-width: 100%;
    line-height: 1.5;
    color: var(--text-main);
    box-shadow: none;
}


/* Shoutbox Improvements */
.shoutbox-messages {
    background-color: #121215;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 16px;
    margin-bottom: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
}

/* Dark scrollbar for shoutbox */
.shoutbox-messages::-webkit-scrollbar {
    width: 6px;
}

.shoutbox-messages::-webkit-scrollbar-track {
    background: transparent;
}

.shoutbox-messages::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.shoutbox-messages::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* Custom File Input */
.input-field[type="file"] {
    padding: 6px 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.input-field[type="file"]::file-selector-button {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    margin-right: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.input-field[type="file"]::file-selector-button:hover {
    background-color: #2a2a2a;
    border-color: var(--text-muted);
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    margin: 0;
    flex-shrink: 0;
}

.custom-checkbox:checked {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox:hover {
    border-color: var(--accent-purple);
}

/* ── Profile Comments ── */
.comment-section {
    margin-top: 24px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.comment-list::-webkit-scrollbar {
    width: 4px;
}

.comment-list::-webkit-scrollbar-track {
    background: transparent;
}

.comment-list::-webkit-scrollbar-thumb {
    background-color: #1e1e1e;
    border-radius: 10px;
}

.comment-list::-webkit-scrollbar-thumb:hover {
    background-color: #333;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-username {
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.comment-username:hover {
    opacity: 0.75;
}

.comment-username.role-admin {
    color: #f31c00;
}

.comment-username.role-staff {
    color: #00E5FF;
}

.comment-username.role-customer {
    color: #f1c40f;
}

.comment-username.role-user {
    color: #e2e2e2;
}

.comment-time {
    font-size: 11px;
    color: #555;
}

.comment-text {
    font-size: 13px;
    color: #ccc;
    line-height: 1.55;
    word-wrap: break-word;
}

.comment-delete-btn {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: auto;
    opacity: 0;
}

.comment-item:hover .comment-delete-btn {
    opacity: 1;
}

.comment-delete-btn:hover {
    color: var(--status-red);
    background: rgba(248, 81, 73, 0.1);
}

.comment-input-area {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: #0a0a0b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    align-items: center;
    margin-bottom: 4px;
}

.comment-input-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-input-area textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e2e2;
    padding: 6px 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    resize: none;
    min-height: 18px;
    max-height: 18px;
    line-height: 18px;
    overflow: hidden;
}

.comment-input-area textarea::placeholder {
    color: #3a3a3a;
}

.comment-input-area .btn {
    background: var(--accent-purple);
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.comment-input-area .btn:hover {
    background: var(--accent-purple-hover);
    box-shadow: 0 0 12px var(--accent-purple-glow);
}

.comment-empty {
    text-align: center;
    padding: 28px 16px;
    color: #3a3a3a;
    font-size: 13px;
}

/* ── User Search Bar ── */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 7px 12px;
    width: 180px;
    transition: background 0.15s, border-color 0.15s, width 0.2s;
}

.search-bar:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    width: 220px;
    box-shadow: none;
}

.search-icon {
    font-size: 11px;
    color: #555;
    flex-shrink: 0;
    transition: color 0.15s;
}

.search-bar:focus-within .search-icon {
    color: #777;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    color: #e2e2e2;
    font-family: var(--font-main);
    font-size: 13px;
    width: 100%;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.search-input::placeholder {
    color: #555;
}

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 260px;
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow: hidden;
    animation: searchFadeIn 0.12s ease;
}

.search-dropdown:empty {
    display: none !important;
    border: none;
    box-shadow: none;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(255, 255, 255, 0.04);
}

.search-result-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-role {
    font-size: 11px;
    color: #555;
}

.search-result-arrow {
    font-size: 10px;
    color: #333;
    transition: color 0.15s;
}

.search-result-item:hover .search-result-arrow,
.search-result-item.active .search-result-arrow {
    color: #666;
}

.search-no-result {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #444;
}

/* Settings Sidebar Tabs */
.settings-sidebar {
    margin-top: 52px;
}

.btn-tab {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: left !important;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s;
    justify-content: flex-start !important;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.btn-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.btn-tab.active {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
}
/* Cleaned up fragment */

/* Admin Dashboard Tabs Scroll */
@media (max-width: 768px) {
    .admin-tabs-grid {
        grid-template-columns: repeat(9, 120px) !important;
        overflow-x: auto !important;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: grid !important;
    }

    .admin-tabs-grid::-webkit-scrollbar {
        display: none;
    }
}

/* Profile Mobile Adjustments */
.profile-avatar-float {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 4px solid var(--bg-card);
    position: absolute;
    top: -50px;
    left: 24px;
}

.profile-header-info {
    margin-left: 140px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .profile-avatar-float {
        position: static;
        margin: -50px auto 16px auto !important;
        display: block;
    }

    .profile-header-info {
        margin-left: 0 !important;
        align-items: center !important;
        text-align: center;
    }

    .admin-header-text {
        width: 100%;
    }
}

/* Admin Dashboard Specific Mobile Adjustments */
@media (max-width: 768px) {

    /* Force grids to 1 column */
    .admin-dashboard .grid-2,
    .admin-dashboard .grid-3 {
        grid-template-columns: 1fr !important;
    }

    /* Stats Chart - remove span */
    .admin-dashboard .card[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    /* Search & Stats bars */
    .admin-dashboard div[style*="display:flex; justify-content:space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .admin-dashboard form[style*="max-width:400px"] {
        max-width: none !important;
    }

    /* Tables on mobile - allow more breathing room */
    .admin-dashboard .card-body {
        padding: 0;
    }

    /* Mobile tables - allow horizontal scrolling instead of hiding crucial columns */
    .admin-dashboard .card-body {
        overflow: visible !important;
    }

    .admin-dashboard div[style*="overflow-x:auto"] {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 10px;
    }

    .admin-dashboard table {
        min-width: 900px !important;
        /* Force width to ensure scroll on all phones */
    }

    /* Show them if they are inside an expanded section */
    .admin-dashboard .expanded-content table th,
    .admin-dashboard .expanded-content table td {
        display: table-cell !important;
    }

    /* Support ticket chat mobile */
    .ticket-chat-box {
        height: 450px;
    }

    .chat-bubble {
        max-width: 85% !important;
    }
}

/* Admin Header Mobile */
.admin-title {
    font-size: 24px;
    color: var(--status-red);
}

@media (max-width: 768px) {
    .admin-dashboard-header {
        align-items: center !important;
        text-align: center;
    }

    .admin-title {
        font-size: 20px !important;
        justify-content: center;
    }

    .admin-header-text {
        width: 100%;
    }
}

/* ========== Notify / Toast (clean) ========== */
.toast-container {
    position: fixed;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 100000;
    pointer-events: none;
    width: min(300px, calc(100vw - 28px));
}

.toast {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 12px;
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 2px solid #52525b;
    border-radius: 8px;
    box-shadow: none;
    pointer-events: auto;
    animation: toastIn 0.18s ease both;
}

.toast.success { border-left-color: #22c55e; }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #52525b; }
.toast.warning { border-left-color: #f59e0b; }

.toast-accent,
.toast-label {
    display: none;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 13px;
    font-weight: 450;
    color: #d4d4d8;
    line-height: 1.35;
    word-break: break-word;
}

.toast-close {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #52525b;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    opacity: 0.7;
}

.toast-close:hover {
    color: #a1a1aa;
    opacity: 1;
    background: transparent;
}

.toast.is-leaving {
    animation: toastOut 0.15s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (max-width: 520px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        align-items: stretch;
    }
}

/* Card & Button Smoothness */
.card,
.btn,
.input-field,
.badge-item,
.shoutbox-messages .msg {
    transition: var(--transition-smooth);
}

/* Hover Card Styling */
.user-hover-card {
    position: fixed;
    width: 260px;
    background: rgba(21, 21, 21, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.user-hover-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.hover-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hover-card-avatar {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hover-card-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.hover-card-info span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hover-card-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.hover-card-stats b {
    color: #fff;
}

/* Custom Checkbox */
.remember-me-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.remember-me-container:hover {
    color: var(--text-main);
}

.remember-me-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remember-me-container:hover input~.checkmark {
    border-color: var(--accent-purple);
    background-color: rgba(163, 113, 247, 0.05);
}

.remember-me-container input:checked~.checkmark {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.checkmark:after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.remember-me-container input:checked~.checkmark:after {
    display: block;
}

/* Upload Drop Zone */
.upload-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragging {
    border-color: var(--accent-purple);
    background: var(--accent-purple-transparent);
}

/* --- Custom Dark UI Tooltip System --- */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(10, 10, 12, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f4f4f5;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 10000;
    pointer-events: none;
}

/* Tooltip Arrow */
[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(10, 10, 12, 0.96) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10000;
    pointer-events: none;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after,
[data-tooltip].is-tip-open::before,
[data-tooltip].is-tip-open::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Small adjustments for icons and badges */
.badge-item[data-tooltip], .user-badge[data-tooltip], .badge[data-tooltip] {
    display: inline-flex;
}

/* --- Global Mobile Support & Responsiveness --- */
@media (max-width: 992px) {
    .container {
        padding: 0 12px !important;
        margin-top: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    body.mobile-menu-active {
        overflow: hidden !important;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .navbar {
        padding: 0 15px !important;
        height: 60px !important;
        z-index: 10001 !important;
        overflow: visible !important;
    }
    
    .mobile-nav-toggle {
        display: block !important;
        order: 10;
        z-index: 10002 !important;
    }
    
    .nav-links {
        display: none;
    }
    
    body.mobile-menu-active .nav-links {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        background: #0d0d0f !important;
        padding: 40px !important;
        gap: 20px !important;
        z-index: 10000 !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    @keyframes mobileMenuIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-links a, body.mobile-menu-active .mobile-only-logout {
        display: block !important;
        width: 100% !important;
        max-width: 280px;
        padding: 16px !important;
        background: rgba(255,255,255,0.03) !important;
        border: 1px solid rgba(255,255,255,0.06) !important;
        border-radius: 12px !important;
        text-align: center !important;
        font-size: 16px !important;
        color: #fff !important;
        font-weight: 600 !important;
        text-decoration: none !important;
    }

    /* Shoutbox Mobile Fixes */
    .shoutbox-messages {
        padding: 10px !important;
        height: 400px !important;
    }
    
    .shoutbox-messages .msg div {
        font-size: 14px !important;
    }
    
    .shoutbox-input-area {
        padding: 12px !important;
        gap: 8px !important;
    }
    
    .shoutbox-input-area .input-field {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 768px) {
    #search-wrapper, #user-hover-card {
        display: none !important;
    }
    
    .account-trigger span {
        display: none;
    }
    
    .profile-header-info {
        text-align: center !important;
        padding-top: 60px !important;
        padding-bottom: 20px !important;
    }
    
    .profile-header-info > div {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .profile-header-info div[style*="margin-left: auto"] {
        margin-left: 0 !important;
        margin-top: 5px;
        width: 100%;
        justify-content: center;
    }
    
    div[style*="top: -50px; left: 24px"] {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .card-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px !important;
    }
    
    /* Settings Mobile Navigation */
    .settings-container {
        flex-direction: column !important;
    }

    .settings-sidebar {
        width: 100% !important;
        flex-direction: row !important;
        overflow-x: auto;
        padding: 4px !important;
        gap: 8px !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 16px;
    }

    .settings-sidebar .btn-tab {
        flex: 1;
        white-space: nowrap;
        justify-content: center !important;
        padding: 10px 16px;
        font-size: 12px !important;
    }
    
    /* Tables responsiveness */
    div[style*="overflow-x:auto"] {
        margin: 0 -12px;
        padding: 0 12px;
    }

    table th:nth-child(n+4),
    table td:nth-child(n+4) {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .settings-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px !important;
    }
    
    .settings-tabs button {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}

@media (max-width: 480px) {
    .navbar .logo span {
        display: none;
    }
    
    .stat {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    
    .card-body {
        padding: 16px !important;
    }
    
    .auth-container {
        margin: 20px auto !important;
    }
}

/* ========== User Dashboard (admin-aligned) ========== */
.dash {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.dash-hero-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 4px;
    color: var(--text-main);
}

.dash-hero-sub {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.dash-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.dash-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.dash-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dash-stat-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.dash-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.dash-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dash-layout > .dash-panel {
    height: 100%;
}

.dash-panel-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-panel-title {
    font-size: 14px;
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.dash-panel-title i {
    color: var(--text-dim);
    font-size: 13px;
}

.dash-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.dash-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-green);
    box-shadow: 0 0 0 3px var(--status-green-bg);
}

.shout-mod-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-panel-2);
}
.shout-mod-btn {
    padding: 4px 10px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.shout-mod-btn.is-on {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}
.shout-slow-hint {
    margin-left: 10px;
    color: var(--status-orange);
}
.dash-shout-foot .dash-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Gift key friend picker */
.friend-picker {
    position: relative;
    width: 100%;
}
.friend-picker-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.friend-picker-trigger:hover,
.friend-picker.is-open .friend-picker-trigger {
    border-color: var(--border-strong);
    background: var(--bg-panel-2);
}
.friend-picker-placeholder {
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}
.friend-picker-selected {
    flex: 1;
    display: none;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.friend-picker-trigger.has-value .friend-picker-placeholder {
    display: none;
}
.friend-picker-trigger.has-value .friend-picker-selected {
    display: flex;
}
.friend-picker-panel[hidden],
.friend-picker-empty[hidden],
.friend-picker-option[hidden] {
    display: none !important;
}
.friend-picker-caret {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.friend-picker.is-open .friend-picker-caret {
    transform: rotate(180deg);
}
.friend-picker-av-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}
.friend-picker-av-wrap img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    display: block;
}
.friend-picker-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4b5563;
    border: 2px solid var(--bg-main);
}
.friend-picker-dot.is-on {
    background: var(--status-green);
}
.friend-picker-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.friend-picker-name {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.friend-picker-sub {
    font-size: 11px;
    color: var(--text-muted);
}
.friend-picker-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 40;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);
    overflow: hidden;
}
.friend-picker-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
}
.friend-picker-search-wrap i { font-size: 12px; }
.friend-picker-search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
}
.friend-picker-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}
.friend-picker-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.friend-picker-option:hover {
    background: var(--bg-hover);
}
.friend-picker-option.is-active {
    background: rgba(255,255,255,0.06);
}
.friend-picker-check {
    margin-left: auto;
    opacity: 0;
    color: var(--status-green);
    font-size: 12px;
    flex-shrink: 0;
}
.friend-picker-option.is-active .friend-picker-check {
    opacity: 1;
}
.friend-picker-empty {
    padding: 16px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.shout-pinned {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(245, 158, 11, 0.06);
}
.shout-pinned-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.shout-pinned-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    font-size: 12px;
    flex-shrink: 0;
}
.shout-pinned-body { flex: 1; min-width: 0; }
.shout-pinned-label {
    font-size: 11px;
    font-weight: 650;
    color: #fbbf24;
    margin-bottom: 3px;
}
.shout-pinned-text {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.45;
    word-wrap: break-word;
}
.shout-pinned-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    flex-shrink: 0;
}
.shout-pinned-clear:hover { color: var(--text-main); }

.shout-poll {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
.shout-poll-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.shout-poll-q {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.shout-poll-q i { color: var(--text-dim); font-size: 12px; }
.shout-poll-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
}
.shout-poll-opts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.shout-poll-opt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
}
button.shout-poll-opt:hover {
    border-color: var(--border-strong);
    background: var(--bg-panel-2);
}
.shout-poll-opt.is-result {
    cursor: default;
}
.shout-poll-opt.is-mine {
    border-color: rgba(34, 197, 94, 0.35);
}
.shout-poll-opt-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.shout-poll-opt-label,
.shout-poll-opt-pct {
    position: relative;
    z-index: 1;
}
.shout-poll-opt-pct {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.shout-poll-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.dash-shout-messages {
    height: 380px;
    overflow-y: auto;
    padding: 14px;
    background:
        radial-gradient(90% 60% at 0% 0%, rgba(255,255,255,0.03), transparent 50%),
        var(--bg-main);
    scroll-behavior: smooth;
}

.dash-shout-messages .msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.dash-shout-messages .msg:last-child {
    margin-bottom: 0;
}

.dash-shout-messages::-webkit-scrollbar { width: 6px; }
.dash-shout-messages::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 99px;
}

.dash-shout-foot {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-shout-row {
    display: flex;
    gap: 10px;
}

.dash-shout-row .input-field {
    flex: 1;
}

.dash-meta {
    display: flex;
    justify-content: flex-end;
    font-size: 11px;
    color: var(--text-muted);
}

.dash-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.dash-redeem-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.dash-redeem-btn i {
    font-size: 11px;
}

.dash-panel-fill {
    flex: 1 1 auto;
    height: 100%;
}

.dash-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    min-height: 0;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,0.04), transparent 55%),
        var(--bg-card);
}

.dash-top-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
    text-decoration: none;
    color: inherit;
    transition: none !important;
}

.dash-top-card:hover,
.dash-top-card:focus,
.dash-top-card:active {
    background: rgba(255,255,255,0.02) !important;
    outline: none;
    transform: none !important;
}

.dash-top-card.is-empty {
    opacity: 0.72;
}

.dash-top-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-size: 14px;
}

.dash-top-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-top-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.dash-top-who {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dash-top-av {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-hover);
}

.dash-top-name {
    font-size: 14px;
    font-weight: 650;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-top-name.muted,
.dash-top-chip.muted {
    color: var(--text-muted);
    font-weight: 500;
}

.dash-top-chip {
    flex-shrink: 0;
    min-width: 36px;
    text-align: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg-main);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dash-top-chip-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
}

.dash-list {
    padding: 6px 0;
}

.dash-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid transparent;
}

.dash-list-row + .dash-list-row {
    border-top-color: var(--border-color);
}

.dash-list-row:hover {
    background: transparent;
}

.dash-list-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.dash-list-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.dash-list-val {
    font-size: 13px;
    font-weight: 650;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.dash-kv {
    padding: 4px 0;
}

.dash-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    font-size: 13px;
}

.dash-kv-row + .dash-kv-row {
    border-top: 1px solid var(--border-color);
}

.dash-kv-row span {
    color: var(--text-muted);
}

.dash-kv-row strong,
.dash-kv-row a {
    color: var(--text-main);
    font-weight: 650;
    text-decoration: none;
}

.dash-kv-row a:hover {
    color: var(--accent-purple-hover);
}

.dash-subs-body {
    padding: 18px;
}

.dash-sub-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.dash-sub-item strong {
    font-size: 14px;
}

.dash-sub-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.dash-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.dash-subs-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.dash .btn-primary {
    background: var(--accent-purple);
    color: #09090b;
    border-color: var(--accent-purple);
    font-weight: 650;
}

.dash .btn-primary:hover {
    background: var(--accent-purple-hover);
    border-color: var(--accent-purple-hover);
    color: #09090b;
}

.dash .btn:not(.btn-primary) {
    background: var(--bg-panel-2);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
}

.dash .btn:not(.btn-primary):hover {
    background: var(--bg-hover);
}

.dash-modal .card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

@media (max-width: 900px) {
    .dash-stat-grid { grid-template-columns: 1fr 1fr; }
    .dash-layout { grid-template-columns: 1fr; align-items: start; }
    .dash-layout > .dash-panel { height: auto; }
    .dash-side { height: auto; }
    .dash-panel-fill { flex: none; height: auto; }
    .dash-shout-messages { height: 320px; }
    .dash-hero-title { font-size: 24px; }
}

@media (max-width: 520px) {
    .dash-stat-grid { grid-template-columns: 1fr; }
}

/* ========== Shared modal overlay ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    width: 400px;
    max-width: 92%;
    transform: translateY(-12px);
    transition: transform 0.25s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

/* ========== Themed confirm dialog ========== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.confirm-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.confirm-overlay[hidden] {
    display: none !important;
}
.confirm-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.18s ease;
}
.confirm-overlay.is-open .confirm-card {
    transform: translateY(0) scale(1);
}
.confirm-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.confirm-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-dim);
}
.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.confirm-btn-cancel {
    min-width: 88px;
}
.confirm-btn-ok {
    min-width: 88px;
    background: var(--accent-purple);
    color: #09090b;
    border-color: var(--accent-purple);
    font-weight: 600;
}
.confirm-btn-ok:hover {
    background: var(--accent-purple-hover);
}
.confirm-btn-ok.is-danger {
    background: var(--status-red);
    border-color: var(--status-red);
    color: #fff;
}
.confirm-btn-ok.is-danger:hover {
    filter: brightness(1.08);
}

/* ========== Support page ========== */
.support-list {
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.support-ticket-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.support-ticket-row:last-child {
    border-bottom: none;
}

.support-ticket-row:hover {
    background: var(--bg-hover);
}

.support-ticket-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.support-ticket-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.support-status {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

.support-status.is-open {
    color: var(--status-green);
    background: var(--status-green-bg);
    border-color: rgba(34, 197, 94, 0.2);
}

.support-status.is-closed {
    color: var(--text-muted);
    background: var(--bg-panel-2);
    border-color: var(--border-color);
}

.support-cat {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}
.support-cat-bug {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
.support-cat-hwid {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
.support-cat-payment {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.support-required {
    font-style: normal;
    font-weight: 600;
    color: #f87171;
    font-size: 11px;
    margin-left: 4px;
}

.support-shot-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 112px;
    padding: 16px;
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    color: var(--text-muted);
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.support-shot-zone:hover,
.support-shot-zone.dragging {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
}
.support-shot-zone.has-file {
    border-style: solid;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.05);
}
.support-shot-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.support-shot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.support-shot-placeholder i {
    font-size: 20px;
    margin-bottom: 4px;
    opacity: 0.85;
}
.support-shot-placeholder strong {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}
.support-shot-placeholder small {
    font-size: 11px;
    opacity: 0.7;
}
.support-shot-preview {
    width: 100%;
    max-width: 220px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0a0a0c;
}
.support-shot-preview img {
    display: block;
    width: 100%;
    height: 96px;
    object-fit: cover;
}
.support-shot-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
    color: var(--status-green);
}
.support-shot-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}
.support-shot-change {
    appearance: none;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.support-shot-change:hover {
    background: rgba(255,255,255,0.08);
}

.support-hwid {
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.support-hwid-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-purple-transparent);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    font-size: 18px;
    margin-bottom: 4px;
}

.support-hwid-title {
    font-size: 16px;
    font-weight: 650;
    color: var(--text-main);
}

.support-hwid-title.muted {
    color: var(--text-dim);
}

.support-hwid-text {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.45;
}

.support-countdown {
    width: 100%;
    max-width: 280px;
    margin-top: 4px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
}

.support-countdown-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.support-countdown-value {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.support-countdown-value.is-ready {
    color: var(--status-green);
}

.support-countdown-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.support-faq {
    padding: 8px 20px 12px;
}

.support-modal-lead {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 16px;
}

.support-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-modal .form-group .input-field,
.support-modal .form-group textarea.input-field {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.support-create-modal {
    width: min(440px, 94vw);
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.support-create-modal .card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.support-create-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-field > span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.support-field .input-field,
.support-field textarea.input-field {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-main);
    border-color: var(--border-color);
    resize: vertical;
    min-height: 0;
}

.support-field textarea.input-field {
    min-height: 120px;
    line-height: 1.5;
}

.support-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
    padding-top: 4px;
}

.support-create-actions .btn {
    min-width: 96px;
}

.support-ticket-modal {
    width: min(560px, 94vw);
    max-height: min(720px, 90vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.support-ticket-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.support-ticket-kicker {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.support-ticket-modal .card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-main);
    line-height: 1.35;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-ticket-modal .ticket-chat-box {
    flex: 1 1 auto;
    height: auto;
    min-height: 360px;
    max-height: none;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 18px;
    gap: 16px;
    overflow-y: auto;
}

.support-chat-empty {
    margin: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px 12px;
}

.support-ticket-modal .chat-msg {
    gap: 12px;
}

.support-ticket-modal .chat-avatar {
    width: 28px;
    height: 28px;
    border: none;
    margin-top: 2px;
}

.support-ticket-modal .chat-header {
    margin-bottom: 4px;
    gap: 8px;
}

.support-ticket-modal .chat-username {
    font-size: 12px;
    font-weight: 600;
}

.support-ticket-modal .chat-bubble {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-dim);
    max-width: 100%;
}

.support-ticket-modal .chat-msg.admin .chat-bubble,
.support-ticket-modal .chat-msg.staff .chat-bubble {
    background: transparent;
    border: none;
    border-left: none;
    color: var(--text-dim);
}

.support-ticket-modal .role-badge {
    font-size: 9px;
    padding: 1px 5px;
    font-weight: 600;
}

.support-reply-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
}

.support-reply-row .input-field {
    flex: 1;
    min-width: 0;
    background: var(--bg-main);
    border-color: var(--border-color);
}

.support-attach-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    flex-shrink: 0;
}

.support-attach-btn:hover {
    color: var(--text-main);
    background: var(--bg-hover);
}

.support-send-btn {
    flex-shrink: 0;
    padding: 8px 14px;
}

.support-file-name {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-attach-preview {
    display: inline-block;
    margin-top: 8px;
}

.support-attach-preview img {
    display: block;
    max-width: 220px;
    max-height: 140px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.support-attach-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-dim);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
}

.support-attach-file:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.chat-time {
    margin-left: auto;
    opacity: 0.5;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .support-hwid-panel {
        min-height: auto;
    }

    .support-ticket-modal .ticket-chat-box {
        min-height: 260px;
    }
}

/* ========== Download page ========== */
.download-page .download-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.download-chip.is-warn {
    color: var(--status-orange);
    background: var(--status-orange-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.download-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 18px;
    flex-wrap: wrap;
}

.download-hero-info {
    min-width: 0;
    flex: 1;
}

.download-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.download-meta-row i {
    margin-right: 4px;
    opacity: 0.8;
}

.download-hero-text {
    margin: 0;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.45;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}

.download-grid {
    align-items: stretch;
}

.download-steps {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.download-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    border-bottom: 1px solid var(--border-color);
}

.download-steps li:last-child {
    border-bottom: none;
}

.download-steps strong {
    color: var(--text-main);
    font-weight: 600;
}

.download-step-num {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg-panel-2);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.download-note {
    padding: 18px;
}

.download-note p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

.download-notes {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.download-notes li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    align-items: start;
}

.download-notes li:last-child {
    border-bottom: none;
}

.download-note-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    padding-top: 1px;
}

.download-note-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .download-notes li {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.download-empty {
    padding: 48px 20px;
}

.download-empty i {
    font-size: 28px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

.download-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.download-empty p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.download-page .btn-primary {
    background: var(--accent-purple);
    color: #09090b;
    border-color: var(--accent-purple);
    font-weight: 650;
}

.download-page .btn-primary:hover {
    background: var(--accent-purple-hover);
    border-color: var(--accent-purple-hover);
    color: #09090b;
}

/* ========== Settings Page ========== */
.settings-page {
    gap: 20px;
}

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: start;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 80px;
}

.settings-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 550;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-nav-btn i {
    width: 16px;
    text-align: center;
    opacity: 0.85;
}

.settings-nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.settings-nav-btn.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.settings-panel-body {
    padding: 16px 18px 18px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-lead {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-dob-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 10px;
}

.settings-check-list,
.settings-check-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-check-list {
    margin-top: 4px;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
}

.settings-check-strong {
    font-weight: 600;
}

.settings-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 28px;
    line-height: 1.4;
}

.settings-empty {
    text-align: center;
    padding: 36px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
}

.settings-empty i {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.settings-empty-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 550;
}

.settings-empty-link:hover {
    text-decoration: underline;
}

/* Profile header panel */
.settings-profile-panel {
    overflow: hidden;
    --profile-accent: #e4e4e7;
}

.settings-profile-banner {
    height: 160px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    box-sizing: border-box;
}
.settings-profile-panel.has-accent .settings-profile-banner {
    border-bottom: 2px solid var(--profile-accent);
}
.settings-profile-panel.has-accent .settings-profile-avatar {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-accent) 35%, transparent);
}

.settings-accent-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}
.settings-accent-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.settings-accent-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: var(--swatch, #333);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.settings-accent-swatch:hover {
    transform: scale(1.08);
}
.settings-accent-swatch.is-off {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1c1c1f;
    color: #888;
    font-size: 10px;
}
.settings-accent-swatch.is-off.is-active {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 0 3px #888;
    color: #fff;
}
.settings-accent-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.settings-accent-custom:hover {
    color: var(--text-main);
    border-color: var(--border-strong, #444);
}
.settings-accent-custom input[type="color"] {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.settings-accent-custom input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.settings-accent-custom input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}
.settings-accent-custom input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.settings-profile-body {
    display: flex;
    gap: 18px;
    padding: 0 18px 20px;
    position: relative;
}

.settings-profile-avatar-wrap {
    flex-shrink: 0;
    margin-top: -44px;
}

.settings-profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 3px solid var(--bg-card);
    background: var(--bg-main);
    display: block;
}

.settings-profile-info {
    flex: 1;
    min-width: 0;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-profile-topline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.settings-profile-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.settings-profile-uid,
.settings-profile-role {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}

.settings-profile-uid:hover {
    color: var(--text-main);
}

.settings-profile-views {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.settings-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.settings-badge-chip {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: inherit;
    padding: 0;
    font-family: inherit;
}

.settings-badge-chip:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

.settings-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.settings-profile-meta > span,
.settings-profile-meta > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
}

.settings-profile-meta > a:hover {
    color: var(--text-main);
}

.settings-profile-meta i {
    margin-right: 0;
    opacity: 0.9;
    width: 1em;
    text-align: center;
}

.settings-profile-dob {
    font-size: 13px;
    color: var(--text-main);
}

/* Rows */
.settings-row-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.settings-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.settings-row-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 15px;
}

.settings-row-icon.is-current {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-row-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-row-action {
    margin: 0;
    flex-shrink: 0;
}

.settings-row-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 90px;
}

.settings-current-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 2px 7px;
}

.settings-status-active {
    font-size: 12px;
    font-weight: 600;
    color: var(--status-green);
    flex-shrink: 0;
}

.settings-danger-btn {
    background: rgba(248, 81, 73, 0.08);
    color: var(--status-red);
    border: 1px solid rgba(248, 81, 73, 0.22);
    font-weight: 600;
    font-size: 12px;
    padding: 6px 12px;
}

.settings-danger-btn:hover {
    background: rgba(248, 81, 73, 0.14);
}

.settings-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.settings-tip i {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 14px;
}

.settings-tip strong {
    color: var(--text-main);
}

/* Friends */
.settings-friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.settings-friend-row {
    min-width: 0;
}

.settings-friend-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.settings-friend-name {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.settings-friend-name:hover {
    text-decoration: underline;
}

.settings-unfollow-btn {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--status-red);
    flex-shrink: 0;
}

/* Login history table */
.settings-table-wrap {
    max-height: 400px;
    overflow-y: auto;
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.settings-table th {
    padding: 10px 4px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.settings-table td {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-color);
}

.settings-table tr:last-child td {
    border-bottom: none;
}

.settings-table-date {
    color: var(--text-main);
    white-space: nowrap;
}

.settings-table-ip {
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Upload zones on settings */
.settings-page .upload-drop-zone {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 28px 16px;
    background: var(--bg-main);
    gap: 8px;
}

.settings-page .upload-drop-zone i {
    font-size: 22px;
    color: var(--text-muted);
}

.settings-page .upload-drop-zone > div {
    font-size: 13px;
    color: var(--text-muted);
}

.settings-page .upload-drop-zone:hover,
.settings-page .upload-drop-zone.dragging {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.settings-comments-panel .comment-list {
    min-height: 40px;
}

.settings-comments-panel .comment-empty {
    color: var(--text-muted);
    font-size: 13px;
    padding: 8px 0;
}

@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .settings-nav-btn {
        flex: 0 0 auto;
        white-space: nowrap;
        width: auto;
    }
}

@media (max-width: 640px) {
    .settings-profile-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 0;
    }

    .settings-profile-avatar-wrap {
        margin-top: -36px;
    }

    .settings-profile-avatar {
        width: 72px;
        height: 72px;
    }

    .settings-profile-info {
        padding-top: 0;
        width: 100%;
    }

    .settings-profile-views {
        margin-left: 0;
        width: 100%;
    }

    .settings-profile-banner {
        height: 120px;
    }

    .settings-dob-row {
        grid-template-columns: 1fr;
    }

    .settings-row {
        flex-wrap: wrap;
    }

    .settings-friends-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Public Profile Page ── */
.profile-page {
    margin-top: 10px;
    margin-bottom: 28px;
}

.profile-locked {
    text-align: center;
    padding: 72px 24px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.profile-locked i {
    font-size: 32px;
    opacity: 0.4;
    margin-bottom: 14px;
    display: block;
}

.profile-locked h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.profile-locked p {
    margin: 0;
    font-size: 13px;
}

.profile-shell {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    --profile-accent: #e4e4e7;
}

.profile-banner {
    position: relative;
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: #0a0a0c;
    border-bottom: none;
    box-sizing: border-box;
}
.profile-shell.has-accent .profile-banner {
    border-bottom: 2px solid var(--profile-accent);
}

.profile-banner-fade {
    position: absolute;
    inset: auto 0 0 0;
    height: 72px;
    background: linear-gradient(to top, var(--bg-card), transparent);
    pointer-events: none;
}

.profile-body {
    padding: 0 24px 24px;
}

.profile-head {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-top: -48px;
    position: relative;
    z-index: 1;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 104px;
    height: 104px;
    border-radius: 14px;
    object-fit: cover;
    border: 4px solid var(--bg-card);
    background: #111;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.profile-shell.has-accent .profile-avatar {
    box-shadow:
        0 0 0 2px color-mix(in srgb, var(--profile-accent) 40%, transparent),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

.profile-online-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--status-green);
    border: 3px solid var(--bg-card);
}

.profile-online-dot.is-offline {
    background: #3a3a3a;
}

.profile-head-main {
    flex: 1;
    min-width: 0;
    padding-top: 56px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-head-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-name {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-flag {
    border-radius: 2px;
}

.profile-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #777;
}

.profile-dot-sep {
    color: #3a3a3a;
}

.profile-presence.is-online {
    color: var(--status-green);
}

.profile-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.profile-action-btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-main);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.profile-action-btn.is-following {
    background: rgba(255, 255, 255, 0.06);
}

.profile-action-primary {
    background: #ececec;
    border-color: #ececec;
    color: #0a0a0a;
}

.profile-action-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #0a0a0a;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-badge {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 7px;
    font-size: 12px;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 2px;
}

.profile-stat {
    font-size: 13px;
    color: #666;
}

.profile-stat strong {
    color: #eee;
    font-weight: 700;
    margin-right: 4px;
    letter-spacing: -0.02em;
}

.profile-split {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-section-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
}

.profile-bio {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.65;
    color: #b8b8b8;
}

.profile-bio.is-empty {
    color: #555;
    font-style: italic;
}

.profile-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12.5px;
    color: #666;
}

.profile-meta-row > span,
.profile-meta-row > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
}

.profile-meta-row i {
    margin-right: 0;
    opacity: 0.85;
    width: 1em;
    text-align: center;
}

.profile-meta-row a {
    color: #777;
}

.profile-meta-row a:hover {
    color: #ddd;
}

.profile-empty {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.profile-sub-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-sub-item:last-child {
    border-bottom: none;
}

.profile-sub-name {
    font-size: 13px;
    font-weight: 600;
    color: #ddd;
}

.profile-sub-status {
    font-size: 11px;
    color: #5a9e6f;
    white-space: nowrap;
}

.profile-comments {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-comment-compose {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 4px;
}

.profile-comment-compose img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-comment-compose textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: #e2e2e2;
    font-family: var(--font-main);
    font-size: 13px;
    line-height: 20px;
    height: 20px;
    max-height: 96px;
    padding: 0;
    overflow-y: auto;
}

.profile-comment-compose textarea::placeholder {
    color: #4a4a4a;
}

.profile-comment-send {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: none;
    border-radius: 8px;
    background: #e8e8e8;
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background 0.15s, opacity 0.15s;
}

.profile-comment-send:hover {
    background: #fff;
}

.profile-comment-login {
    padding: 8px 0 14px;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 4px;
}

.profile-comment-login a {
    color: #ddd;
    text-decoration: none;
    font-weight: 600;
}

.profile-comment-login a:hover {
    color: #fff;
}

.profile-comments .comment-list {
    max-height: 420px;
}

.profile-comments .comment-avatar {
    border-radius: 8px;
}

.profile-comments .comment-empty {
    padding: 28px 0 8px;
    text-align: left;
    color: #4a4a4a;
    font-size: 13px;
}

.profile-comments .comment-item {
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 900px) {
    .profile-split {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .profile-banner {
        height: 140px;
    }

    .profile-body {
        padding: 0 16px 20px;
    }

    .profile-head {
        flex-direction: column;
        margin-top: -40px;
        gap: 12px;
    }

    .profile-avatar {
        width: 84px;
        height: 84px;
    }

    .profile-head-main {
        padding-top: 0;
        width: 100%;
    }

    .profile-name {
        font-size: 22px;
    }

    .profile-stats {
        gap: 14px;
    }
}

.dash-members-panel {
    flex: 0 0 auto;
}
.dash-members-wrap {
    padding: 4px 14px 14px;
    line-height: 1.7;
    font-size: 12.5px;
    max-height: 160px;
    overflow-y: auto;
    word-wrap: break-word;
}
.dash-member-name {
    text-decoration: none;
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.01em;
}
.dash-member-name:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.dash-members-sep {
    color: rgba(255,255,255,0.35);
    font-weight: 400;
}
.dash-members-more {
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}
.dash-members-empty {
    color: var(--text-muted);
    font-size: 12.5px;
}

.totp-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0;
}
.totp-secret {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
    word-break: break-all;
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.settings-discord-box {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
}
.settings-discord-linked {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.settings-discord-av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.settings-discord-icon {
    font-size: 28px;
    color: #5865F2;
}
.settings-discord-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.settings-friend-av-wrap {
    position: relative;
    flex-shrink: 0;
}
.settings-online-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
    border: 2px solid var(--bg-card, #121214);
}
.settings-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 360px;
    overflow: auto;
}
.settings-activity-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.settings-activity-item:last-child {
    border-bottom: none;
}
.settings-activity-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}
.settings-activity-meta {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}
.settings-recovery-box {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.totp-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.totp-recovery-code {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-align: center;
    color: var(--text-main);
}

.profile-spotify {
    margin-top: 4px;
}
.profile-spotify-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(29, 185, 84, 0.06);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.profile-spotify-card:hover {
    border-color: rgba(29, 185, 84, 0.35);
    background: rgba(29, 185, 84, 0.1);
}
.profile-spotify-art {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #111;
}
.profile-spotify-live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #1DB954;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.profile-spotify.is-paused .profile-spotify-live {
    color: var(--text-muted);
}
.profile-spotify-eq {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1DB954;
    box-shadow: 0 0 8px rgba(29, 185, 84, 0.7);
    animation: spotifyPulse 1.4s ease-in-out infinite;
}
.profile-spotify.is-paused .profile-spotify-eq {
    animation: none;
    background: #666;
    box-shadow: none;
}
@keyframes spotifyPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.75); opacity: 0.7; }
}
.profile-spotify-track {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}
.profile-spotify-artist {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
