/* ==========================================================================
   Local Fonts - 本地字体定义
   ========================================================================== */

/* Inter */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-semibold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/inter-bold.woff2') format('woff2');
}

/* JetBrains Mono */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/jetbrains-regular.woff2') format('woff2');
}

/* Noto Sans SC */
@font-face {
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/noto-sc-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/noto-sc-medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/noto-sc-bold.woff2') format('woff2');
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --bg-deep: #FDFBF7;
    --bg-mesh: radial-gradient(at 0% 0%, rgba(220, 38, 38, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(217, 119, 6, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(185, 28, 28, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(245, 158, 11, 0.08) 0px, transparent 50%);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(180, 83, 9, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.5);

    --primary: #B91C1C;
    --primary-glow: rgba(185, 28, 28, 0.3);
    --primary-gradient: linear-gradient(135deg, #991B1B, #B91C1C, #D97706);

    --text-main: #451a03;
    --text-dim: #78350f;
    --text-muted: #92400e;

    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;

    --shadow-sm: 0 4px 6px -1px rgba(120, 53, 15, 0.05), 0 2px 4px -1px rgba(120, 53, 15, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(120, 53, 15, 0.08), 0 10px 10px -5px rgba(120, 53, 15, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    background-image: var(--bg-mesh);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px -5px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 25px 0px var(--primary-glow);
    }
}

/* Layout */
.view {
    display: none;
    padding-top: 100px;
    padding-bottom: 60px;
}

.view.active {
    display: block;
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 252, 245, 0.85);
    /* 浅色背景 */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px -5px rgba(120, 53, 15, 0.05);
}

.brand {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand i {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.brand span:last-child {
    background: rgba(180, 83, 9, 0.1);
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 0;
    color: var(--text-dim);
}

/* Stats Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(120, 53, 15, 0.15);
    border-color: rgba(180, 83, 9, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0.6;
}

.stat-lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-val {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #7c2d12, #b45309);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

/* Table */
.table-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.table-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.4);
}

.table-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 20px 32px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(180, 83, 9, 0.03);
}

/* Buttons & Inputs */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px -4px rgba(185, 28, 28, 0.3);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px -8px rgba(185, 28, 28, 0.5);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-main);
    box-shadow: none;
    border: 1px solid rgba(180, 83, 9, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(180, 83, 9, 0.2);
}

/* Action Buttons */
.ibtn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-dim);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.ibtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(120, 53, 15, 0.1);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.9);
}

.ibtn:active {
    transform: translateY(0);
}

/* Button Variants */
.ibtn.share {
    color: #d97706;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.ibtn.share:hover {
    background: #d97706;
    color: white;
    border-color: #d97706;
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.ibtn.edit {
    color: #0284c7;
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.2);
}

.ibtn.edit:hover {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.ibtn.warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

.ibtn.warn:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.ibtn.danger {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

.ibtn.danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}


input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-main);
    margin-bottom: 16px;
    font-size: 14px;
    transition: all 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.1);
}

::placeholder {
    color: rgba(120, 53, 15, 0.4);
}

/* Tags */
.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(180, 83, 9, 0.08);
    color: var(--text-dim);
    border: 1px solid transparent;
}

.tag.on {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(5, 150, 105, 0.2);
}

.proto-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proto-hy2 {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.proto-vless {
    background: rgba(5, 150, 105, 0.15);
    color: #047857;
}

.proto-ws {
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(69, 26, 3, 0.4);
    /* 深棕色遮罩 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.modal.on {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #FFFCF9;
    /* 暖白实色背景 */
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 92%;
    max-width: 420px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(66, 32, 6, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.on .modal-card {
    transform: scale(1) translateY(0);
}

.modal-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-main);
}

/* Cmd Box & Install UI */
.install-card-content {
    padding: 32px;
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.02) 0%, transparent 100%);
}

.cmd-box {
    background: #27272a;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cmd-text {
    font-family: 'JetBrains Mono', 'Menlo', monospace;
    font-size: 13px;
    color: #a3e635;
}

.cmd-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
}

.cmd-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.install-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.step-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-num {
    width: 28px;
    height: 28px;
    background: rgba(180, 83, 9, 0.1);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 13px;
}

.step-content h4 {
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 700;
}

.step-content p {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

/* Login */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(185, 28, 28, 0.05), transparent 40%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 48px 40px;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .hide-m {
        display: none;
    }

    .nav {
        padding: 0 20px;
    }

    .container {
        padding: 0 16px;
    }

    th,
    td {
        padding: 16px 20px;
    }

    .install-steps {
        grid-template-columns: 1fr;
    }

    .step-item {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Misc Utilities */
.info-box {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
}

.code-box {
    background: #fafafa;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-dim);
    word-break: break-all;
    margin-bottom: 24px;
    position: relative;
}

/* Toast */
.toast-box {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(180, 83, 9, 0.1);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px -10px rgba(120, 53, 15, 0.15);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(255, 107, 107, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(255, 142, 83, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(157, 78, 221, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(255, 107, 107, 0.12) 0%, transparent 45%);
    background-attachment: fixed;
}

.view {
    display: none;
    padding-top: 90px;
    padding-bottom: 40px;
}

.view.active {
    display: block;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation - Apple Style Glass */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(28, 28, 30, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 100;
}

.brand {
    font-size: 19px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff, #cecece);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand i {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 14px;
    color: white;
    -webkit-text-fill-color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Dashboard */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
    transform: scale(1.02);
}

.stat-val {
    font-size: 32px;
    font-weight: 700;
    margin-top: 8px;
    letter-spacing: -0.5px;
}

.stat-lbl {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Table Card */
.table-card {
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.table-header h2 {
    font-size: 17px;
    font-weight: 600;
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.35);
}

.btn-secondary {
    background: #F5F0E8;
    color: #4A0404;
    box-shadow: none;
}

/* Icon Button */
.ibtn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: .2s;
    font-size: 14px;
}

.ibtn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ibtn.danger {
    color: var(--danger);
    background: rgba(255, 69, 58, 0.1);
}

.ibtn.danger:hover {
    background: rgba(255, 69, 58, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    font-weight: 400;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Tags */
.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.tag.on {
    background: rgba(50, 215, 75, 0.15);
    color: var(--success);
}

.proto-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
}

.proto-hy2 {
    background: rgba(255, 159, 10, 0.2);
    color: #ff9f0a;
}

.proto-vless {
    background: rgba(50, 215, 75, 0.2);
    color: #32d74b;
}

.proto-ws {
    background: rgba(10, 132, 255, 0.2);
    color: #0a84ff;
}

/* Forms */
input,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text);
    margin-bottom: 16px;
    font-size: 15px;
    transition: .2s;
}

input:focus,
select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(139, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: .3s;
}

.modal.on {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #FFFCF5;
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 380px;
    padding: 32px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.on .modal-card {
    transform: scale(1);
}

/* Login */
.login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 360px;
    text-align: center;
    border-radius: 28px;
    padding: 40px 30px;
}

/* Toast */
.toast-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
}

.toast {
    background: #FFFCF5;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .hide-m {
        display: none;
    }

    .container {
        padding: 0 16px;
    }

    td,
    th {
        padding: 16px;
    }
}

/* Client Install UI */
.install-card-content {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.cmd-box {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    margin: 16px 0;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cmd-text {
    font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #4AF626;
    line-height: 1.5;
    word-break: break-all;
    flex: 1;
}

.cmd-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cmd-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.cmd-copy-btn:active {
    transform: translateY(1px);
}

.install-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.step-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-num {
    background: var(--primary-gradient);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text);
}

.step-content p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}