/* ==========================================================================
   vpnchiik — PITCH BLACK MINIMAL v3
   Pure black. White text. Nothing extra.
   ========================================================================== */

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

:root {
    --black: #000000;
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-hover: #111111;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);

    --white: #fafafa;
    --gray-1: #a1a1aa;
    --gray-2: #71717a;
    --gray-3: #3f3f46;

    --green: #22c55e;
    --red: #ef4444;
    --yellow: #eab308;
    --blue: #3b82f6;

    --nav-w: 72px;
    --r: 8px;
    --font: 'Inter', -apple-system, sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
::selection { background:rgba(255,255,255,0.15); }

::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:99px; }

body.bento-theme {
    font-family: var(--font);
    background: var(--black);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Layout ── */
.app-layout {
    display: flex;
    height: 100vh;
}

/* ── Sidebar ── */
.app-sidebar {
    width: var(--nav-w);
    height: 100vh;
    background: var(--black);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    flex-shrink: 0;
}

.nav-brand { margin-bottom: 32px; }

.brand-logo {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
}
.brand-logo i { width: 18px; height: 18px; stroke-width: 2.5px; }

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    width: 100%;
    align-items: center;
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-2);
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: none;
    transition: color 0.15s, background 0.15s;
    position: relative;
}
.nav-icon:hover { color: var(--white); background: var(--surface); }
.nav-icon.active { color: var(--white); background: var(--surface); }
.nav-icon i { width: 18px; height: 18px; stroke-width: 1.8px; }

.nav-badge {
    position: absolute;
    top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--red);
    border-radius: 50%;
}

.nav-footer { margin-top: auto; }
.nav-icon.danger:hover { color: var(--red); }

/* ── Workspace ── */
.app-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0 32px;
    overflow-y: auto;
}

.workspace-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--green);
}
.status-dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
}

.action-btn {
    width: 32px; height: 32px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: none;
    color: var(--gray-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.action-btn:hover { color: var(--white); border-color: var(--border-hover); }
.action-btn i { width: 14px; height: 14px; }
.spinning { animation: spin 0.8s linear infinite; }

.user-avatar {
    width: 32px; height: 32px;
    border-radius: var(--r);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-1);
}

.workspace-content {
    flex: 1;
    padding: 24px 0 32px;
}

/* ── Cards ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s;
}
.bento-card:hover { border-color: var(--border-hover); }

.bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bento-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bento-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.bento-subtext {
    font-size: 11px;
    color: var(--gray-3);
}

.bento-card i { width: 16px; height: 16px; color: var(--gray-2); stroke-width: 1.8px; }
.stat-card.accent-blue i { color: var(--blue); }
.stat-card.accent-green i { color: var(--green); }
.stat-card.accent-purple i { color: #a78bfa; }
.stat-card.accent-cyan i { color: #22d3ee; }

.bento-charts { grid-template-columns: 2fr 1fr; }
.col-span-2 { grid-column: span 2; }
.bento-chart-container { flex:1; position:relative; min-height:220px; width:100%; }
.doughnut-container { min-height:190px; }

/* ── List items ── */
.bento-list-item {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.15s;
}
.bento-list-item:hover { border-color: var(--border-hover); }

/* ── Drawer ── */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}
.offcanvas-overlay.active { opacity:1; visibility:visible; }

.offcanvas-drawer {
    position: fixed;
    top: 0; right: -520px; bottom: 0;
    width: 480px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.offcanvas-overlay.active + .offcanvas-drawer { transform: translateX(-520px); }

.drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.drawer-header h2 { font-size: 14px; font-weight: 600; }

.drawer-close {
    width: 28px; height: 28px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background: none;
    color: var(--gray-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.drawer-close:hover { color: var(--white); border-color: var(--border-hover); }
.drawer-close i { width: 12px; height: 12px; }

.drawer-content { flex:1; padding:20px; overflow-y:auto; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-row { display:flex; gap:10px; }
.form-row .form-group { flex:1; }

.form-label {
    display: block;
    font-size: 11px;
    color: var(--gray-2);
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--white);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.form-control:focus { border-color: var(--border-hover); }
.form-control::placeholder { color: var(--gray-3); }

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--r);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn i { width: 14px; height: 14px; stroke-width: 2px; }

.btn-primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
    background: none;
    border-color: var(--border);
    color: var(--gray-1);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--white); }
.btn-secondary.active { border-color: var(--white); color: var(--white); }

.btn-danger {
    background: none;
    color: var(--red);
    border-color: rgba(239,68,68,0.2);
}
.btn-danger:hover { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); }

.btn-sm { padding: 4px 8px; font-size: 11px; }

/* ── Tables ── */
.table-card { padding:0; background:transparent; border:none; }
.table-responsive { overflow-x:auto; }

.panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.panel-table th {
    padding: 8px 14px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-3);
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}
.panel-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--gray-1);
}
.panel-table tbody tr { transition: background 0.1s; }
.panel-table tbody tr:hover { background: var(--surface); }

/* ── Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 500;
}
.badge-success { color: var(--green); background: rgba(34,197,94,0.08); }
.badge-danger { color: var(--red); background: rgba(239,68,68,0.08); }
.badge-warning { color: var(--yellow); background: rgba(234,179,8,0.08); }
.badge-secondary { color: var(--gray-2); background: rgba(255,255,255,0.03); }

/* ── Toasts ── */
.toast-hub {
    position: fixed;
    bottom: 16px; right: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2000;
}
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    transform: translateX(110%);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.toast.show { transform: translateX(0); }
.toast-success i { color: var(--green); }
.toast-danger i { color: var(--red); }
.toast-warning i { color: var(--yellow); }

/* ── Page header ── */
.page-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}
.page-actions-header h2 { font-size: 14px; font-weight: 600; }

.search-box-container { position:relative; width:240px; }
.search-box-container i {
    position:absolute; left:10px; top:50%; transform:translateY(-50%);
    width:14px; height:14px; color:var(--gray-3);
}
.search-box-container input {
    width:100%; padding:7px 10px 7px 30px;
    background:var(--black); border:1px solid var(--border); border-radius:99px;
    color:var(--white); font-size:12px; font-family:inherit; outline:none;
    transition: border-color 0.15s;
}
.search-box-container input:focus { border-color: var(--border-hover); }

/* ── Alerts / Code ── */
.alert {
    padding: 10px 12px;
    border-radius: var(--r);
    margin-bottom: 14px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.alert-warning { color: var(--yellow); background: rgba(234,179,8,0.05); border: 1px solid rgba(234,179,8,0.1); }

.code-copy-container {
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px;
    margin-bottom: 14px;
    overflow-x: auto;
}
.bash-code { font-family: monospace; font-size: 11px; color: var(--green); word-break:break-all; }

/* ── Empty state ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: var(--gray-3);
}
.empty-state i { width:28px; height:28px; margin-bottom:8px; opacity:0.3; }
.empty-state p { font-size:12px; }

/* ── Toggles ── */
.switch { position:relative; display:inline-block; width:32px; height:18px; }
.switch input { opacity:0; width:0; height:0; }
.slider {
    position:absolute; cursor:pointer; inset:0;
    background:var(--gray-3); border-radius:99px; transition:0.2s;
}
.slider:before {
    position:absolute; content:""; width:12px; height:12px;
    left:3px; bottom:3px; background:var(--white);
    border-radius:50%; transition:0.2s;
}
input:checked + .slider { background: var(--green); }
input:checked + .slider:before { transform: translateX(14px); }

/* ── Server / Plan cards ── */
.plans-grid, .servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.plan-card { padding:16px; gap:10px; }
.plan-card-header {
    display:flex; justify-content:space-between; align-items:center;
    border-bottom:1px solid var(--border); padding-bottom:10px;
}
.plan-price { font-size:18px; font-weight:700; }
.plan-card-body { flex:1; display:flex; flex-direction:column; gap:6px; }
.plan-feature { display:flex; align-items:center; gap:6px; color:var(--gray-1); font-size:11px; }
.plan-feature i { width:13px; height:13px; color:var(--gray-2); }
.plan-card-actions {
    display:flex; justify-content:space-between; align-items:center;
    margin-top:auto; padding-top:10px; border-top:1px solid var(--border);
}

.server-card { padding:16px; gap:8px; }
.server-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:4px; }
.server-title { display:flex; gap:8px; align-items:center; }
.country-flag { font-size:18px; }
.server-meta h4 { font-size:13px; font-weight:600; }
.server-ip { font-size:10px; color:var(--gray-3); font-family:monospace; }

.server-metrics {
    background:var(--black); border:1px solid var(--border);
    border-radius:var(--r); padding:10px;
}
.metric-row { display:flex; align-items:center; gap:6px; margin-bottom:4px; font-size:11px; }
.metric-row:last-child { margin-bottom:0; }
.metric-label { width:28px; color:var(--gray-3); font-weight:600; font-size:10px; text-transform:uppercase; }
.metric-bar-bg { flex:1; height:3px; background:rgba(255,255,255,0.04); border-radius:99px; overflow:hidden; }
.metric-value { width:32px; text-align:right; font-weight:600; font-size:11px; }
.server-card-actions { display:flex; justify-content:flex-end; gap:4px; margin-top:auto; }

/* ── Pagination ── */
.table-pagination { display:flex; justify-content:center; gap:4px; padding:10px; }
.table-pagination .page-btn { width:28px; height:28px; padding:0; }
.table-pagination .page-btn.active { background:var(--white); color:var(--black); border-color:var(--white); }

/* ── Tabs ── */
.tab-buttons { display:flex; gap:0; }
.tab-btn { border-radius:0 !important; border:1px solid var(--border) !important; margin-left:-1px; }
.tab-btn:first-child { border-radius:var(--r) 0 0 var(--r) !important; margin-left:0; }
.tab-btn:last-child { border-radius:0 var(--r) var(--r) 0 !important; }
.tab-btn.active { background:var(--white) !important; color:var(--black) !important; border-color:var(--white) !important; }

/* ── Spinner ── */
.spinner {
    width:16px; height:16px;
    border:2px solid var(--gray-3);
    border-top-color:var(--white);
    border-radius:50%;
    animation:spin 0.7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }
.loading-spinner-container { display:flex; justify-content:center; padding:32px; }

.table-empty { text-align:center; padding:24px !important; color:var(--gray-3); }
.table-empty i { display:block; margin:0 auto 8px; width:24px; height:24px; opacity:0.2; }

.proof-img-full { max-width:100%; border-radius:var(--r); border:1px solid var(--border); }

/* ── Responsive ── */
@media (max-width:1024px) {
    .bento-charts { grid-template-columns:1fr; }
    .col-span-2 { grid-column:span 1; }
}
@media (max-width:768px) {
    .app-layout { flex-direction:column; }
    .app-sidebar {
        width:100%; height:52px; flex-direction:row;
        border-right:none; border-bottom:1px solid var(--border);
        padding:0 12px;
    }
    .nav-brand { margin-bottom:0; margin-right:12px; }
    .nav-links { flex-direction:row; gap:2px; }
    .nav-footer { margin-top:0; margin-left:auto; }
    .offcanvas-drawer { width:100%; right:-100%; border-left:none; border-radius:0; }
    .offcanvas-overlay.active + .offcanvas-drawer { transform:translateX(-100%); }
    .app-workspace { padding:0 16px; }
    .bento-grid { grid-template-columns:repeat(2,1fr); }
    .plans-grid, .servers-grid { grid-template-columns:1fr; }
}
@media (max-width:480px) {
    .bento-grid { grid-template-columns:1fr; }
    .search-box-container { width:100%; }
    .page-actions-header { flex-direction:column; align-items:stretch; }
}
