/* Black Shade: charcoal, silver and mint from the supplied original mark.
   Loaded after the legacy component sheet; no application state lives here. */
:root {
    color-scheme: dark;
    --bg-primary: #101414;
    --bg-secondary: #171c1c;
    --bg-card: #191e1e;
    --accent-primary: #9bddce;
    --accent-secondary: #c8e9e1;
    --accent-tertiary: #90ada7;
    --accent-gradient: linear-gradient(135deg, #9bddce, #c8e9e1);
    --text-primary: #edf2ef;
    --text-secondary: #a3b2ae;
    --muted: #a3b2ae;
    --border-color: #303a37;
    --success: #9bddce;
    --info: #b8d6d0;
    --warning: #e0bd7e;
    --danger: #f09d9d;
    --card-shadow: none;
    --neon-glow: none;
    --rail-width: 240px;
}
html { scroll-padding-top: 90px; }
body, body.landing-page {
    background: var(--bg-primary);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
body.has-sidebar, html[dir="rtl"] body.has-sidebar {
    padding: 76px 0 0;
    padding-inline-start: var(--rail-width);
}
body.has-sidebar.sidebar-collapsed, html[dir="rtl"] body.has-sidebar.sidebar-collapsed {
    padding: 76px 0 0;
    padding-inline-start: 64px;
}
h1, h2, h3, .page-title, .navbar-brand, .landing-brand, .landing-brand span, .hero-card h1 {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-primary);
    text-shadow: none;
}
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 4px; }
::selection { background: #47796b; color: white; }
.skip-link { position: fixed; top: -100px; inset-inline-start: 20px; z-index: 3000; padding: 10px 18px; background: var(--accent-primary); color: #101414; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.navbar { height: 76px; padding: 0 28px; background: #141918; border-color: var(--border-color); box-shadow: none; backdrop-filter: none; }
.navbar-content { max-width: none; flex-direction: row; align-items: center; gap: 24px; }
.navbar-brand, .landing-brand { gap: 12px; flex-shrink: 0; color: var(--text-primary); }
.brand-logo, .landing-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 50%; filter: none; }
.brand-wordmark { font-size: 19px; font-weight: 650; letter-spacing: -.5px; direction: ltr; }
.workspace-context { display: flex; gap: 12px; align-items: center; padding-inline-start: 24px; border-inline-start: 1px solid var(--border-color); font-size: 13px; color: var(--text-secondary); }
.workspace-context i { font-size: 18px; }
.workspace-context strong { color: var(--text-primary); font-weight: 500; }
html[dir="ltr"] .workspace-context .icon { transform: rotate(180deg); }
.workspace-note { margin-inline-start: auto; color: var(--text-secondary); font-size: 12px; }
.sidebar, html[dir="rtl"] .sidebar {
    top: 76px; width: var(--rail-width); height: calc(100dvh - 76px);
    padding: 28px 18px 20px; background: #141918; backdrop-filter: none;
    border-color: var(--border-color); transition: none; gap: 20px;
}
.sidebar-heading { color: #82928b; font-size: 12px; padding: 0 14px; margin: 0 0 12px; font-weight: 500; }
.sidebar-links { gap: 6px; flex: 1; }
.sidebar-links a { padding: 11px 14px; border-radius: 7px; font-size: 14px; gap: 12px; font-weight: 500; border: 1px solid transparent; box-shadow: none; }
.sidebar-links a i, .sidebar-links a svg { width: 20px; height: 20px; font-size: 20px; flex-shrink: 0; }
.sidebar-links a:hover { color: var(--text-primary); background: #202825; box-shadow: none; }
.sidebar-links a.active { background: #253b33; color: #b6e6d8; border-color: #355245; box-shadow: none; }
.sidebar-links a.active::before { display: none; }
.sidebar-actions { padding-top: 18px; gap: 12px; border-color: var(--border-color); }
.sidebar-actions .btn { white-space: normal; }
.user-info { color: var(--text-primary); padding: 0 2px 6px; }
.user-avatar { border: 1px solid var(--border-color); }
.language-switcher { justify-content: space-between; font-size: 12px; }
.language-switcher select { font-size: 12px; padding: 5px 8px; min-height: 32px; }
.sidebar-toggle, html[dir="rtl"] .sidebar-toggle {
    top: auto; bottom: 0; inset-inline-end: -14px; inset-inline-start: auto;
    width: 28px; height: 28px; background: #252e2a; border: 1px solid #45544c; border-radius: 50%; color: var(--text-primary);
}
.sidebar-toggle::before, .sidebar.collapsed .sidebar-toggle::before { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: url('/assets/icons/chevron-left.svg') center / contain no-repeat; mask: url('/assets/icons/chevron-left.svg') center / contain no-repeat; }
.sidebar-toggle::before { transform: none; }
.sidebar.collapsed .sidebar-toggle::before { transform: rotate(180deg); }
html[dir="rtl"] .sidebar-toggle::before { transform: rotate(180deg); }
html[dir="rtl"] .sidebar.collapsed .sidebar-toggle::before { transform: none; }
.sidebar.collapsed, html[dir="rtl"] .sidebar.collapsed { width: 64px; padding: 24px 10px; }
.sidebar.collapsed .sidebar-heading { display: none; }
.container { max-width: 1440px; padding: 36px 40px 56px; }
.page-title { font-size: 28px; font-weight: 650; line-height: 1.4; margin: 0 0 9px; letter-spacing: -.6px; }
.page-description { font-size: 14px; line-height: 1.8; margin: 0; color: var(--text-secondary); max-width: 65ch; }
.stats-header, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; text-align: start; }
.stats-header .btn { flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); padding: 8px 0; margin: 0 0 28px; }
.stat-card { background: none; border: 0; border-inline-end: 1px solid var(--border-color); border-radius: 0; padding: 18px 24px; display: flex; flex-direction: row; align-items: center; gap: 14px; box-shadow: none; }
.stat-card:last-child { border-inline-end: 0; }
.stat-card::before, .stat-card::after { display: none; }
.stat-card:hover { transform: none; box-shadow: none; background: none; }
.stat-icon { width: 40px; height: 40px; border: 0; border-radius: 8px; background: #25362f; color: var(--accent-primary); font-size: 21px; box-shadow: none; flex-shrink: 0; }
.stat-value { font-size: 30px; font-weight: 600; line-height: 1.3; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
.stats-load-error { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 18px 24px; gap: 16px; color: var(--danger); font-size: 14px; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.stats-section, .registered-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 22px 24px; margin: 0; box-shadow: none; min-width: 0; }
.stats-section-title { font-size: 16px; font-weight: 600; color: var(--text-primary); display: flex; gap: 10px; align-items: center; margin: 0 0 20px; padding: 0 0 18px; border-bottom: 1px solid var(--border-color); }
.stats-section-title i { font-size: 19px; color: var(--text-secondary); }
.registered-users-grid { display: block; }
.registered-user-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; text-align: start; padding: 16px 0; background: none; border: 0; border-bottom: 1px solid var(--border-color); border-radius: 0; box-shadow: none; }
.registered-user-card:last-child { border-bottom: 0; }
.registered-user-card:hover { transform: none; background: none; box-shadow: none; }
.registered-user-avatar-wrap, .registered-user-avatar-wrap.online { grid-column: 1; grid-row: 1 / 3; width: 42px; height: 42px; padding: 0; background: none; box-shadow: none; border: 1px solid #46584f; }
.registered-user-avatar { border: 0; }
.registered-user-name { grid-column: 2; grid-row: 1; justify-content: flex-start; font-size: 14px; gap: 8px; min-width: 0; }
.registered-user-country { grid-column: 2; grid-row: 2; justify-content: flex-start; font-size: 12px; }
.registered-user-meta { grid-column: 3; grid-row: 1; text-align: end; font-size: 11px; }
.registered-user-monitored { grid-column: 3; grid-row: 2; justify-content: flex-end; font-size: 11px; }
.online-badge { text-transform: none; letter-spacing: 0; color: var(--accent-primary); background: #253b33; border: 0; font-size: 10px; }
.countries-table { background: none; border-radius: 0; }
.countries-table th, .countries-table td { padding: 13px 10px; border-color: var(--border-color); font-size: 13px; }
.countries-table th { background: none; color: var(--text-secondary); font-weight: 500; }
.countries-table thead { background: #222c27; }
.countries-table th { text-transform: none; letter-spacing: 0; }
.countries-table tr:hover { background: #202925; }
.country-rank { background: none; border: 0; color: var(--text-secondary); }
.country-flag { width: 23px; height: 16px; border-radius: 3px; box-shadow: none; }
.count-value { color: var(--text-primary); }
.btn { min-height: 38px; border-radius: 6px; padding: 8px 15px; font-size: 13px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--accent-primary); color: #10221b; border: 1px solid var(--accent-primary); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: #b8e8dc; color: #10221b; transform: none; box-shadow: none; }
.btn-primary::after { display: none; }
.btn-secondary { background: #202925; color: var(--text-primary); border: 1px solid #45534b; box-shadow: none; }
.btn-secondary:hover:not(:disabled) { background: #2b3730; border-color: #62776b; box-shadow: none; transform: none; }
.btn-sm { font-size: 12px; min-height: 32px; padding: 5px 10px; }
.btn-lg { padding: 12px 24px; min-height: 48px; font-size: 15px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card, .modal, .modal-content, .monitoring-sidebar, .monitoring-feed { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: none; backdrop-filter: none; }
.card:hover, .modal-content:hover { transform: none; border-color: var(--border-color); box-shadow: none; }
.card-header, .sidebar-header, .feed-header { background: none; color: var(--text-primary); border-color: var(--border-color); padding: 20px 24px; font-size: 16px; }
.card-body { padding: 24px; }
.card-header h2, .sidebar-header h2, .feed-header h2 { color: var(--text-primary); font-size: 15px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > *, .card-body, .monitoring-feed { min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { background: #121816; color: var(--text-primary); border: 1px solid #425047; border-radius: 6px; box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px #9bddce14; }
input::placeholder, textarea::placeholder { color: #85968c; }
label { color: var(--text-primary); }
.form-hint { color: var(--text-secondary); line-height: 1.8; }
table { background: none; }
th { background: #202925; color: #b4c3ba; font-weight: 500; font-size: 12px; }
td { font-size: 13px; border-color: var(--border-color); }
tbody tr:hover { background: #202925; }
.table-container, .table-responsive { max-width: 100%; border-radius: 6px; }
.server-card { background: #1d2521; border: 1px solid var(--border-color); border-radius: 8px; padding: 24px 16px; }
.server-card:hover { transform: none; box-shadow: none; border-color: #586e60; }
.server-icon, .server-info-icon { width: 64px; height: 64px; box-shadow: none; border: 1px solid var(--border-color); }
.server-tokens, .server-info-content a { color: var(--accent-primary); }
.server-meta, .server-count { color: var(--text-secondary); }
.monitoring-layout { padding: 28px; gap: 20px; height: calc(100dvh - 76px); min-height: 540px; }
.monitoring-sidebar { width: 290px; flex-shrink: 0; }
.feed-header { flex-wrap: wrap; gap: 14px; }
.feed-filters { flex-wrap: wrap; min-width: 0; }
.feed-filters select { max-width: 100%; }
.user-row { border-radius: 6px; }
.user-row:hover { background: #25332b; }
.user-row.active { background: #293f33; border-color: #4a6856; box-shadow: none; }
.user-row-avatar { border-color: #4a5f50; box-shadow: none; }
.discord-message, .discord-message:hover { background: #1b231e; border-color: var(--border-color); border-radius: 7px; }
.discord-avatar { border: 1px solid #4a5f50; }
.meta-chip { background: #222e25; border-color: #3c4d3f; border-radius: 5px; }
.status-chip, .channel-chip { color: var(--accent-primary); background: #263a2e; border-color: #415848; }
.empty-state { color: var(--text-secondary); padding: 52px 20px; font-size: 14px; }
.empty-state i { color: #779889; font-size: 34px; }
.notification-item, .notification-banner { background: #202a23; border-color: var(--border-color); border-radius: 7px; box-shadow: none; }
.notification-modal { background: #1b241e; border-color: #4a6352; box-shadow: 0 24px 80px #0008; animation: none; }
.modal-overlay { visibility: hidden; }
.modal-overlay.show { visibility: visible; }
.notification-modal-type { color: var(--accent-primary); background: #293f32; border-color: #4a6352; text-transform: none; letter-spacing: 0; }
.notification-body p, .notification-modal-message { color: var(--text-primary); }
.toast { background: #25342b; border: 1px solid #536d5b; border-radius: 7px; box-shadow: 0 12px 32px #0005; }
.toggle-slider { background: #3d4c42; box-shadow: none; }
input:checked + .toggle-slider { background: #79bd9e; box-shadow: none; }
.landing-page { padding: 0; }
.landing-nav { position: relative; padding: 22px max(6vw, 24px); background: none; border-color: var(--border-color); backdrop-filter: none; flex-direction: row; }
.landing-hero { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; min-height: 610px; padding: 72px max(5vw, 24px); text-align: start; }
.hero-card, .hero-card:hover { max-width: 640px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; backdrop-filter: none; }
.hero-card::before, .hero-glow { display: none; }
.hero-card h1 { font-size: clamp(32px, 3.7vw, 54px); line-height: 1.4; font-weight: 650; letter-spacing: -1px; margin-bottom: 24px; }
.hero-lead { color: var(--text-secondary); font-size: 16px; line-height: 2; margin: 0 0 30px; max-width: 52ch; }
.hero-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.hero-art img { width: min(100%, 355px); aspect-ratio: 1; object-fit: contain; }
.hero-art span { color: #a3b2ae; font-size: 14px; letter-spacing: 2px; direction: ltr; }
.login-note { font-size: 12px; color: var(--text-secondary); margin: 14px 0 0; }
.landing-features { max-width: 1200px; padding: 40px max(3vw, 24px) 64px; margin: 0 auto; }
.section-header { text-align: start; margin-bottom: 28px; }
.section-header h2 { font-size: 24px; margin: 0 0 8px; }
.section-header p { color: var(--text-secondary); font-size: 14px; }
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.feature-card, .feature-card:hover { background: none; border: 0; border-inline-end: 1px solid var(--border-color); padding: 0 26px; border-radius: 0; box-shadow: none; transform: none; text-align: start; }
.feature-card:first-child { padding-inline-start: 0; }
.feature-card:last-child { border-inline-end: 0; }
.feature-icon { background: none; border: 0; width: 32px; height: 32px; margin-bottom: 14px; animation: none; }
.feature-icon i { font-size: 26px; }
.feature-card h3 { font-size: 16px; margin-bottom: 12px; text-align: start; }
.feature-card ul { text-align: start; padding: 0; list-style: none; font-size: 13px; line-height: 2; }
.landing-hook { background: #19221c; padding: 48px 24px; border-color: var(--border-color); }
.landing-hook h2 { font-size: 26px; margin: 0 0 12px; }
.landing-hook p { font-size: 14px; margin-bottom: 22px; }
.landing-footer { padding: 22px 24px; border-color: var(--border-color); font-size: 12px; }
@media (max-width: 1200px) {
    :root { --rail-width: 216px; }
    .container { padding: 28px; }
    .stat-card { padding: 16px; gap: 10px; }
    .stat-value { font-size: 26px; }
    .stat-icon { width: 32px; height: 32px; font-size: 18px; }
    .overview-columns { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); gap: 18px; }
    .stats-section { padding: 18px; }
    .monitoring-layout { flex-direction: column; height: auto; min-height: calc(100dvh - 76px); }
    .monitoring-sidebar { width: 100%; max-height: 320px; }
    .monitoring-feed { min-height: 520px; }
}
@media (max-width: 950px) {
    .overview-columns { grid-template-columns: 1fr; }
    .stats-header { align-items: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card { padding: 18px 20px; }
    .stat-card:nth-child(2) { border-inline-end: 0; }
    .stat-card:nth-child(-n + 2) { border-bottom: 1px solid var(--border-color); }
    .workspace-note { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .landing-hero { gap: 24px; min-height: 520px; }
    .hero-art img { width: 260px; }
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; }
    .feature-card:nth-child(2) { border-inline-end: 0; }
    .feature-card:nth-child(3) { padding-inline-start: 0; }
}
@media (max-width: 680px) {
    body.has-sidebar, html[dir="rtl"] body.has-sidebar,
    body.has-sidebar.sidebar-collapsed, html[dir="rtl"] body.has-sidebar.sidebar-collapsed { padding: 64px 0 0; }
    .navbar { height: 64px; padding: 0 18px; }
    .navbar-content { gap: 12px; }
    .brand-logo { width: 32px; height: 32px; }
    .brand-wordmark { font-size: 17px; }
    .workspace-context { padding-inline-start: 14px; font-size: 12px; margin-inline-start: auto; }
    .workspace-context > span, .workspace-context i { display: none; }
    .sidebar, html[dir="rtl"] .sidebar { position: relative; top: auto; left: auto; right: auto; width: 100%; height: auto; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--border-color); gap: 12px; }
    .sidebar-heading, .sidebar-toggle { display: none; }
    .sidebar-links { flex-direction: row; flex-wrap: wrap; gap: 5px; }
    .sidebar-links li { width: auto; }
    .sidebar-links a { font-size: 12px; padding: 8px 10px; gap: 6px; }
    .sidebar-links a i, .sidebar-links a svg { width: 16px; height: 16px; font-size: 16px; }
    .sidebar-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; padding-top: 12px; gap: 10px; }
    .sidebar-actions .user-info { margin-inline-end: auto; padding: 0; }
    .user-avatar { width: 26px; height: 26px; }
    .user-name { max-width: 105px; font-size: 12px; }
    .language-switcher label { display: none; }
    .sidebar.collapsed, html[dir="rtl"] .sidebar.collapsed { width: 100%; align-items: stretch; padding: 14px 18px; }
    .sidebar.collapsed .sidebar-links, .sidebar.collapsed .sidebar-actions { display: flex; }
    .container { padding: 26px 18px 36px; }
    .page-title { font-size: 24px; }
    .page-description { font-size: 13px; }
    .stats-header, .page-heading { flex-direction: column; gap: 18px; margin-bottom: 24px; }
    .stats-grid { margin-bottom: 20px; }
    .stat-card { padding: 16px 12px; }
    .stat-value { font-size: 24px; }
    .stat-label { font-size: 11px; }
    .stats-section { padding: 18px 14px; }
    .registered-user-name { flex-wrap: wrap; white-space: normal; overflow-wrap: anywhere; }
    .registered-user-card { grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 10px; }
    .registered-user-avatar-wrap, .registered-user-avatar-wrap.online { width: 36px; height: 36px; }
    .registered-user-meta { max-width: 90px; }
    .card-header, .card-body, .sidebar-header, .feed-header { padding: 18px; }
    .monitoring-layout { padding: 20px 14px; gap: 16px; }
    .feed-filters { width: 100%; }
    .feed-filters select { min-width: 0; flex: 1 1 120px; }
    .feed-content { padding: 12px; }
    .discord-message { padding: 12px; gap: 10px; }
    .discord-avatar { width: 32px; height: 32px; }
    .discord-display-name { font-size: 14px; }
    .servers-grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; }
    .modal { max-width: calc(100vw - 28px); }
    .landing-nav { padding: 18px; gap: 10px; }
    .landing-nav .btn { font-size: 12px; }
    .landing-hero { grid-template-columns: 1fr; padding: 40px 24px; gap: 32px; }
    .hero-art { grid-row: 1; gap: 12px; }
    .hero-art img { width: 180px; }
    .hero-art span { display: none; }
    .hero-card h1 { font-size: 34px; letter-spacing: -.5px; }
    .hero-lead { font-size: 14px; }
    .landing-features { padding: 24px 24px 40px; }
    .feature-card { padding: 0 18px; }
    .feature-card h3 { font-size: 14px; }
    .feature-card ul { font-size: 12px; }
    .section-header h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
