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

:root {
    /* Brand Colors */
    --primary: #1c77ba;
    --primary-light: #3889c9;
    --secondary: #696a6b;
    --disabled: #7a7b7d;
    --success: #00C08D;
    --warning: #FF9700;
    --danger: #dc552a;
    --info: #85addc;

    /* Base Colors & Layout */
    --bg-color: #F5F7FA;
    --surface-color: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.12);

    /* Sidebar Variables */
    --sidebar-width: 280px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: 12px;
    padding: 10px 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    z-index: 200;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

.skip-link:focus {
    clip-path: none;
    width: auto;
    height: auto;
    overflow: visible;
    outline: 2px solid var(--text-main);
    outline-offset: 2px;
}

.header-title .font-bold {
    font-weight: 700;
}

/* Dashboard home (ControlNG) */
.dash-welcome {
    margin-bottom: 32px;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dash-welcome__eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.dash-welcome__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    color: var(--text-main);
}

.dash-welcome__lead {
    font-size: 15px;
    color: var(--text-muted);
}

.dash-services__heading {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
}

.dash-services__grid {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dash-services__grid>li {
    height: 100%;
}

@media (min-width: 640px) {
    .dash-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dash-services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 100%;
    height: 100%;
    background-color: var(--surface-color);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

.service-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.service-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.service-card__nameblock {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.service-card__icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(28, 119, 186, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-card__icon-wrap {
    background: var(--primary);
    color: #fff;
}

.service-card__icon {
    width: 24px;
    height: 24px;
}

.service-card__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.service-card__desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.service-card__countrow {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.service-card__count {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
}

.service-card__count-label {
    font-size: 13px;
    color: var(--text-muted);
}

.service-card__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.service-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    padding: 5px 10px;
    width: fit-content;
}

.service-card__badge--ok {
    background-color: rgba(131, 187, 50, 0.1);
    color: var(--success);
}

.service-card__badge--warn {
    background-color: rgba(255, 151, 0, 0.12);
    color: var(--warning);
}

.service-card__badge-icon {
    width: 13px;
    height: 13px;
}

.service-card__note {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.service-card__cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card__cta--after-meta {
    margin-top: 0;
}

.service-card:hover .service-card__cta {
    opacity: 1;
}

.service-card__cta-icon {
    width: 13px;
    height: 13px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-light);
}

.text-important {
    font-weight: 600;
}

/* Layout Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: stretch;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    gap: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-brand {
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar.collapsed .sidebar-brand-link {
    justify-content: center;
    padding: 0;
}

.logo-collapsed {
    display: none;
}

.sidebar.collapsed .logo-full {
    display: none;
}

.sidebar.collapsed .logo-collapsed {
    display: block !important;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed .sidebar-nav {
    padding: 24px 8px;
}

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

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 12px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-label {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.nav-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.nav-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.sidebar.collapsed .nav-item-header {
    justify-content: center;
    padding: 12px 0;
}

.nav-item-header .nav-text {
    flex: 1;
    transition: opacity 0.2s;
}

.sidebar.collapsed .nav-item-header .nav-text {
    display: none;
}

.nav-item-header svg {
    color: var(--text-muted);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20px;
    height: 20px;
}

.submenu-toggle {
    margin-left: auto;
    transition: transform 0.3s ease !important;
}

.sidebar.collapsed .submenu-toggle {
    display: none;
}

.nav-item-header:hover {
    background: rgba(28, 119, 186, 0.05);
    color: var(--text-main);
}

.nav-item-header:hover svg {
    color: var(--primary);
}

.nav-item.active>.nav-item-header,
.nav-item-single.active {
    background: rgba(28, 119, 186, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active>.nav-item-header svg,
.nav-item-single.active svg {
    color: var(--primary);
}

/* Submenu layout */
.submenu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 38px;
    padding-right: 14px;
    padding-top: 4px;
    padding-bottom: 8px;
    position: relative;
}

.submenu::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 16px;
    width: 1px;
    background: var(--border-color);
}

.nav-item.open .submenu {
    display: flex;
}

.nav-item.open .submenu-toggle {
    transform: rotate(180deg);
}

.submenu-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--secondary);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.submenu-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 50%;
    width: 10px;
    height: 1px;
    background: var(--border-color);
}

.submenu-item:hover {
    color: var(--text-main);
    background: rgba(28, 119, 186, 0.05);
}

.submenu-item.active {
    color: var(--primary);
    font-weight: 600;
    background: transparent;
}

.submenu-item.active::before {
    background: var(--primary);
}

.sidebar.collapsed .submenu {
    display: none !important;
}

/* For single items without submenu */
.nav-item-single {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 4px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.sidebar.collapsed .nav-item-single {
    justify-content: center;
    padding: 12px 0;
}

.nav-item-single .nav-text {
    flex: 1;
}

.sidebar.collapsed .nav-item-single .nav-text {
    display: none;
}

.nav-item-single svg {
    color: var(--text-muted);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20px;
    height: 20px;
}

.nav-item-single:hover {
    background: rgba(28, 119, 186, 0.05);
    color: var(--text-main);
}

.nav-item-single:hover svg {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    transition: justify-content 0.3s ease;
}

.sidebar.collapsed .sidebar-footer {
    justify-content: center;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle-btn svg {
    width: 24px;
    height: 24px;
}

.sidebar-toggle-btn:hover {
    background: rgba(28, 119, 186, 0.05);
    color: var(--text-main);
}

.sidebar.collapsed .sidebar-toggle-btn {
    transform: rotate(180deg);
}

/* Fix main wrapper margin when collapsed */
.sidebar.collapsed~.main-wrapper {
    margin-left: 80px;
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background-color: var(--bg-color);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--danger);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile:hover {
    background-color: var(--bg-color);
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Content Area */
.content-area {
    padding: 32px;
    flex: 1;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 8px;
}

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

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Cards */
.card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.03);
}

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

.card-title {
    font-size: 16px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-value {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background-color: rgba(0, 192, 141, 0.1);
    color: var(--success);
}

.status-warning {
    background-color: rgba(255, 151, 0, 0.12);
    color: var(--warning);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    background-color: var(--primary);
}

.progress-bar.success {
    background-color: var(--success);
}

.progress-bar.warning {
    background-color: var(--warning);
}

.progress-bar.danger {
    background-color: var(--danger);
}

/* Latest Actions List */
.action-list {
    list-style: none;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.action-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(28, 119, 186, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.action-icon.success {
    background-color: rgba(131, 187, 50, 0.1);
    color: var(--success);
}

.action-content {
    flex: 1;
}

.action-title {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.action-desc {
    color: var(--text-muted);
    font-size: 12px;
}

.action-time {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 1024px) {

    .dashboard-grid,
    .detail-grid,
    .ring-charts-container {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {

    /* Auto-collapse sidebar on mobile */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }

    .main-wrapper,
    .sidebar.collapsed~.main-wrapper {
        margin-left: 0;
    }

    .top-header {
        padding: 0 16px;
    }

    .content-area {
        padding: 16px;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
        gap: 16px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .header-title {
        font-size: 16px;
    }

    .user-menu-text {
        display: none !important;
    }

    .user-menu-chevron {
        display: none !important;
    }
}

/* ── ControlNG shell: brand, header, tema, menu utente, VPS table ───────── */
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
    padding: 0 24px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color);
}

.sidebar.collapsed .sidebar-brand-link {
    justify-content: center;
    padding: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.bc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
}

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

.bc-sep {
    color: #cbd5e1;
}

.bc-active {
    font-weight: 700;
    color: var(--text-main);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.theme-toggle-btn:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.user-menu-dropdown-wrap {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: start;
    transition: background 0.2s;
}

.user-menu-trigger:hover {
    background: var(--bg-color);
}

.user-menu-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.user-menu-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.user-menu-role {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.user-menu-chevron {
    width: 14px;
    height: 14px;
    color: var(--secondary);
    margin-inline-start: 4px;
    transition: transform 0.2s ease;
}

.user-menu-panel {
    position: absolute;
    right: 0;
    margin-top: 8px;
    width: 224px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
    z-index: 100;
}

.user-menu-panel__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s;
}

.user-menu-panel__row:hover {
    background: var(--bg-color);
}

.user-menu-panel__row--danger {
    color: var(--danger);
    font-weight: 600;
}

.user-menu-panel__sep {
    height: 1px;
    margin: 8px 0;
    background: var(--border-color);
}

.user-menu-panel__icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.user-menu-panel__row--current {
    background: rgba(28, 119, 186, 0.08);
    font-weight: 600;
}

.user-menu-panel__row--current .user-menu-panel__icon {
    color: var(--primary);
}

.user-menu-trigger[aria-expanded="true"] .user-menu-chevron {
    transform: rotate(180deg);
}

/* Pulsanti condivisi (ControlNG) */
.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(28, 119, 186, 0.2);
    transition: transform 0.15s, background 0.2s;
    font-family: inherit;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(28, 119, 186, 0.05);
}

/* VPS list (ControlNG VpsList) */
.vps-cell-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.vps-ip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.copy-ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.copy-ip-btn:hover {
    color: var(--primary);
    background: rgba(28, 119, 186, 0.08);
}

.vps-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 6px;
}

.vps-state-pill--online {
    color: var(--success);
    background: rgba(0, 192, 141, 0.1);
}

.vps-state-pill--offline {
    color: var(--danger);
    background: rgba(220, 85, 42, 0.1);
}

.vps-state-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 192, 141, 0.55);
}

.vps-state-dot--off {
    background: var(--danger);
    box-shadow: none;
}

.sys-res-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.os-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.os-wrap .os-icon {
    margin: 0;
}

.plan-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.res-line {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 220px;
}

.dc-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.dc-ping {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.dc-ping::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success);
    opacity: 0.75;
    animation: dc-ping 1.5s ease-out infinite;
}

@keyframes dc-ping {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.bill-cost {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.bill-muted {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.bill-exp {
    font-size: 12px;
    color: var(--text-muted);
}

.auto-renew-switch {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.auto-renew-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.auto-renew-switch--on {
    background: var(--primary);
}

.auto-renew-switch--on::after {
    transform: translateX(20px);
}

.dark .auto-renew-switch:not(.auto-renew-switch--on) {
    background: #475569;
}

/* Host Bucket list cards */
.bucket-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .bucket-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .bucket-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bucket-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s;
}

.bucket-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.bucket-card--dim {
    opacity: 0.7;
}

.bucket-card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px;
}

.bucket-card__title a {
    color: inherit;
    text-decoration: none;
}

.bucket-card__title a:hover {
    color: var(--primary);
}

.bucket-card__muted {
    color: var(--text-muted);
    font-weight: 400;
}

.bucket-card__ip {
    font-size: 14px;
    color: var(--text-muted);
    font-family: ui-monospace, monospace;
    margin-top: 4px;
}

.bucket-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 13px;
}

.bucket-status--ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-weight: 600;
}

.bucket-status--warn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--warning);
    font-weight: 600;
}

/* Dark mode (ControlNG) */
.dark body {
    background-color: #151b23;
    color: #f8fafc;
}

.dark .sidebar,
.dark .top-header,
.dark .dash-welcome,
.dark .service-card,
.dark .vps-table-card,
.dark .bucket-card,
.dark .user-menu-panel {
    background-color: #1c2128;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.dark .sidebar-brand-link {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .nav-label,
.dark .nav-item-header,
.dark .submenu-item,
.dark .nav-item-single,
.dark .bc-link,
.dark .user-menu-role,
.dark .dash-welcome__lead,
.dark .service-card__desc,
.dark .service-card__count-label,
.dark .res-line,
.dark .bill-exp,
.dark .bill-muted,
.dark .vps-ip-row,
.dark .bucket-card__ip {
    color: #94a3b8;
}

.dark .nav-item-single.active,
.dark .submenu-item.active,
.dark .bc-active,
.dark .user-menu-name,
.dark .dash-welcome__title,
.dark .service-card__name,
.dark .service-card__count,
.dark .vps-cell-name,
.dark .bill-cost,
.dark .dc-cell {
    color: #f8fafc;
}

.dark .logo-full {
    filter: brightness(0) invert(1);
}

.dark .logo-collapsed {
    filter: brightness(0) invert(1);
}

.dark .data-table th {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.dark .data-table td {
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.dark .data-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.dark .os-wrap {
    background: #1c2128;
    border-color: rgba(255, 255, 255, 0.12);
}

.dark .theme-toggle-btn:hover,
.dark .user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dark .user-menu-panel__row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dark .user-menu-panel__row--current {
    background: rgba(28, 119, 186, 0.2);
}

.dark .user-menu-panel__icon {
    color: #94a3b8;
}

.dark .user-menu-panel__row--current .user-menu-panel__icon {
    color: #7eb8e8;
}

.dark .service-card__icon-wrap {
    background: rgba(28, 119, 186, 0.2);
}

.dark .service-card__badge--warn {
    background: rgba(255, 151, 0, 0.15);
}

.dark .chart-container {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

.dark .info-item {
    border-color: rgba(255, 255, 255, 0.08);
}