:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #9333ea;
    --bg-main: #0f172a;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

/* ── Global Scrollbar ────────────────────────────── */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.07) transparent;
}

/* Chrome / Edge / Safari */
*::-webkit-scrollbar {
    width: 2px;
    height: 2px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}
*::-webkit-scrollbar-corner {
    background: transparent;
}
h1 {
    content-visibility: auto;
    contain-intrinsic-size: 1px 40px;
}

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
}

pre,
code {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.sidebar-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s;
    margin-bottom: 0.5rem;
}

.nav-item:hover,
.nav-item.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    background: radial-gradient(
        circle at top right,
        rgba(99, 102, 241, 0.1),
        transparent
    );
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

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

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card > * {
    position: relative;
    z-index: 2;
}

.card-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 35%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover .card-wave {
    opacity: 0.8;
    transform: scaleY(1.12);
}

.card-wave-animated {
    width: 200% !important;
    animation: waveFlow var(--wave-speed, 10s) linear infinite !important;
}

@keyframes waveFlow {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Table Area */
.data-table-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.table-header-block {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.table-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.table-card-title-icon {
    font-size: 0.75rem;
    color: #4ade80;
    animation: pulse 2s infinite;
}

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-wrapper .data-table {
    min-width: 550px; /* Ensures comfortable column space on small viewports */
}

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

.data-table th {
    background: rgba(15, 23, 42, 0.4);
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.data-table td {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.status-online {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.status-online i {
    font-size: 0.5rem;
    animation: pulse-online 2s infinite;
}

.status-disabled {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.status-disabled i {
    font-size: 0.7rem;
}

@keyframes pulse-online {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.status-offline {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

.status-offline i {
    font-size: 0.5rem;
}

.status-checking {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
}

/* ── Status Dot (minimal dot dengan tooltip) ──── */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: default;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.status-dot:hover {
    transform: scale(1.4);
}

.status-dot--online {
    background: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
    animation: dot-pulse 2s infinite;
}

.status-dot--online:hover {
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.3);
}

.status-dot--offline {
    background: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

.status-dot--offline:hover {
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.3);
}

.status-dot--disabled {
    background: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.status-dot--disabled:hover {
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.3);
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25); }
    50%       { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.08); }
}

.status-dot--checking {
    background: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
    animation: dot-checking 1.2s ease-in-out infinite;
}

@keyframes dot-checking {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.td-status {
    text-align: center;
}


/* ── Payment Status Badge ───────────────────────── */
.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.payment-badge--active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.payment-badge--active i {
    font-size: 0.7rem;
}

.payment-badge--inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.payment-badge--inactive i {
    font-size: 0.7rem;
}

.payment-badge--unknown {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.payment-badge--unknown i {
    font-size: 0.7rem;
}

.td-payment {
    white-space: nowrap;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    filter: brightness(1.1);
}

.btn-cancel {
    background: #4b5563;
    color: white;
}

.btn-cancel:hover {
    background: #374151;
}

/* Premium High-Tech Custom Action Button (Cyan to Teal Gradient) */
.btn-custom-action {
    background: linear-gradient(135deg, #06b6d4 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(6, 182, 212, 0.25) !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25) !important;
}

.btn-custom-action:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.4) !important;
    transform: translateY(-1.5px);
    filter: brightness(1.05);
}

/* Create VPN Page Specifics */
.create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.section-header {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.section-icon {
    color: var(--primary);
    margin-right: 0.5rem;
}

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

.form-help {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

.form-actions .btn {
    flex: 1;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.875rem;
}

.alert-error__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card--full-height {
    height: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.preview-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.4rem;
}

.btn-copy-mini {
    background: var(--glass);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.script-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 1.25rem;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    color: #86efac;
    min-height: 400px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary,
.btn-secondary,
.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: white;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

/* ── Alert / Flash ─────────────────────────────── */
.alert-success-script {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success-script__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.alert-success-script__title {
    font-size: 1rem;
    font-weight: 600;
    color: #4ade80;
}

.btn-copy-script {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.alert-script-output {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    color: #86efac;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* ── Table Toolbar ─────────────────────────────── */
.table-toolbar {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-icon.fa-spin {
    top: 36%;
}

.search-input {
    padding-left: 2.2rem;
    font-size: 0.85rem;
}

.btn-search {
    background: var(--glass);
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.btn-clear {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.perpage-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.perpage-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.perpage-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.perpage-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.perpage-select {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* ── Sortable TH link ──────────────────────────── */
.sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.sort-icon {
    font-size: 0.7rem;
}

.sort-icon--inactive {
    opacity: 0.4;
}
.sort-icon--active {
    opacity: 1;
}

/* ── Table cells ───────────────────────────────── */
.td-name {
    font-weight: 600;
}

.td-comment {
    color: var(--text-muted);
    font-size: 0.75rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-actions {
    white-space: nowrap;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.btn-icon--muted {
    color: var(--text-muted);
}
.btn-icon--danger {
    color: #ef4444;
}
.btn-icon--info {
    color: #38bdf8;
}

.btn-toggle-status {
    color: #fbbf24;
    transition:
        color 0.2s,
        background 0.2s;
}
.btn-toggle-status:hover {
    color: #f59e0b;
    background: rgba(251, 191, 36, 0.1);
}
.btn-toggle-status--disabled {
    color: #9ca3af;
}
.btn-toggle-status--disabled:hover {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.td-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
}

.td-empty__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

/* ── Pagination ────────────────────────────────── */
.pagination-bar {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    background: rgba(15, 23, 42, 0.2);
}

.btn-page {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
}

.btn-page--active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-page--inactive {
    background: var(--glass);
    color: var(--text-main);
}

.btn-page--inactive:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: white;
}

.btn-page--disabled {
    opacity: 0.3;
    pointer-events: none;
    background: transparent;
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.05);
}

/* ── Card Tabs ─────────────────────────────────── */
.card-tab-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.card-tab-buttons {
    display: flex;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    margin-left: auto; /* Automatically pushes the buttons to the right, even when wrapped on mobile */
}

.card-tab-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.card-tab-btn:hover {
    color: white;
}

.card-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.card-panel {
    display: none;
}

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

.card-panel--edit {
    padding: 1.5rem;
}

.form-control[readonly],
.form-control:disabled {
    background: rgba(15, 23, 42, 0.6) !important;
    color: var(--text-muted) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    cursor: not-allowed !important;
    opacity: 0.75 !important;
}

/* ── Extra NAT Rules ───────────────────────────── */
.extra-nat-header {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.extra-nat-title {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--primary);
}

.extra-to-port-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.btn-remove-nat {
    height: 2.25rem;
    width: 2.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.extra-nat-row {
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
}

/* ── Modal overlay ─────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal-overlay--dark {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}
.modal-overlay--darker {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-overlay[style*="flex"] .modal-script,
.modal-overlay[style*="flex"] .modal-password,
.modal-overlay[style*="flex"] .modal-delete {
    animation: modalSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Delete Modal ──────────────────────────────── */
.modal-delete {
    background: #1e293b;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
}

.modal-delete__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.modal-delete__icon-wrap {
    background: rgba(239, 68, 68, 0.15);
    padding: 0.6rem;
    border-radius: 0.5rem;
}

.modal-delete__icon {
    color: #f87171;
    font-size: 1.2rem;
}

.modal-delete__title {
    font-size: 1rem;
    font-weight: 700;
}

.modal-delete__desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.modal-delete__info {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.modal-delete__info-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.modal-delete__info-row:last-child {
    margin-bottom: 0;
}

.modal-delete__info-label {
    color: var(--text-muted);
    min-width: 100px;
}

.modal-delete__info-value {
    color: #f87171;
}

.modal-delete__info-note {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.modal-delete__actions {
    display: flex;
    gap: 0.75rem;
}

.btn-cancel {
    flex: 1;
    background: var(--glass);
    color: white;
    justify-content: center;
}

.btn-danger {
    flex: 1;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    justify-content: center;
}

/* ── Password Modal ────────────────────────────── */
.modal-password {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

/* ── Script Success Modal ───────────────────────── */
/* Reset padding dari .modal-password yang dipakai bersama */
.modal-script {
    max-width: 680px;
    background: #0f1629;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(20px);
    overflow: hidden;
    padding: 0 !important;
}

.modal-script__header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.02);
}

.modal-script__header-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modal-script__success-icon {
    color: #34d399;
    font-size: 1.35rem;
    filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.4));
}

.modal-script__title {
    margin: 0;
    font-size: 1rem;
    color: #f1f5f9;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-script__subtitle {
    margin: 0.1rem 0 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.modal-script__body {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background: #0f1629;
}

.modal-script .code-container {
    border-radius: 0;
    width: 100%;
    background: transparent;
    border: none;
}

.modal-script .code-box {
    margin: 0;
    max-height: 320px;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    font-family: "Fira Code", "JetBrains Mono", monospace;
    font-size: 0.82rem;
    color: #6ee7b7;
    white-space: pre;
    line-height: 1.7;
    word-break: keep-all;
    text-align: left;
    background: rgba(0, 0, 0, 0.25);
}

/* ── Modal: protocol grid minimalis (1 kolom, gap antar block) ── */
.modal-script .protocol-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
}

.modal-script .protocol-block .code-box--sm {
    max-height: none;
    padding: 0.6rem 1.75rem;
    font-size: 0.72rem;
    line-height: 1.65;
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    word-break: keep-all;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
    background: rgba(0, 0, 0, 0.2);
    color: #a5f3c5;
    border-top: none;
}

.modal-script .protocol-block .code-box--sm::-webkit-scrollbar {
    height: 2px;
}

.modal-script .protocol-block .code-box--sm::-webkit-scrollbar-track {
    background: transparent;
}

.modal-script .protocol-block .code-box--sm::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
}

.modal-script .protocol-block .code-box--sm::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Protocol block: rounded card dengan gap */
.modal-script .protocol-block {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.65rem;
    overflow: hidden;
    transition: border-color 0.15s;
}

.modal-script .protocol-block:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Warna accent per protocol-block (nth-child) */
.modal-script .protocol-block:nth-child(1) .protocol-header {
    background: rgba(99, 102, 241, 0.06);
}
.modal-script .protocol-block:nth-child(2) .protocol-header {
    background: rgba(56, 189, 248, 0.06);
}
.modal-script .protocol-block:nth-child(3) .protocol-header {
    background: rgba(52, 211, 153, 0.06);
}
.modal-script .protocol-block:nth-child(4) .protocol-header {
    background: rgba(251, 146, 60, 0.06);
}
.modal-script .protocol-block:nth-child(5) .protocol-header {
    background: rgba(244, 114, 182, 0.06);
}

.modal-script .protocol-header {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

.modal-script .protocol-badge {
    font-size: 0.6rem;
    padding: 0.12rem 0.45rem;
    border-radius: 0.3rem;
    letter-spacing: 0.08em;
}

.modal-script .protocol-name {
    font-size: 0.72rem;
    color: #94a3b8;
}

.modal-script__actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.015);
    width: 100%;
    box-sizing: border-box;
}

/* btn-copy-tab inside modal: compact & minimal */
.modal-script .btn-copy-tab {
    padding: 0.22rem 0.6rem;
    font-size: 0.68rem;
    gap: 0.3rem;
    border-radius: 0.3rem;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-script .btn-copy-tab:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* ── Script Info Bar (minimalis, tanpa background) ──────── */
.script-info-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0;
}

.script-info-bar__icon {
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818cf8;
    font-size: 0.95rem;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.script-info-bar__content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.script-info-bar__url {
    font-family: "Fira Code", "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-copy-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 0.3rem;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.18s;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
}

.btn-copy-info:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.script-info-bar__port {
    color: #ffffff;
    font-weight: 600;
}

.script-info-bar__meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.script-info-bar__meta i {
    font-size: 0.6rem;
    margin-right: 0.1rem;
    opacity: 0.6;
}

.script-info-bar__sep {
    color: rgba(148, 163, 184, 0.25);
    font-weight: 300;
}

.code-header-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.code-header-icon {
    margin-right: 0.5rem;
    color: #818cf8;
}

.btn-copy-tab--sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.modal-password__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-password__title {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
}

.modal-password__body {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.modal-password__value {
    font-size: 1.125rem;
    color: #86efac;
    font-family: "Courier New", monospace;
}

.btn-copy-pwd {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

/* ── Detail Modal ─────────────────────────────── */
.modal-detail {
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.modal-detail__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-detail__title i {
    color: var(--primary);
}

.modal-detail__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-detail__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-detail__item--full {
    grid-column: span 2;
}

.modal-detail__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.modal-detail__value {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.modal-detail__value--code {
    font-family: "Courier New", monospace;
    color: #86efac;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    display: inline-block;
}

.modal-detail__footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
/* ── Port Mapping Badges (Premium Version) ─────── */
.port-mapping {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: "Inter", sans-serif;
}

.badge-server {
    background: rgba(99, 102, 241, 0.15); /* Soft Indigo */
    color: #a5b4fc;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    letter-spacing: 0.025em;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.badge-client {
    background: rgba(16, 185, 129, 0.15); /* Soft Emerald */
    color: #6ee7b7;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mapping-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.6;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15); /* Soft Red/Orange */
    color: #f87171;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ── Detail Page (show.blade.php) ─────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

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

.meta-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.meta-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.meta-icon-wrap {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.meta-title-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.meta-title-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 1.75rem;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 1rem;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-col {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.info-col--full {
    grid-column: span 2;
}

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

.info-value {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    word-break: break-all;
}

.info-value--code {
    font-family: "Courier New", monospace;
    color: #86efac;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy-inline {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 0.15rem;
}

.btn-copy-inline:hover {
    color: white;
}

.script-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: 100%;
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Removed border and padding for minimalist elegant look */
}

.script-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #f1f5f9;
    letter-spacing: 0.03em;
}

.script-title i {
    color: #818cf8;
    font-size: 1.15rem;
}

.script-actions {
    display: flex;
    gap: 0.5rem;
}

.code-container {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 0rem 0rem 0.75rem 0.75rem;
    overflow: hidden;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.code-header-bar {
    background: transparent;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.025em;
    border-radius: 0.75rem 0.75rem 0 0;
}

.code-box {
    padding: 1rem;
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.85rem;
    color: #86efac;
    overflow: auto;
    max-height: 520px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    flex-grow: 1;
}

.code-section-title {
    color: #38bdf8;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    padding-bottom: 0.25rem;
}

.btn-action-script {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action-script:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.btn-action-script--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-action-script--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.comment-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── Script Header Badge Row ────────────────────── */
.script-badge-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.script-date-badge,
.script-server-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    background: transparent;
    border: none;
    padding: 0;
}

.script-date-badge {
    color: #94a3b8;
}

.script-server-badge {
    color: #10b981;
}

/* ── Script Tabs ────────────────────────────────── */
.script-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.35rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border);
}

.script-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.script-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.script-tab.active {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}

.tab-pill {
    font-size: 0.65rem;
    padding: 0.15rem 0.55rem;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.tab-pill--green {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

/* ── Tab Panel ──────────────────────────────────── */
.tab-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
}

/* ── Code Header Refactored ──────────────────────── */
.code-header-bar {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.025em;
}

.code-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.code-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.2rem 0.65rem;
    border-radius: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.code-info-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

.btn-copy-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.4rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-tab:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ── Hint Bar ────────────────────────────────────── */
.code-hint-bar {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.code-hint-bar--amber {
    background: rgba(245, 158, 11, 0.08);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.code-hint-bar--blue {
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ── Script Info Grid (Server Summary) ───────────── */
.script-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.script-info-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.script-info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.script-info-val {
    font-size: 0.9rem;
    color: var(--text-main);
    font-family: "Courier New", monospace;
    font-weight: 600;
}

.script-info-val--highlight {
    color: #86efac;
    font-size: 1rem;
}

/* ── Protocol Blocks (Client Side) ──────────────── */
.protocol-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.protocol-block:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.protocol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.4);
}

.protocol-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.protocol-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.protocol-rec {
    font-size: 0.72rem;
    color: #fbbf24;
    font-weight: 600;
}

.protocol-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.65rem;
    border-radius: 0.4rem;
    letter-spacing: 0.05em;
}

.protocol-badge--purple {
    background: rgba(147, 51, 234, 0.2);
    color: #c084fc;
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.protocol-badge--blue {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.protocol-badge--green {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.protocol-badge--orange {
    background: rgba(249, 115, 22, 0.15);
    color: #fdba74;
    border: 1px solid rgba(249, 115, 22, 0.25);
}

.code-box--sm {
    max-height: 120px;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
}

/* ── Show Page Layout Override ───────────────────── */
.show-script-top {
    margin-bottom: 1.75rem;
}

.show-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

@media (max-width: 1024px) {
    .show-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.code-box--compact {
    max-height: 400px;
    padding: 0.75rem;
    font-size: 0.8rem;
    overflow-y: auto;
}

.protocol-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
}

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

/* ── Connection Animation Card ───────────────────── */
.conn-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 0;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.conn-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(99, 102, 241, 0.06) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.conn-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(15, 23, 42, 0.3);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.conn-card__icon {
    font-size: 1.25rem;
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conn-card__title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #f1f5f9;
    letter-spacing: 0.03em;
}

.conn-card__sub {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.15rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.conn-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-left: auto;
    position: relative;
}

.conn-status-dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid #10b981;
    animation: ripple-green 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes ripple-green {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.conn-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.conn-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    position: relative;
}

.conn-node__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -68%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.35);
    animation: ring-pulse 3s ease-in-out infinite;
}

.conn-node__ring--purple {
    border-color: rgba(147, 51, 234, 0.4);
    animation-delay: 0.5s;
}
.conn-node__ring--green {
    border-color: rgba(16, 185, 129, 0.4);
    animation-delay: 1s;
}

@keyframes ring-pulse {
    0%,
    100% {
        transform: translate(-50%, -68%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -68%) scale(1.18);
        opacity: 0.2;
    }
}

.conn-node__core {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.2);
}

.conn-node__core--purple {
    background: rgba(147, 51, 234, 0.18);
    color: #c084fc;
    border-color: rgba(147, 51, 234, 0.4);
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.2);
}

.conn-node__core--green {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.conn-node__label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.conn-node__ip {
    font-size: 0.63rem;
    color: var(--text-muted);
    font-family: "Courier New", monospace;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conn-tunnel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.conn-tunnel--nat {
    flex: 0.8;
}

.conn-tunnel__track {
    width: 100%;
    height: 4px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.conn-tunnel__track--green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.conn-packet {
    position: absolute;
    top: 0;
    height: 100%;
    width: 22px;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, #818cf8, transparent);
    animation: packet-flow 2.4s linear infinite;
}

.conn-packet--green {
    background: linear-gradient(90deg, transparent, #34d399, transparent);
}

.conn-packet--1 {
    animation-delay: 0s;
}
.conn-packet--2 {
    animation-delay: 0.8s;
}
.conn-packet--3 {
    animation-delay: 1.6s;
}

@keyframes packet-flow {
    0% {
        left: -22px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.conn-tunnel__label {
    font-size: 0.62rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.conn-tunnel__label--green {
    color: #6ee7b7;
}

.conn-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.conn-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
}

.conn-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.conn-stat-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: "Courier New", monospace;
}

.conn-stat-val--green {
    color: #4ade80;
}
.conn-stat-val--purple {
    color: #a5b4fc;
}

/* ── Show Page New Layout (top-grid) ────────────── */
.show-top-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .show-top-grid {
        grid-template-columns: 1fr;
    }
}

/* Horizontal info-list for bottom customer card */
.info-list--horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.1rem 1.5rem;
}

.info-col--wide {
    grid-column: 1 / -1;
}

/* ── Compact Connection Visual Mini (cvm) ────────── */
.conn-visual-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}

.cvm-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.cvm-node__core {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cvm-node__core--blue {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    animation: glow-blue 3s ease-in-out infinite;
}

.cvm-node__core--purple {
    background: rgba(147, 51, 234, 0.18);
    color: #c084fc;
    border: 1.5px solid rgba(147, 51, 234, 0.4);
    animation: glow-purple 3s ease-in-out infinite 0.5s;
}

.cvm-node__core--green {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    animation: glow-green 3s ease-in-out infinite 1s;
}

@keyframes glow-blue {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 18px rgba(99, 102, 241, 0.45);
    }
}
@keyframes glow-purple {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(147, 51, 234, 0.2);
    }
    50% {
        box-shadow: 0 0 18px rgba(147, 51, 234, 0.45);
    }
}
@keyframes glow-green {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 18px rgba(16, 185, 129, 0.45);
    }
}

.cvm-node__label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.cvm-node__ip {
    font-size: 0.58rem;
    color: var(--text-muted);
    font-family: "Courier New", monospace;
    text-align: center;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cvm-line {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
}

.cvm-line__track {
    width: 100%;
    height: 3px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 3px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.cvm-line__track--green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.cvm-dot {
    position: absolute;
    top: 0;
    height: 100%;
    width: 16px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #818cf8, transparent);
    animation: cvm-flow 2s linear infinite;
}

.cvm-dot--green {
    background: linear-gradient(90deg, transparent, #34d399, transparent);
}
.cvm-dot--1 {
    animation-delay: 0s;
}
.cvm-dot--2 {
    animation-delay: 1s;
}

@keyframes cvm-flow {
    0% {
        left: -16px;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.cvm-line__label {
    font-size: 0.58rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.cvm-line__label--green {
    color: #6ee7b7;
}

/* ── Port Carousel Styles (Premium Interactive) ── */
.port-carousel-wrapper {
    display: inline-block;
    vertical-align: middle;
}
.port-carousel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.25rem 0.65rem;
    min-height: 38px;
}
.port-carousel__slides {
    position: relative;
    overflow: hidden;
    min-width: 250px;
}
.port-carousel__slide {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}
.port-carousel__slide--active {
    display: flex;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
}
.port-carousel__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 0.5rem;
}
.port-carousel__counter {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}
.port-carousel__btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.btn-carousel-nav {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px;
    cursor: pointer;
    line-height: 1;
    transition:
        color 0.2s,
        transform 0.1s;
}
.btn-carousel-nav:hover {
    color: var(--primary);
}
.btn-carousel-nav:active {
    transform: scale(0.85);
}
.port-comment-indicator {
    color: #a5b4fc;
    font-size: 0.85rem;
    margin-left: 0.35rem;
    cursor: help;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.port-comment-indicator:hover {
    opacity: 1;
}

/* ── Breakdown Accordion Styles (Premium Breakdown) ── */
.btn-expand-row {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-expand-row:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary);
    transform: scale(1.08);
}
.breakdown-row {
    background: rgba(15, 23, 42, 0.2) !important;
}
.breakdown-td {
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.breakdown-container {
    padding: 1.5rem 2rem;
    animation: slideDownBreakdown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownBreakdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.breakdown-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
}
.breakdown-section {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}
.breakdown-section__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.4rem;
    margin-top: 0;
}
.breakdown-section__title i {
    color: var(--primary);
}
.breakdown-nat-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.breakdown-nat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.breakdown-nat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}
.breakdown-nat-comment {
    color: var(--primary);
    font-size: 0.7rem;
    margin-left: 0.25rem;
    font-weight: normal;
}
.breakdown-info-table {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.breakdown-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 0.35rem;
}
.breakdown-info-row--full {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    border-bottom: none;
}
.breakdown-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.breakdown-info-value {
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
}
.breakdown-comment-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    line-height: 1.4;
    width: 100%;
}

.btn-remove-nat:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    transform: scale(1.03);
}

#btnAddNatRule:hover {
    background: rgba(147, 51, 234, 0.25) !important;
    border-color: rgba(147, 51, 234, 0.7) !important;
    transform: scale(1.03);
}

/* Cyberpunk High-Tech Dashboard Elements */
.tech-meter {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.tech-meter-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 8px currentColor;
}

.bar-cpu {
    background: #fbbf24;
    color: rgba(251, 191, 36, 0.4);
}

.bar-memory {
    background: #c084fc;
    color: rgba(147, 51, 234, 0.4);
}

.console-panel {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.05) !important;
    font-family: "Courier New", Courier, monospace !important;
    padding: 0 !important;
    overflow: hidden;
}

.console-header {
    background: rgba(30, 41, 59, 0.7);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.console-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-red {
    background: #ef4444;
}
.dot-yellow {
    background: #eab308;
}
.dot-green {
    background: #22c55e;
}

.console-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.console-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: #e2e8f0;
}

.console-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.console-prompt {
    color: #38bdf8;
    font-weight: bold;
}

.blinking-cursor {
    font-weight: bold;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from,
    to {
        color: transparent;
    }
    50% {
        color: #38bdf8;
    }
}

.text-success {
    color: #4ade80 !important;
}
.text-primary {
    color: #818cf8 !important;
}
.text-secondary {
    color: #c084fc !important;
}
.text-warning {
    color: #fbbf24 !important;
}

/* Grid for split layout */
.dashboard-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1.1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1400px) and (min-width: 769px) {
    .sidebar {
        width: 80px !important;
        padding: 2rem 0.5rem !important;
        align-items: center !important;
    }

    .sidebar-header {
        justify-content: center !important;
        margin-bottom: 3rem !important;
        font-size: 0 !important;
    }

    .sidebar-header i {
        font-size: 1.5rem !important;
        margin: 0 !important;
    }

    .sidebar-header span {
        display: none !important;
    }

    .sidebar-nav {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .sidebar-footer {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .nav-item {
        width: 48px !important;
        height: 48px !important;
        padding: 0 !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 0 !important;
        gap: 0 !important;
        border-radius: 12px !important;
    }

    .nav-item i {
        font-size: 1.25rem !important;
        margin: 0 !important;
    }
}

@media (max-width: 1100px) {
    /* Responsive Header & Buttons */
    .header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .header-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .header-actions .btn {
        flex: 1 !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        padding: 0.6rem 0.8rem !important;
        white-space: nowrap !important;
    }

    /* Table horizontal scrolling */
    .desktop-table-view {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Stack forms/cards with beautiful spacing */
    .create-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    .sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 65px !important;
        flex-direction: row !important;
        padding: 0 0.5rem !important;
        border-right: none !important;
        border-top: 1px solid var(--border) !important;
        z-index: 1000 !important;
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        justify-content: space-around !important;
        align-items: center !important;
    }

    .sidebar-header {
        display: none !important;
    }

    .sidebar-nav {
        display: contents !important;
    }

    .sidebar-footer {
        display: contents !important;
    }

    .nav-item {
        flex-direction: column !important;
        gap: 0.15rem !important;
        padding: 0.35rem 0 !important;
        font-size: 0.65rem !important;
        margin-bottom: 0 !important;
        border-radius: 0 !important;
        flex: 1 !important;
        height: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        background: transparent !important;
        color: var(--text-muted) !important;
    }

    .nav-item i {
        font-size: 1.15rem !important;
    }

    .nav-item.active,
    .nav-item:hover {
        color: var(--primary) !important;
        background: transparent !important;
    }

    .main-content {
        padding: 1.5rem 1rem 5.5rem 1rem !important;
        overflow-y: visible !important;
        width: 100% !important;
    }

    /* Table & Cards Toggle */
    .data-table-container {
        background: none !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .desktop-table-view {
        display: none !important;
    }

    .mobile-cards-view {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        margin-top: 1rem !important;
        width: 100% !important;
    }

    /* Premium Cards Styling */
    .vpn-card {
        background: var(--bg-card) !important;
        border: 1px solid var(--border) !important;
        border-radius: 16px !important;
        overflow: hidden !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        flex-direction: column !important;
        transition: transform 0.3s !important;
    }

    .vpn-card__header {
        background: linear-gradient(
            135deg,
            rgba(99, 102, 241, 0.25),
            rgba(147, 51, 234, 0.25)
        ) !important;
        padding: 0.85rem 1.25rem !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .vpn-card__header-left {
        display: flex !important;
        align-items: center !important;
        gap: 0.65rem !important;
        min-width: 0 !important;
        flex: 1 !important;
        margin-right: 0.5rem !important;
    }

    .vpn-card__badge {
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        width: 26px !important;
        height: 26px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        flex-shrink: 0 !important;
    }

    .vpn-card__username {
        color: white !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
    }

    .vpn-card__header-right .status-badge {
        padding: 0.35rem 0.85rem !important;
        font-size: 0.75rem !important;
        border-radius: 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }

    .vpn-card__header-right .status-badge i {
        font-size: 0.65rem !important;
    }

    .vpn-card__body {
        padding: 1.25rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .vpn-card__grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    .vpn-card__block {
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--border) !important;
        border-radius: 12px !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.35rem !important;
    }

    .vpn-card__block-label {
        color: var(--text-muted) !important;
        font-size: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }

    .vpn-card__block-value {
        color: var(--text-main) !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
    }

    .vpn-card__row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.3rem !important;
        padding-bottom: 0.75rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .vpn-card__row-label {
        color: var(--text-muted) !important;
        font-size: 0.8rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-shrink: 0 !important;
    }

    .vpn-card__row-value {
        color: var(--text-main) !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        text-align: left !important;
        word-break: break-all !important;
        margin-left: 0 !important;
        width: 100% !important;
    }

    .vpn-card__actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
        margin-top: 0.5rem !important;
    }

    .btn-card {
        border-radius: 12px !important;
        padding: 0.65rem 1rem !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        border: none !important;
        cursor: pointer !important;
        text-decoration: none !important;
        transition: all 0.3s !important;
    }

    .btn-card--info {
        grid-column: span 1 !important;
        background: rgba(99, 102, 241, 0.12) !important;
        border: 1px solid rgba(99, 102, 241, 0.35) !important;
        color: #a5b4fc !important;
    }

    .btn-card--info:hover {
        background: rgba(99, 102, 241, 0.25) !important;
    }

    .btn-card--password {
        grid-column: span 1 !important;
        background: rgba(147, 51, 234, 0.12) !important;
        border: 1px solid rgba(147, 51, 234, 0.35) !important;
        color: #d8b4fe !important;
    }

    .btn-card--password:hover {
        background: rgba(147, 51, 234, 0.25) !important;
    }

    .btn-card--danger {
        grid-column: span 1 !important;
        background: rgba(244, 63, 94, 0.12) !important;
        border: 1px solid rgba(244, 63, 94, 0.35) !important;
        color: #fda4af !important;
    }

    .btn-card--danger:hover {
        background: rgba(244, 63, 94, 0.25) !important;
    }

    .btn-card--toggle {
        grid-column: span 1 !important;
        background: rgba(251, 191, 36, 0.12) !important;
        border: 1px solid rgba(251, 191, 36, 0.35) !important;
        color: #fbbf24 !important;
    }

    .btn-card--toggle:hover {
        background: rgba(251, 191, 36, 0.25) !important;
    }

    .vpn-card__footer {
        margin-top: 0.5rem !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .vpn-card__toggle {
        background: none !important;
        border: none !important;
        color: var(--primary) !important;
        font-weight: 600 !important;
        font-size: 0.85rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        cursor: pointer !important;
    }

    /* Create Page Responsive Styling */
    .create-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .card--full-height {
        height: auto !important;
    }

    .create-grid .stat-card {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        backdrop-filter: none !important;
        margin-bottom: 2.5rem !important;
    }

    .script-box {
        min-height: 250px !important;
        padding: 1rem !important;
        font-size: 0.8rem !important;
    }
}

/* Default state for Desktop vs Mobile views */
.desktop-table-view {
    display: block;
}

.mobile-cards-view {
    display: none;
}

/* Premium High-Tech View All Button */
.btn-view-all {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

.btn-view-all:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.6) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* Premium Dark Flatpickr Calendar Custom Styles */
.flatpickr-calendar {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
    border-radius: 0.75rem !important;
    font-family: "Inter", sans-serif !important;
}

.flatpickr-calendar .flatpickr-months {
    background: transparent !important;
    padding-top: 0.5rem !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-month {
    color: var(--text-main) !important;
}

.flatpickr-calendar .flatpickr-current-month {
    font-weight: 600 !important;
}

.flatpickr-calendar
    .flatpickr-current-month
    .numInputWrapper
    span.arrowUp:after {
    border-bottom-color: var(--text-main) !important;
}

.flatpickr-calendar
    .flatpickr-current-month
    .numInputWrapper
    span.arrowDown:after {
    border-top-color: var(--text-main) !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
    padding: 0.5rem !important;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover {
    color: var(--primary) !important;
}

.flatpickr-calendar .flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

.flatpickr-calendar .flatpickr-day {
    color: var(--text-main) !important;
    border-radius: 0.35rem !important;
}

.flatpickr-calendar .flatpickr-day.today {
    border-color: var(--primary) !important;
    font-weight: bold !important;
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

.flatpickr-calendar .flatpickr-day:hover,
.flatpickr-calendar .flatpickr-day.prevMonthDay:hover,
.flatpickr-calendar .flatpickr-day.nextMonthDay:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: transparent !important;
    color: white !important;
}

.flatpickr-calendar .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar .flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.15) !important;
}

/* ── Authentication Scoped Styles ──────────────── */
.auth-page {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(
            at 0% 0%,
            rgba(99, 102, 241, 0.15) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 100% 100%,
            rgba(79, 70, 229, 0.15) 0px,
            transparent 50%
        );
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    overflow: hidden;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: fadeInAuth 0.8s ease-out;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

@keyframes fadeInAuth {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Auth Styles */
@media (max-width: 768px) {
    .auth-page {
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        overflow-y: auto !important;
        padding: 24px 0 !important;
    }

    .auth-container {
        margin: auto !important;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 24px !important;
        border-radius: 20px !important;
    }

    .login-header {
        margin-bottom: 24px !important;
    }

    .login-logo {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
    }

    .login-header h1 {
        font-size: 22px !important;
    }

    .btn-login {
        padding: 12px !important;
    }
}

/* ── Settings Page Custom Styles ───────────────── */
.test-response {
    display: none;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    align-items: center;
    gap: 0.5rem;
}

.test-response--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.test-response--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.alert-settings-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-test-connection {
    flex: 1;
    border: 1px solid rgba(147, 51, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ── Custom VPN Creation Styles ────────────────── */
.section-divider {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.section-title {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.nat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.nat-section-title {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.btn-add-nat {
    font-size: 0.725rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(147, 51, 234, 0.4);
    background: rgba(147, 51, 234, 0.1);
    color: #d8b4fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-nat:hover {
    background: rgba(147, 51, 234, 0.2);
    transform: translateY(-1px);
}

.nat-rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nat-rule-card {
    background: rgba(30, 41, 59, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    position: relative;
    transition: all 0.3s ease;
}

.nat-rule-card:hover {
    border-color: rgba(147, 51, 234, 0.3) !important;
    background: rgba(30, 41, 59, 0.4) !important;
}

.nat-rule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.nat-rule-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-row-no-margin {
    margin-bottom: 0 !important;
}

.form-actions-mt {
    margin-top: 1.5rem;
}

.btn-create-custom {
    background: linear-gradient(
        135deg,
        var(--secondary),
        var(--primary)
    ) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.btn-create-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.4);
}

.btn-remove-rule {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.btn-remove-rule:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* -- Settings Specific Utilities ---------------- */
.form-group-last {
    margin-bottom: 2rem !important;
}
.form-actions-row {
    display: flex;
    gap: 1rem;
}
.section-icon-warning {
    color: #f59e0b !important;
}
.stat-label-desc {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}
.test-response-inline {
    display: flex;
    margin-bottom: 1.5rem;
}
.btn-block {
    width: 100%;
}

.mb-1-5 {
    margin-bottom: 1.5rem !important;
}
.text-primary {
    color: var(--primary) !important;
}

.btn-expand-nat {
    margin-left: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 0;
}

.btn-expand-nat:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-expand-nat i {
    font-size: 0.7rem;
}

.form-group label i,
.login-form label i,
.form-label i {
    margin-right: 8px !important;
    width: 16px;
    text-align: center;
    vertical-align: middle;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
    animation: shakeHorizontal 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.alert-danger i {
    font-size: 1.1rem !important;
    color: #f87171 !important;
    margin-right: 0 !important;
}

@keyframes shakeHorizontal {
    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }
    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }
    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

/* -- 404 Error Page Specific --------------------- */
.error-container {
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: clamp(6rem, 15vw, 9rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.3));
    animation: pulseText 3s infinite alternate ease-in-out;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.error-desc {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn-error-home {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-error-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    color: white;
}

@keyframes pulseText {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.04);
        opacity: 0.9;
    }
}

/* ── Dashboard Mobile Overrides ────────────────── */
@media (max-width: 768px) {
    .dashboard-grid-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    .dashboard-grid-layout > * {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important; /* Forces the horizontal wrappers inside to trigger scrolls */
    }

    .table-header-block {
        padding: 1.25rem 1rem !important;
    }

    .table-card-title {
        font-size: 1.1rem !important;
    }

    .table-responsive-wrapper .data-table td,
    .table-responsive-wrapper .data-table th {
        padding: 0.75rem 0.85rem !important;
    }

    .console-body {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 1rem !important;
    }

    /* Restore setting card spacing on mobile to prevent rounded clipping */
    .settings-grid-mobile .stat-card {
        padding: 1.5rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border) !important;
        box-shadow: var(--shadow) !important;
        backdrop-filter: blur(10px) !important;
        margin-bottom: 0 !important; /* Eliminate double margin gap for better layout */
    }

    /* Maximize horizontal room for search and pagination on mobile */
    .table-toolbar {
        padding: 0.75rem 0 !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .table-header-block {
        padding: 1rem !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important; /* Keep in row to ensure premium feel, but scale font */
    }

    .table-card-title {
        font-size: 0.9rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important; /* Ensure long titles don't break the row */
    }

    .btn-view-all {
        font-size: 0.725rem !important;
        padding: 0.35rem 0.65rem !important;
        flex-shrink: 0 !important; /* Never squeeze the button */
    }

    /* ── VPN Show Page (Metadata Detail) Mobile Fixes ── */
    .info-list--horizontal {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .port-mapping {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Stack setting form action buttons on very small viewports */
    .form-actions-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
}
