/* ========================================
   AmneziaVPN Web Panel — Design System
   ======================================== */

/* Google Font */
/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); */

/* ===== CSS Variables / Tokens ===== */
:root {
    /* Color palette — pure monochrome (black & white), white accent */
    --bg-primary: #000000;
    --bg-secondary: #0b0b0b;
    --bg-card: #141414;
    --bg-card-hover: #1e1e1e;
    --bg-input: rgba(255, 255, 255, 0.04);
    --bg-modal: rgba(0, 0, 0, 0.92);

    --border-color: rgba(255, 255, 255, 0.10);
    --border-hover: rgba(255, 255, 255, 0.24);
    --border-focus: rgba(255, 255, 255, 0.65);

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6e6e6e;
    --text-accent: #ffffff;

    --accent: #ffffff;
    --accent-light: #ffffff;
    --accent-dark: #cfcfcf;
    --accent-glow: rgba(255, 255, 255, 0.18);
    --accent-gradient: linear-gradient(135deg, #ffffff, #8a8a8a);

    /* Status colours stay chromatic on purpose. Everything else in this theme
       is monochrome, so green/red/amber are the *only* channel left that says
       whether a thing is healthy, broken or pending. Flattening these to white
       made an online server and a dead one render as the same white dot. */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-border: rgba(34, 197, 94, 0.25);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.25);

    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);

    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.12);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f2;
    --bg-card: #ffffff;
    --bg-card-hover: #f6f6f6;
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-modal: rgba(255, 255, 255, 0.92);

    --border-color: rgba(0, 0, 0, 0.12);
    --border-hover: rgba(0, 0, 0, 0.28);
    --border-focus: rgba(0, 0, 0, 0.6);

    --text-primary: #000000;
    --text-secondary: #444444;
    --text-muted: #8a8a8a;
    --text-accent: #000000;

    --accent: #000000;
    --accent-light: #222222;
    --accent-dark: #000000;
    --accent-glow: rgba(0, 0, 0, 0.12);
    --accent-gradient: linear-gradient(135deg, #000000, #555555);

    /* Same reasoning as the dark theme: status keeps its colour. */
    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.08);
    --success-border: rgba(22, 163, 74, 0.2);

    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.06);
    --danger-border: rgba(220, 38, 38, 0.15);

    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.08);

    --info: #2563eb;
    --info-bg: rgba(37, 99, 235, 0.06);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 600px 400px at 20% 10%, rgba(0, 0, 0, 0.03), transparent),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(0, 0, 0, 0.02), transparent),
        radial-gradient(ellipse 800px 300px at 50% 50%, rgba(0, 0, 0, 0.02), transparent);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, #000000, #555555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header-nav {
    background: #ffffff;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(15deg);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated mesh gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 10%, rgba(111, 111, 111, 0.08), transparent),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(113, 113, 113, 0.06), transparent),
        radial-gradient(ellipse 800px 300px at 50% 50%, rgba(83, 83, 83, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

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

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

::selection {
    background: rgba(113, 113, 113, 0.3);
    color: #fff;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(113, 113, 113, 0.3);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(113, 113, 113, 0.5);
}

/* ===== Layout ===== */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
}

/* ===== Header ===== */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f0f0f5, #999999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(113, 113, 113, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(113, 113, 113, 0.4);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.btn-danger:hover {
    background: rgba(104, 104, 104, 0.2);
}

.btn-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
}

.card-hover:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* ===== Section ===== */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title .icon {
    font-size: 1.3rem;
}

/* ===== Server Card ===== */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.server-card {
    position: relative;
    cursor: grab;
}

.server-card:active {
    cursor: grabbing;
}

/* While being dragged: dim the card so the user sees their selection. */
.server-card.dragging {
    opacity: 0.45;
    cursor: grabbing;
}

/* Drop target hint: highlighted border + slight lift. */
.server-card.drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(113, 113, 113, 0.25);
    transform: translateY(-2px);
}

/* Ping indicator dot to the left of the server name. */
.ping-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    background: #888;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.ping-dot.ping-pending {
    background: #a1a1a1;
    animation: ping-pulse 1.2s ease-in-out infinite;
}

.ping-dot.ping-ok {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.55);
}

.ping-dot.ping-fail {
    background: var(--danger);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.55);
}

.ping-ms {
    font-size: 0.72rem;
    margin-left: 6px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    /* The value is written as "824 ms"; without this the number and its unit
       break across two lines whenever the server name fills the row. */
    white-space: nowrap;
}

@keyframes ping-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

.server-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(113, 113, 113, 0.2);
}

.server-card .server-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.server-card .server-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.server-card .server-host {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.server-card .server-protocols {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.server-card .server-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

/* ===== Badge ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(123, 123, 123, 0.25);
}

.badge-warn {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(166, 166, 166, 0.25);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

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

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8ba0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-base);
}

.modal-backdrop.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-footer {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

/* ===== Protocol Card ===== */
.protocol-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.protocol-card {
    position: relative;
    overflow: hidden;
}

.protocol-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.protocol-card:hover::before {
    opacity: 1;
}

.protocol-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
}

.protocol-awg .protocol-icon {
    background: linear-gradient(135deg, rgba(113, 113, 113, 0.2), rgba(111, 111, 111, 0.1));
    color: var(--accent-light);
}

.protocol-legacy .protocol-icon {
    background: linear-gradient(135deg, rgba(123, 123, 123, 0.2), rgba(111, 111, 111, 0.1));
    color: var(--info);
}

.protocol-xray .protocol-icon {
    background: linear-gradient(135deg, rgba(104, 104, 104, 0.2), rgba(166, 166, 166, 0.1));
    color: var(--warning);
}

.protocol-telemt .protocol-icon {
    background: linear-gradient(135deg, rgba(123, 123, 123, 0.2), rgba(145, 145, 145, 0.1));
    color: #a5a5a5;
}

.protocol-dns .protocol-icon {
    background: linear-gradient(135deg, rgba(155, 155, 155, 0.2), rgba(145, 145, 145, 0.1));
    color: var(--success);
}

.protocol-wireguard .protocol-icon {
    background: linear-gradient(135deg, rgba(145, 145, 145, 0.2), rgba(173, 173, 173, 0.1));
    color: #919191;
}

.protocol-adguard .protocol-icon {
    background: linear-gradient(135deg, rgba(155, 155, 155, 0.2), rgba(176, 176, 176, 0.1));
    color: #8b8b8b;
}

.protocol-socks5 .protocol-icon {
    background: linear-gradient(135deg, rgba(114, 114, 114, 0.2), rgba(113, 113, 113, 0.1));
    color: #999999;
}

.protocol-nginx .protocol-icon {
    background: linear-gradient(135deg, rgba(138, 138, 138, 0.2), rgba(123, 123, 123, 0.1));
    color: #a5a5a5;
}

/* ============================================================
   Promo blocks — locked teasers for not-yet-shipped features.
   They live inside .protocol-cards (a CSS grid) and span every
   column via `grid-column: 1 / -1`, so they always stretch the
   full width without hard-coding the column count.
   ============================================================ */
.promo-block {
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    padding: 22px 28px;
    border-radius: var(--radius-lg);
    color: #fff;
    cursor: not-allowed;
    isolation: isolate; /* keep blend modes / blurred orbs from leaking out */
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    user-select: none;
}

.promo-block:hover {
    transform: translateY(-2px);
}

/* Slow shimmer that sweeps diagonally across the block — pure CSS, no JS. */
.promo-block::after {
    content: "";
    position: absolute;
    inset: -50% -10%;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: promo-shimmer 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes promo-shimmer {
    0%, 20%   { transform: translateX(-100%); }
    50%, 70%  { transform: translateX(100%); }
    100%      { transform: translateX(100%); }
}

/* Floating blurred orbs that drift in the background. */
.promo-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.promo-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.55;
    animation: promo-orb-drift 14s ease-in-out infinite;
}

.promo-orb:nth-child(1) { top: -40px;   left: 8%;   width: 220px; height: 220px; animation-delay: 0s; }
.promo-orb:nth-child(2) { bottom: -60px; left: 38%; width: 180px; height: 180px; animation-delay: -5s; }
.promo-orb:nth-child(3) { top: 10%;     right: 8%;  width: 200px; height: 200px; animation-delay: -9s; }

@keyframes promo-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(20px, -16px) scale(1.12); }
    66%      { transform: translate(-12px, 14px) scale(0.92); }
}

.promo-lock-badge {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}

.promo-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.promo-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: promo-icon-float 4.5s ease-in-out infinite;
}

@keyframes promo-icon-float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50%      { transform: translateY(-3px) rotate(2deg); }
}

.promo-text {
    flex: 1;
    min-width: 0;
}

.promo-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.promo-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    max-width: 70ch;
}

.promo-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    pointer-events: auto; /* block-level cursor:not-allowed shouldn't kill the CTA link */
}

.promo-cta:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
}

/* ----- Theme: AIVPN (purple/cyan, neural feel) ----- */
.promo-aivpn {
    background:
        radial-gradient(circle at 20% 0%, rgba(111, 111, 111, 0.6), transparent 60%),
        radial-gradient(circle at 80% 100%, rgba(113, 113, 113, 0.5), transparent 55%),
        linear-gradient(135deg, #353535 0%, #434343 50%, #404040 100%);
    box-shadow: 0 16px 40px -10px rgba(67, 67, 67, 0.5);
}

.promo-aivpn .promo-orb:nth-child(1) { background: #939393; }
.promo-aivpn .promo-orb:nth-child(2) { background: #717171; }
.promo-aivpn .promo-orb:nth-child(3) { background: #6f6f6f; }

.promo-aivpn .promo-icon {
    background: linear-gradient(135deg, rgba(111, 111, 111, 0.5), rgba(113, 113, 113, 0.4));
    text-shadow: 0 0 16px rgba(114, 114, 114, 0.6);
}

/* ----- Theme: Reverse Proxy (amber/red, shield/firewall feel) ----- */
.promo-revproxy {
    background:
        radial-gradient(circle at 100% 0%, rgba(162, 162, 162, 0.55), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(104, 104, 104, 0.45), transparent 55%),
        linear-gradient(135deg, #3c3c3c 0%, #3d3d3d 45%, #373737 100%);
    box-shadow: 0 16px 40px -10px rgba(61, 61, 61, 0.5);
}

.promo-revproxy .promo-orb:nth-child(1) { background: #a2a2a2; }
.promo-revproxy .promo-orb:nth-child(2) { background: #686868; }
.promo-revproxy .promo-orb:nth-child(3) { background: #a6a6a6; }

.promo-revproxy .promo-icon {
    background: linear-gradient(135deg, rgba(162, 162, 162, 0.5), rgba(104, 104, 104, 0.4));
    text-shadow: 0 0 16px rgba(162, 162, 162, 0.55);
}

/* Faint isometric grid overlay — gives the reverse-proxy block a "network" feel.
   Uses a tiled SVG-less approach via repeating linear gradients to keep CSS-only. */
.promo-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    animation: promo-grid-pan 20s linear infinite;
}

@keyframes promo-grid-pan {
    from { background-position: 0 0; }
    to   { background-position: 56px 56px; }
}

/* ----- Responsive: stack content on narrow screens ----- */
@media (max-width: 720px) {
    .promo-content { gap: 14px; }
    .promo-cta { width: 100%; justify-content: center; margin-left: 0; }
    .promo-subtitle { font-size: 0.82rem; }
}

/* Respect users who turn off motion. */
@media (prefers-reduced-motion: reduce) {
    .promo-block::after,
    .promo-orb,
    .promo-icon,
    .promo-grid-bg {
        animation: none !important;
    }
}

.protocol-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.protocol-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.protocol-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.protocol-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.protocol-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.protocol-info-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.protocol-info-value {
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== Clients Table ===== */
.clients-section {
    margin-top: var(--space-xl);
}

.clients-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.client-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.client-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}

.client-avatar.avatar-online {
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px #22c55e;
}

.client-avatar.avatar-online::after {
    content: '';
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-card);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.status-online { background: rgba(34, 197, 94, 0.15); color: #16a34a; }
.status-idle { background: rgba(234, 179, 8, 0.15); color: #ca8a04; }
.status-stale { background: rgba(249, 115, 22, 0.15); color: #ea580c; }
.status-dead { background: rgba(113, 113, 122, 0.15); color: #71717a; }
.status-disabled { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.status-unmatched { background: rgba(99, 102, 241, 0.15); color: #4f46e5; }

.conn-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0 6px;
}
.conn-filters .form-select,
.conn-filters .form-input {
    width: auto;
    min-width: 120px;
    font-size: 0.8rem;
    padding: 4px 8px;
}
.conn-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 8px;
}
.conn-sparkline {
    color: var(--accent, #737373);
    vertical-align: middle;
}
.xray-stats-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.35);
    font-size: 0.85rem;
}
.diag-pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--bg-primary);
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    max-height: 360px;
    overflow: auto;
}

.client-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.client-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    gap: var(--space-md);
    margin-top: 2px;
    flex-wrap: wrap;
    align-items: center;
}

.client-actions {
    display: flex;
    align-items: center;
    /* Wrapped rows line up with the row above instead of trailing off to the
       left. The width stays at 140px: server.html forces `flex-wrap: nowrap`
       on this same class, so narrowing it there would squeeze the fixed 36px
       buttons instead of rewrapping them. The user cards in users.html carry
       their own inline max-width and are unaffected either way. */
    justify-content: flex-end;
    gap: var(--space-sm);
    flex-shrink: 0;
    margin-left: var(--space-md);
    flex-wrap: wrap;
    max-width: 140px;
}

/* ===== Config Display ===== */
.config-display {
    position: relative;
    margin-top: var(--space-md);
}

.config-text {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
}

.config-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 400px;
}

.toast-success {
    background: #212121;
    border: 1px solid var(--success-border);
    color: var(--success);
}

.toast-error {
    background: #181818;
    border: 1px solid var(--danger-border);
    color: var(--danger);
}

.toast-info {
    background: #191919;
    border: 1px solid rgba(123, 123, 123, 0.25);
    color: var(--info);
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Progress / Loading ===== */
.progress-bar {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-md) 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-40px);
    }

    100% {
        transform: translateX(40px);
    }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-3xl) 0;
    color: var(--text-muted);
}

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

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

/* ===== Log Output ===== */
.log-output {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.8;
    max-height: 250px;
    overflow-y: auto;
    color: var(--text-muted);
}

.log-line {
    padding: 2px 0;
}

.log-line.success {
    color: var(--success);
}

.log-line.error {
    color: var(--danger);
}

.log-line.info {
    color: var(--text-secondary);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state .empty-desc {
    font-size: 0.88rem;
    max-width: 360px;
    margin: 0 auto var(--space-lg);
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: var(--space-lg);
}

.tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-align: center;
}

.tab:hover {
    color: var(--text-secondary);
}

.tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ===== Back Link ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--text-primary);
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-lg) 0;
}

/* ===== Utility ===== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.82rem;
}

.font-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.hidden {
    display: none !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .app-container {
        padding: var(--space-md) var(--space-md);
    }

    .server-grid {
        grid-template-columns: 1fr;
    }

    .protocol-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        padding: var(--space-lg);
    }

    .app-header {
        flex-wrap: wrap;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .protocol-info {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Server Stats (inline pills) ===== */
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: default;
    transition: all var(--transition-fast);
}

.stat-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ===== Config Tabs ===== */
.config-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: var(--space-md);
}

.config-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.config-tab:hover {
    color: var(--text-secondary);
}

.config-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.config-panel {
    display: none;
}

.config-panel.active {
    display: block;
}

/* ===== QR Code ===== */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
}

.qr-container canvas {
    border-radius: var(--radius-md);
    box-shadow: 0 0 30px rgba(113, 113, 113, 0.15);
}

.qr-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== VPN Link ===== */
.vpn-link-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--accent-light);
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    user-select: all;
}

/* ===== Traffic Badge ===== */
.traffic-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.traffic-down {
    background: rgba(155, 155, 155, 0.1);
    color: #9b9b9b;
    border: 1px solid rgba(155, 155, 155, 0.2);
}

.traffic-up {
    background: rgba(123, 123, 123, 0.1);
    color: #7b7b7b;
    border: 1px solid rgba(123, 123, 123, 0.2);
}

/* ===== Header Navigation ===== */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 5px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(113, 113, 113, 0.08);
}

.nav-link.active {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 4px 12px rgba(113, 113, 113, 0.3);
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-left: var(--space-lg);
    border-left: 1px solid var(--border-color);
    margin-left: var(--space-sm);
    transition: border-color var(--transition-base);
}

/* Global Transition for Theme Switching */
body,
.card,
.app-header,
.header-nav,
.nav-link,
.btn,
.form-input,
.form-select,
.modal,
.modal-backdrop,
.nav-user {
    transition: background-color var(--transition-slow),
        border-color var(--transition-slow),
        color var(--transition-slow),
        box-shadow var(--transition-slow),
        transform var(--transition-base);
}

.nav-username {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

.nav-user .badge {
    padding: 2px 10px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.nav-user .btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

@media (max-width: 900px) {
    .header-nav {
        gap: 2px;
        padding: 4px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }

    .header-nav {
        border-radius: var(--radius-md);
        justify-content: center;
    }

    .nav-user {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
        padding-top: var(--space-sm);
        border-top: 1px solid var(--border-color);
        justify-content: center;
    }
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.badge-warn {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(166, 166, 166, 0.25);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(123, 123, 123, 0.25);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Additional layout helpers */
.hidden {
    display: none !important;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}
/* ============================================================
   MONOCHROME (BLACK & WHITE) OVERRIDES
   Нейтрализуют оставшиеся захардкоженные фиолетовые/цветные
   значения, чтобы вся панель была строго чёрно-белой.
   Работают для обеих тем (тёмной и светлой).
   ============================================================ */

/* Фоновое свечение страницы -> нейтральный серый */
body::before {
    background:
        radial-gradient(ellipse 600px 400px at 20% 10%, rgba(255, 255, 255, 0.05), transparent),
        radial-gradient(ellipse 500px 500px at 80% 80%, rgba(255, 255, 255, 0.035), transparent),
        radial-gradient(ellipse 800px 300px at 50% 50%, rgba(255, 255, 255, 0.025), transparent);
}

/* Выделение текста */
::selection {
    background: rgba(255, 255, 255, 0.30);
    color: #000;
}
[data-theme="light"] ::selection {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}

/* Скроллбар */
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.28);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Логотип-градиент */
.logo-text {
    background: linear-gradient(135deg, #ffffff, #9a9a9a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .logo-text {
    background: linear-gradient(135deg, #000000, #555555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Кнопка-основная: белая на чёрном (тёмная тема), чёрная на белом (светлая) */
.btn-primary {
    color: #000;
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.18);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.28);
}
[data-theme="light"] .btn-primary {
    color: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Опасные (delete) кнопки — отличаем не цветом, а обводкой */
.btn-danger {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--danger-border);
}
.btn-danger:hover {
    background: var(--danger-bg);
    border-color: var(--text-primary);
}

/* Drag-over / фокус-подсветки карточек */
.server-card.drag-over {
    box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(255, 255, 255, 0.20);
}

/* Иконки протоколов -> монохром.
   xray и dns тонировались через --warning/--success. Эти переменные снова
   цветные (нужны для статусов), поэтому протокольные плитки перечислены здесь
   явно — иначе xray стал бы янтарным, а dns зелёным при белых остальных. */
.protocol-awg .protocol-icon,
.protocol-legacy .protocol-icon,
.protocol-xray .protocol-icon,
.protocol-dns .protocol-icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    color: var(--text-primary);
}
[data-theme="light"] .protocol-awg .protocol-icon,
[data-theme="light"] .protocol-legacy .protocol-icon,
[data-theme="light"] .protocol-xray .protocol-icon,
[data-theme="light"] .protocol-dns .protocol-icon {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.05));
    color: var(--text-primary);
}

/* QR-код: нейтральное свечение */
.qr-container canvas {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.12);
}

/* Трафик вверх/вниз: серые тона вместо зелёного/синего */
.traffic-down {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
}
.traffic-up {
    background: rgba(255, 255, 255, 0.06);
    color: #b8b8b8;
}
[data-theme="light"] .traffic-down {
    background: rgba(0, 0, 0, 0.10);
    color: #000000;
}
[data-theme="light"] .traffic-up {
    background: rgba(0, 0, 0, 0.05);
    color: #555555;
}

/* Навигация */
.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}
.nav-link.active {
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.18);
}
[data-theme="light"] .nav-link:hover {
    background: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .nav-link.active {
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Промо-карточки -> оттенки серого (две темы различаются светлостью) */
.promo-aivpn {
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
        radial-gradient(circle at 80% 100%, rgba(255, 255, 255, 0.10), transparent 55%),
        linear-gradient(135deg, #1a1a1a 0%, #333333 50%, #0d0d0d 100%);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
}
.promo-revproxy {
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.08), transparent 55%),
        linear-gradient(135deg, #2b2b2b 0%, #4a4a4a 45%, #1a1a1a 100%);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
}
.promo-aivpn .promo-orb:nth-child(1) { background: #ffffff; }
.promo-aivpn .promo-orb:nth-child(2) { background: #c9c9c9; }
.promo-aivpn .promo-orb:nth-child(3) { background: #8f8f8f; }
.promo-revproxy .promo-orb:nth-child(1) { background: #ffffff; }
.promo-revproxy .promo-orb:nth-child(2) { background: #c9c9c9; }
.promo-revproxy .promo-orb:nth-child(3) { background: #8f8f8f; }
.promo-aivpn .promo-icon,
.promo-revproxy .promo-icon {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.15));
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

/* ============================================================
   ===== Mobile refinements (added for phone use) =====
   Everything below lives ONLY inside max-width media queries so
   desktop (screens wider than 720px) renders exactly as before.
   Base/global rules are never modified — where a base rule needs
   overriding on mobile it is overridden here, inside the query.
   Breakpoints: 720px (tablets/large phones) and 480px (phones).
   ============================================================ */

/* ----- Phones & large phones (<= 720px) ----- */
@media (max-width: 720px) {

    /* --- Header / top nav: wrap instead of overflowing, keep taps big --- */
    .header-nav {
        flex-wrap: wrap;          /* nav links wrap onto a new line instead of overflowing */
    }

    .nav-user {
        flex-wrap: wrap;          /* username / badge / logout wrap instead of overflowing */
        gap: var(--space-sm);
    }

    .nav-link {
        padding: 10px 16px;       /* ~40px tall tap target */
        min-height: 40px;
    }

    .nav-user .btn {
        min-height: 40px;         /* logout etc. stay tappable */
    }

    /* --- .client-item cards (users.html + connection rows): stack --- */
    /* info block sits above the action-button cluster instead of squeezing beside it */
    .client-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }

    .client-actions {
        /* override the desktop/inline max-width:140px & flex-end so buttons
           lay out full-width and don't get cut off on a narrow screen */
        max-width: none !important;
        width: 100%;
        margin-left: 0;
        justify-content: flex-start !important;
        row-gap: var(--space-sm);
    }

    /* Bigger, easier-to-tap icon action buttons (✏️ 🔗 📤 🗑 …) */
    .client-actions .btn-icon {
        width: 40px;
        height: 40px;
    }

    /* --- Modals: near full-width, form/inputs usable, internal scroll --- */
    .modal {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;         /* long forms/config scroll inside the modal, not the page */
        padding: var(--space-lg);
    }

    /* Config modal: QR + config text must fit inside the viewport */
    .qr-container {
        padding: var(--space-md);
    }

    .qr-container canvas,
    .qr-container img {
        max-width: 100%;
        height: auto;             /* keep the QR square while capping its width */
    }

    /* Config / VPN-key text blocks scroll inside their own box (base already
       sets word-break + overflow); just trim height so the modal isn't huge */
    .config-text {
        max-height: 240px;
    }

    .vpn-link-box {
        max-height: 160px;
    }

    /* --- Collapse any remaining 2-column grids to a single column --- */
    .protocol-info {
        grid-template-columns: 1fr;
    }

    /* --- Trim large paddings so content isn't cramped --- */
    .card {
        padding: var(--space-md);
    }

    /* Section / list headers wrap their trailing buttons instead of overflowing */
    .clients-header,
    .card-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
}

/* ----- Small phones (<= 480px) ----- */
@media (max-width: 480px) {

    /* Tighter page gutters on very narrow screens */
    .app-container {
        padding: var(--space-md) var(--space-sm);
    }

    .modal {
        padding: var(--space-md);
    }

    /* Slightly smaller section titles so they don't wrap awkwardly */
    .section-title {
        font-size: 1.25rem;
    }

    /* Icon buttons in the header stay comfortably tappable */
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
}

/* ============================================================
   ===== Mobile fix pass 2: kill horizontal scroll + fit modals =====
   Targets the two reported phone issues (horizontal overflow &
   modals not fitting). Everything stays inside max-width queries,
   so desktop (>720px) is completely unchanged.
   ============================================================ */
@media (max-width: 720px) {

    /* 1) Kill horizontal scroll at the ROOT — body alone wasn't enough. */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* 2) Long unbreakable strings (VPN links, public keys, config text)
          must wrap instead of pushing the page/modal wider than the screen. */
    .config-text, .vpn-link-box, code, pre,
    #configText, #vpnLinkText {
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: pre-wrap;
        max-width: 100%;
    }
    /* Readonly inputs with long links scroll inside themselves, not the page. */
    .modal .form-input,
    .modal input[readonly] {
        max-width: 100%;
    }

    /* 3) Chips / tabs / meta may wrap rather than forcing width via nowrap. */
    .stat-pill,
    .client-meta,
    .client-meta span,
    .badge {
        white-space: normal;
    }
    .config-tabs {
        flex-wrap: wrap;
    }
    .config-tab {
        white-space: normal;
    }

    /* 4) Images / QR never exceed the available width. */
    img, canvas, svg {
        max-width: 100%;
        height: auto;
    }

    /* 5) Modals: fit fully inside the viewport; wide children scroll/stack
          inside instead of overflowing the screen. */
    .modal {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: 92vh;
        overflow: auto;
        padding: var(--space-md);
    }
    /* Multi-column grids inside modals (limit+strategy, date/time/button)
       collapse to one column. !important is needed to beat the INLINE
       grid-template-columns set in the edit-user modal markup. */
    .modal .grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   ===== Mobile fix pass 3: page-level inline grids =====
   The users grid (#usersGrid, inline "1fr 1fr") and the settings
   page grid (inline "minmax(400px, 1fr)") are declared as INLINE
   styles in the templates, so the pass-2 modal rule never reached
   them — on phones they forced 2 columns / 400px-min columns and
   pushed the page past the right edge. Collapse EVERY inline
   multi-column grid to a single column on phones; !important is
   required to beat the inline styles. Desktop (>720px) untouched.
   ============================================================ */
@media (max-width: 720px) {
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    /* Grid children default to min-width:auto, which lets long text
       (keys, URLs, "MULTICOLORCAPTCHA" labels) force the track wider
       than the screen — allow them to shrink instead. */
    [style*="grid-template-columns"] > * {
        min-width: 0;
    }
}

/* ============================================================
   ===== SVG icon system (replaces emoji UI icons) =====
   Monochrome stroke icons (feather/lucide style) rendered via
   CSS mask + currentColor, so they inherit text color and adapt
   to light/dark theme. Usage: <span class="ico ico-name"></span>
   ============================================================ */
.ico {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -0.2em;
    background-color: currentColor;
    -webkit-mask: var(--i) no-repeat center / contain;
    mask: var(--i) no-repeat center / contain;
}

/* Keep outline icons clearly visible against the near-black interface.

   Every glyph is pinned to a flat white here, deliberately and with
   `!important`. Letting it follow `currentColor` meant an icon disappeared
   whenever its container resolved to a dark colour, which is the failure this
   panel keeps hitting: the button outline renders, the glyph does not, and the
   control looks like an empty box. Visibility beats nuance — a state that
   needs signalling is carried by the row's own opacity, not by the icon.

   The selector is `:not([data-theme="light"])` rather than `[data-theme="dark"]`
   so it still applies if the attribute is missing or set to anything else. */
:root:not([data-theme="light"]) .ico {
    background-color: #ffffff !important;
    opacity: 1;
}

[data-theme="light"] .ico {
    background-color: #000000 !important;
    opacity: 1;
}

/* Action controls need a bright outline too; their previous 10% border was
   nearly invisible on the black cards even when the glyph itself was white. */
:root[data-theme="dark"] .btn-icon {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
    background-color: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .btn-icon:hover {
    border-color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.14);
}

/* Icons in headings and nav get the accent color / tuned sizing */
.section-title .ico,
.card-title .ico,
.modal-title .ico {
    color: var(--accent);
    vertical-align: -0.15em;
}

.nav-link .ico {
    width: 1em;
    height: 1em;
    margin-right: 7px;
    opacity: 0.85;
    vertical-align: -0.15em;
}

.server-icon .ico,
.client-avatar .ico,
.empty-icon .ico,
.logo-icon .ico {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.btn .ico {
    width: 1.05em;
    height: 1.05em;
}

.stat-pill .ico {
    width: 1.2em;
    height: 1.2em;
    opacity: 0.8;
}

.ico-server { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222%22 y=%222%22 width=%2220%22 height=%228%22 rx=%222%22 ry=%222%22/%3E%3Crect x=%222%22 y=%2214%22 width=%2220%22 height=%228%22 rx=%222%22 ry=%222%22/%3E%3Cline x1=%226%22 y1=%226%22 x2=%226.01%22 y2=%226%22/%3E%3Cline x1=%226%22 y1=%2218%22 x2=%226.01%22 y2=%2218%22/%3E%3C/svg%3E"); }
.ico-monitor { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222%22 y=%223%22 width=%2220%22 height=%2214%22 rx=%222%22 ry=%222%22/%3E%3Cline x1=%228%22 y1=%2221%22 x2=%2216%22 y2=%2221%22/%3E%3Cline x1=%2212%22 y1=%2217%22 x2=%2212%22 y2=%2221%22/%3E%3C/svg%3E"); }
.ico-users { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%229%22 cy=%227%22 r=%224%22/%3E%3Cpath d=%22M23 21v-2a4 4 0 0 0-3-3.87%22/%3E%3Cpath d=%22M16 3.13a4 4 0 0 1 0 7.75%22/%3E%3C/svg%3E"); }
.ico-user { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%2212%22 cy=%227%22 r=%224%22/%3E%3C/svg%3E"); }
.ico-user-plus { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2%22/%3E%3Ccircle cx=%228.5%22 cy=%227%22 r=%224%22/%3E%3Cline x1=%2220%22 y1=%228%22 x2=%2220%22 y2=%2214%22/%3E%3Cline x1=%2223%22 y1=%2211%22 x2=%2217%22 y2=%2211%22/%3E%3C/svg%3E"); }
.ico-settings { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223%22/%3E%3Cpath d=%22M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z%22/%3E%3C/svg%3E"); }
.ico-link { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71%22/%3E%3Cpath d=%22M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71%22/%3E%3C/svg%3E"); }
.ico-search { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%228%22/%3E%3Cpath d=%22m21 21-4.3-4.3%22/%3E%3C/svg%3E"); }
.ico-edit { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z%22/%3E%3C/svg%3E"); }
.ico-trash { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolyline points=%223 6 5 6 21 6%22/%3E%3Cpath d=%22M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2%22/%3E%3Cline x1=%2210%22 y1=%2211%22 x2=%2210%22 y2=%2217%22/%3E%3Cline x1=%2214%22 y1=%2211%22 x2=%2214%22 y2=%2217%22/%3E%3C/svg%3E"); }
.ico-send { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cline x1=%2222%22 y1=%222%22 x2=%2211%22 y2=%2213%22/%3E%3Cpolygon points=%2222 2 15 22 11 13 2 9 22 2%22/%3E%3C/svg%3E"); }
.ico-share { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2218%22 cy=%225%22 r=%223%22/%3E%3Ccircle cx=%226%22 cy=%2212%22 r=%223%22/%3E%3Ccircle cx=%2218%22 cy=%2219%22 r=%223%22/%3E%3Cline x1=%228.59%22 y1=%2213.51%22 x2=%2215.42%22 y2=%2217.49%22/%3E%3Cline x1=%2215.41%22 y1=%226.51%22 x2=%228.59%22 y2=%2210.49%22/%3E%3C/svg%3E"); }
.ico-power { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M18.36 6.64a9 9 0 1 1-12.73 0%22/%3E%3Cline x1=%2212%22 y1=%222%22 x2=%2212%22 y2=%2212%22/%3E%3C/svg%3E"); }
.ico-palette { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2213.5%22 cy=%226.5%22 r=%22.5%22/%3E%3Ccircle cx=%2217.5%22 cy=%2210.5%22 r=%22.5%22/%3E%3Ccircle cx=%228.5%22 cy=%227.5%22 r=%22.5%22/%3E%3Ccircle cx=%226.5%22 cy=%2212.5%22 r=%22.5%22/%3E%3Cpath d=%22M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z%22/%3E%3C/svg%3E"); }
.ico-shield { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z%22/%3E%3C/svg%3E"); }
.ico-bot { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 8V4H8%22/%3E%3Crect width=%2216%22 height=%2212%22 x=%224%22 y=%228%22 rx=%222%22/%3E%3Cpath d=%22M2 14h2%22/%3E%3Cpath d=%22M20 14h2%22/%3E%3Cpath d=%22M15 13v2%22/%3E%3Cpath d=%22M9 13v2%22/%3E%3C/svg%3E"); }
.ico-plug { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 22v-5%22/%3E%3Cpath d=%22M9 8V2%22/%3E%3Cpath d=%22M15 8V2%22/%3E%3Cpath d=%22M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z%22/%3E%3C/svg%3E"); }
.ico-globe { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22/%3E%3Cline x1=%222%22 y1=%2212%22 x2=%2222%22 y2=%2212%22/%3E%3Cpath d=%22M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z%22/%3E%3C/svg%3E"); }
.ico-lock { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%2211%22 width=%2218%22 height=%2211%22 rx=%222%22 ry=%222%22/%3E%3Cpath d=%22M7 11V7a5 5 0 0 1 10 0v4%22/%3E%3C/svg%3E"); }
.ico-book { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z%22/%3E%3Cpath d=%22M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z%22/%3E%3C/svg%3E"); }
.ico-file-text { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z%22/%3E%3Cpolyline points=%2214 2 14 8 20 8%22/%3E%3Cline x1=%2216%22 y1=%2213%22 x2=%228%22 y2=%2213%22/%3E%3Cline x1=%2216%22 y1=%2217%22 x2=%228%22 y2=%2217%22/%3E%3Cpolyline points=%2210 9 9 9 8 9%22/%3E%3C/svg%3E"); }
.ico-cart { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%2221%22 r=%221%22/%3E%3Ccircle cx=%2220%22 cy=%2221%22 r=%221%22/%3E%3Cpath d=%22M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6%22/%3E%3C/svg%3E"); }
.ico-zap { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%2213 2 3 14 12 14 11 22 21 10 12 10 13 2%22/%3E%3C/svg%3E"); }
.ico-memory { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 19v-3%22/%3E%3Cpath d=%22M10 19v-3%22/%3E%3Cpath d=%22M14 19v-3%22/%3E%3Cpath d=%22M18 19v-3%22/%3E%3Cpath d=%22M8 11V9%22/%3E%3Cpath d=%22M16 11V9%22/%3E%3Cpath d=%22M12 11V9%22/%3E%3Cpath d=%22M2 15h20%22/%3E%3Cpath d=%22M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z%22/%3E%3C/svg%3E"); }
.ico-drive { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cline x1=%2222%22 y1=%2212%22 x2=%222%22 y2=%2212%22/%3E%3Cpath d=%22M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z%22/%3E%3Cline x1=%226%22 y1=%2216%22 x2=%226.01%22 y2=%2216%22/%3E%3Cline x1=%2210%22 y1=%2216%22 x2=%2210.01%22 y2=%2216%22/%3E%3C/svg%3E"); }
.ico-updown { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m3 16 4 4 4-4%22/%3E%3Cpath d=%22M7 20V4%22/%3E%3Cpath d=%22m21 8-4-4-4 4%22/%3E%3Cpath d=%22M17 4v16%22/%3E%3C/svg%3E"); }
.ico-note { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h9l7-7V5a2 2 0 0 0-2-2Z%22/%3E%3Cpath d=%22M15 21v-5a2 2 0 0 1 2-2h5%22/%3E%3C/svg%3E"); }
.ico-message { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z%22/%3E%3C/svg%3E"); }
.ico-mail { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z%22/%3E%3Cpolyline points=%2222,6 12,13 2,6%22/%3E%3C/svg%3E"); }
.ico-key { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4%22/%3E%3C/svg%3E"); }
.ico-chart { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cline x1=%2218%22 y1=%2220%22 x2=%2218%22 y2=%2210%22/%3E%3Cline x1=%2212%22 y1=%2220%22 x2=%2212%22 y2=%224%22/%3E%3Cline x1=%226%22 y1=%2220%22 x2=%226%22 y2=%2214%22/%3E%3C/svg%3E"); }
.ico-download { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4%22/%3E%3Cpolyline points=%227 10 12 15 17 10%22/%3E%3Cline x1=%2212%22 y1=%2215%22 x2=%2212%22 y2=%223%22/%3E%3C/svg%3E"); }
.ico-upload { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4%22/%3E%3Cpolyline points=%2217 8 12 3 7 8%22/%3E%3Cline x1=%2212%22 y1=%223%22 x2=%2212%22 y2=%2215%22/%3E%3C/svg%3E"); }
.ico-moon { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z%22/%3E%3C/svg%3E"); }
.ico-sun { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%225%22/%3E%3Cline x1=%2212%22 y1=%221%22 x2=%2212%22 y2=%223%22/%3E%3Cline x1=%2212%22 y1=%2221%22 x2=%2212%22 y2=%2223%22/%3E%3Cline x1=%224.22%22 y1=%224.22%22 x2=%225.64%22 y2=%225.64%22/%3E%3Cline x1=%2218.36%22 y1=%2218.36%22 x2=%2219.78%22 y2=%2219.78%22/%3E%3Cline x1=%221%22 y1=%2212%22 x2=%223%22 y2=%2212%22/%3E%3Cline x1=%2221%22 y1=%2212%22 x2=%2223%22 y2=%2212%22/%3E%3Cline x1=%224.22%22 y1=%2219.78%22 x2=%225.64%22 y2=%2218.36%22/%3E%3Cline x1=%2218.36%22 y1=%225.64%22 x2=%2219.78%22 y2=%224.22%22/%3E%3C/svg%3E"); }
.ico-plus { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cline x1=%2212%22 y1=%225%22 x2=%2212%22 y2=%2219%22/%3E%3Cline x1=%225%22 y1=%2212%22 x2=%2219%22 y2=%2212%22/%3E%3C/svg%3E"); }
.ico-refresh { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolyline points=%2223 4 23 10 17 10%22/%3E%3Cpolyline points=%221 20 1 14 7 14%22/%3E%3Cpath d=%22M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15%22/%3E%3C/svg%3E"); }
.ico-info { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22/%3E%3Cline x1=%2212%22 y1=%2216%22 x2=%2212%22 y2=%2212%22/%3E%3Cline x1=%2212%22 y1=%228%22 x2=%2212.01%22 y2=%228%22/%3E%3C/svg%3E"); }
.ico-scissors { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%226%22 cy=%226%22 r=%223%22/%3E%3Ccircle cx=%226%22 cy=%2218%22 r=%223%22/%3E%3Cline x1=%2220%22 y1=%224%22 x2=%228.12%22 y2=%2215.88%22/%3E%3Cline x1=%2214.47%22 y1=%2214.48%22 x2=%2220%22 y2=%2220%22/%3E%3Cline x1=%228.12%22 y1=%228.12%22 x2=%2212%22 y2=%2212%22/%3E%3C/svg%3E"); }
.ico-calendar { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%224%22 width=%2218%22 height=%2218%22 rx=%222%22 ry=%222%22/%3E%3Cline x1=%2216%22 y1=%222%22 x2=%2216%22 y2=%226%22/%3E%3Cline x1=%228%22 y1=%222%22 x2=%228%22 y2=%226%22/%3E%3Cline x1=%223%22 y1=%2210%22 x2=%2221%22 y2=%2210%22/%3E%3C/svg%3E"); }
.ico-hourglass { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 22h14%22/%3E%3Cpath d=%22M5 2h14%22/%3E%3Cpath d=%22M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22%22/%3E%3Cpath d=%22M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2%22/%3E%3C/svg%3E"); }
.ico-archive { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%222%22 y=%223%22 width=%2220%22 height=%225%22 rx=%221%22/%3E%3Cpath d=%22M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8%22/%3E%3Cpath d=%22M10 12h4%22/%3E%3C/svg%3E"); }
.ico-shield-check { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z%22/%3E%3Cpolyline points=%229 11.5 11 13.5 15 9.5%22/%3E%3C/svg%3E"); }

/* ============================================================
   ===== Mobile fix pass 4: header compaction + row overflow =====
   From phone screenshots: (a) the wrapped header ate half the
   screen; (b) the server-stats row (CPU/RAM/disk/net pills +
   "Checking..." button) is a non-wrapping .flex and pushed past
   the right edge; (c) .btn has white-space:nowrap so multi-line
   button content (Swagger/ReDoc hint text) was clipped.
   Desktop (>720px) untouched.
   ============================================================ */
@media (max-width: 720px) {
    .app-header {
        flex-wrap: wrap;
        padding: var(--space-sm) 0;
        margin-bottom: var(--space-lg);
        row-gap: var(--space-sm);
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .logo-subtitle {
        display: none;
    }

    .header-nav {
        gap: 2px;
    }

    .nav-link {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 0.85rem;
    }

    /* Rows built with .flex utilities inside cards may wrap instead of
       overflowing (server stats + check button, title rows, etc.) */
    .card .flex,
    #serverStats {
        flex-wrap: wrap;
    }

    /* Buttons with long/secondary text wrap instead of clipping */
    .btn {
        white-space: normal;
    }

    .btn > div {
        min-width: 0;
    }
}


/* Pass-3 icons: protocol tiles, marketplace, handshake clock */
.ico-star { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%2212 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2%22/%3E%3C/svg%3E"); }
.ico-hexagon { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z%22/%3E%3C/svg%3E"); }
.ico-radio { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%222%22/%3E%3Cpath d=%22M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14%22/%3E%3C/svg%3E"); }
.ico-layers { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolygon points=%2212 2 2 7 12 12 22 7 12 2%22/%3E%3Cpolyline points=%222 17 12 22 22 17%22/%3E%3Cpolyline points=%222 12 12 17 22 12%22/%3E%3C/svg%3E"); }
.ico-tool { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z%22/%3E%3C/svg%3E"); }
.ico-clock { --i: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%2210%22/%3E%3Cpolyline points=%2212 6 12 12 16 14%22/%3E%3C/svg%3E"); }

.protocol-icon .ico {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}
