/* VM manage — inspired by Frontstore app-hosting-manage */
/* VM manage — full width trong content-area profile */
[x-cloak] { display: none !important; }
.vm-manage-page { width: 100%; max-width: 100%; box-sizing: border-box; }
.vm-hub-page { width: 100%; max-width: 100%; overflow: visible; }
.vm-flash { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .875rem; }
.vm-flash--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.vm-flash--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.vm-manage-header { margin-bottom: 1.25rem; }
.vm-manage-header__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; }
.vm-manage-header__back { color: #059669; font-size: .875rem; text-decoration: none; }
.vm-manage-header__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.vm-manage-header__title { font-size: 1.5rem; font-weight: 700; margin: .5rem 0 0; }
.vm-manage-header__sub { color: #6b7280; font-size: .875rem; margin: .25rem 0 0; }
.vm-manage-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .vm-manage-layout { grid-template-columns: 1fr; } }
.vm-manage-nav { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem; }
.vm-manage-nav__runtime { border-bottom: 1px solid #f3f4f6; padding-bottom: .75rem; margin-bottom: .75rem; }
.vm-manage-nav__status { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.vm-manage-nav__hint { font-size: .75rem; color: #6b7280; margin: 0; }
.vm-manage-nav__hint--warn { color: #b45309; }
.vm-manage-nav__list { display: flex; flex-direction: column; gap: .25rem; }
.vm-manage-nav__link { display: block; padding: .5rem .65rem; border-radius: .5rem; color: #374151; text-decoration: none; font-size: .875rem; }
.vm-manage-nav__link:hover { background: #f9fafb; }
.vm-manage-nav__link--active { background: #ecfdf5; color: #047857; font-weight: 600; }
.vm-manage-nav__stats { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #f3f4f6; }
.vm-manage-nav__stats-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #9ca3af; margin-bottom: .5rem; }
.vm-manage-workspace { min-width: 0; }
.vm-status-pill { display: inline-block; font-size: .7rem; font-weight: 600; padding: .2rem .5rem; border-radius: 999px; }
.vm-status-pill--success { background: #d1fae5; color: #065f46; }
.vm-status-pill--info { background: #dbeafe; color: #1e40af; }
.vm-status-pill--danger { background: #fee2e2; color: #991b1b; }
.vm-status-pill--muted { background: #f3f4f6; color: #4b5563; }
.vm-power-controls { display: flex; gap: .35rem; }
.vm-power-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: .375rem;
    background: #fff;
    cursor: pointer;
    line-height: 0;
    color: #4b5563;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.vm-power-btn__icon {
    font-size: .8125rem;
    line-height: 1;
    width: 1em;
    text-align: center;
    flex-shrink: 0;
    pointer-events: none;
}
.vm-power-btn:hover:not(:disabled) { background: #f9fafb; }
.vm-power-btn:disabled { opacity: .45; cursor: not-allowed; }
.vm-power-btn--start { color: #059669; }
.vm-power-btn--start:hover:not(:disabled) { background: #ecfdf5; border-color: #a7f3d0; }
.vm-power-btn--reboot { color: #2563eb; }
.vm-power-btn--reboot:hover:not(:disabled) { background: #eff6ff; border-color: #bfdbfe; }
.vm-power-btn--shutdown { color: #d97706; }
.vm-power-btn--shutdown:hover:not(:disabled) { background: #fffbeb; border-color: #fde68a; }
.vm-power-btn--danger { color: #dc2626; }
.vm-power-btn--danger:hover:not(:disabled) { background: #fef2f2; border-color: #fecaca; }
.vm-resource-list { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.vm-resource-list li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid #f9fafb; }
.vm-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1.25rem; margin-bottom: 1rem; }
.vm-panel__title { font-size: 1rem; font-weight: 600; margin: 0 0 1rem; }
.vm-dl > div { display: grid; grid-template-columns: 120px 1fr; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid #f9fafb; font-size: .875rem; }
.vm-dl dt { color: #6b7280; }
.vm-hint { margin-top: 1rem; font-size: .8rem; color: #4b5563; background: #f9fafb; padding: .75rem; border-radius: .5rem; }
.vm-alert { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .875rem; }
.vm-alert--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.vm-alert--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.vm-alert--err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.vm-hub-incident { line-height: 1.55; }
.vm-hub-incident__link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.vm-hub-incident__link:hover { opacity: .9; }
.vm-customer-notice {
    margin: 0 0 .75rem;
    padding: .625rem .85rem;
    border-radius: .5rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: #475569;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}
.vm-hub-table .vm-customer-notice {
    margin-top: .35rem;
    margin-bottom: 0;
    max-width: 18rem;
    font-size: .75rem;
}
.vm-chip { display: inline-block; font-size: .75rem; padding: .2rem .55rem; border-radius: 999px; }
.vm-chip--muted { background: #f3f4f6; color: #4b5563; }
.vm-chip--urgent { background: #fef3c7; color: #92400e; }
.vm-chip--ok { background: #d1fae5; color: #065f46; }
.vm-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .45rem .85rem; border-radius: .5rem; font-size: .875rem; font-weight: 600; line-height: 1.25; text-decoration: none; border: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; white-space: nowrap; }
.vm-btn__icon { font-size: .875rem; line-height: 1; opacity: .92; flex-shrink: 0; }
.vm-btn__icon--access { color: #3b82f6; opacity: 1; }
.vm-btn__icon--disk { color: #0ea5e9; opacity: 1; }
.vm-btn__icon--renew { color: #059669; opacity: 1; }
.vm-btn__icon--upgrade { color: #6366f1; opacity: 1; }
.vm-btn__icon--upgrade-lite { color: #2563eb; opacity: 1; }
.vm-btn__icon--reinstall { color: #dc2626; opacity: 1; }
.vm-btn__icon--password { color: #a855f7; opacity: 1; }
.vm-btn--primary .vm-btn__icon--access { color: #fff; }
.vm-btn:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 2px; }
.vm-btn--outline { border: 1px solid #059669; color: #059669; background: #fff; }
.vm-btn--outline:hover:not(:disabled) { background: #ecfdf5; }
.vm-btn--secondary { background: #f3f4f6; border: 1px solid #e5e7eb; color: #374151; }
.vm-btn--secondary:hover:not(:disabled) { background: #e5e7eb; color: #111827; }
.vm-btn--danger-soft { background: #fff; border: 1px solid #fecaca; color: #b91c1c; }
.vm-btn--danger-soft:hover:not(:disabled) { background: #fef2f2; border-color: #fca5a5; }
.vm-btn--block { width: 100%; }
.vm-btn--xs { padding: .25rem .55rem; font-size: .75rem; min-height: 1.85rem; }
.vm-btn--sm { padding: .35rem .65rem; font-size: .8125rem; min-height: 2.15rem; }
.vm-btn--md { padding: .55rem .85rem; font-size: .8125rem; min-height: 2.5rem; }
.vm-btn--ghost { background: transparent; border: 1px solid #e5e7eb; color: #374151; }
.vm-btn--ghost:hover:not(:disabled) { background: #f9fafb; }
.vm-hub-page__actions { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.vm-btn--iso {
    gap: .45rem;
    font-weight: 600;
    color: #047857;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
    border: 1px solid #86efac;
    box-shadow: 0 1px 2px rgb(5 150 105 / 6%);
    transition: border-color .15s, background .15s, box-shadow .15s, color .15s;
}
.vm-btn--iso:hover {
    background: #ecfdf5;
    border-color: #4ade80;
    box-shadow: 0 2px 6px rgb(5 150 105 / 10%);
    color: #065f46;
}
.vm-btn--iso__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: .35rem;
    background: rgba(5, 150, 105, 0.12);
    flex-shrink: 0;
}
.vm-btn--iso__logo { width: .95rem; height: .95rem; object-fit: contain; display: block; }
.vm-btn--iso__label { line-height: 1; white-space: nowrap; }
.vm-btn--iso--locked {
    opacity: .78;
    border-style: dashed;
    border-color: #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    box-shadow: none;
}
.vm-btn--iso--locked:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #4b5563;
    box-shadow: none;
}
.vm-btn--iso--locked .vm-btn--iso__icon { background: #eef2f7; opacity: .85; }
.vm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.vm-table th, .vm-table td { padding: .6rem .5rem; border-bottom: 1px solid #f3f4f6; text-align: left; }
.vm-link { color: #059669; }
.vm-timeline__item { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid #f3f4f6; }
.vm-timeline__time { font-size: .75rem; color: #6b7280; }
.vm-timeline__type { font-weight: 600; font-size: .875rem; }
.vm-timeline__payload { font-size: .7rem; background: #f9fafb; padding: .5rem; border-radius: .375rem; overflow-x: auto; max-height: 120px; }
.vm-list-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.vm-card { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.vm-card__title { font-weight: 600; color: #059669; text-decoration: none; font-size: 1.05rem; }
.vm-card__meta { font-size: .8rem; color: #6b7280; }

/* Setup / provisioning wizard */
.vm-setup-page { max-width: 960px; }
.vm-setup-header { margin-bottom: 1.25rem; }
.vm-setup-header__title { font-size: 1.5rem; font-weight: 700; margin: .5rem 0 0; }
.vm-setup-header__sub { color: #6b7280; font-size: .875rem; margin: .25rem 0 0; }
.vm-setup-grid { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .vm-setup-grid { grid-template-columns: 1fr; } }
.vm-setup-main__headline { font-size: 1.25rem; font-weight: 700; margin: 0 0 .5rem; }
.vm-setup-main__subline { color: #4b5563; font-size: .9rem; margin: 0 0 1.25rem; line-height: 1.5; }
.vm-setup-progress { height: .5rem; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-bottom: .35rem; }
.vm-setup-progress__bar { height: 100%; background: linear-gradient(90deg, #059669, #10b981); border-radius: 999px; transition: width .45s ease; }
.vm-setup-progress__pct { font-size: .75rem; color: #6b7280; margin: 0 0 1rem; text-align: right; }
.vm-setup-waiting { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: #4b5563; margin: 0; }
.vm-setup-waiting--inline { display: inline-flex; font-size: .8125rem; font-weight: 500; color: #6b7280; }
.vm-setup-spinner { width: 1rem; height: 1rem; border: 2px solid #d1d5db; border-top-color: #059669; border-radius: 50%; animation: vm-spin .8s linear infinite; flex-shrink: 0; }
@keyframes vm-spin { to { transform: rotate(360deg); } }
.vm-setup-ready { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f3f4f6; }
.vm-btn--primary { background: #059669; color: #fff; border: none; }
.vm-btn--primary:hover { background: #047857; }
.vm-stepper { list-style: none; margin: 0; padding: 0; }
.vm-stepper__item { display: flex; gap: .75rem; padding: .65rem 0; position: relative; }
.vm-stepper__item:not(:last-child)::before { content: ''; position: absolute; left: .55rem; top: 1.75rem; bottom: -.35rem; width: 2px; background: #e5e7eb; }
.vm-stepper__item--done:not(:last-child)::before { background: #a7f3d0; }
.vm-stepper__marker { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid #d1d5db; background: #fff; flex-shrink: 0; margin-top: .1rem; position: relative; z-index: 1; }
.vm-stepper__item--active .vm-stepper__marker { border-color: #059669; box-shadow: 0 0 0 3px #d1fae5; }
.vm-stepper__item--done .vm-stepper__marker { border-color: #059669; background: #059669; }
.vm-stepper__item--failed .vm-stepper__marker { border-color: #dc2626; background: #dc2626; }
.vm-stepper__label { display: block; font-weight: 600; font-size: .875rem; color: #111827; }
.vm-stepper__hint { display: block; font-size: .75rem; color: #6b7280; margin-top: .15rem; }
.vm-stepper__item--pending .vm-stepper__label { color: #9ca3af; }
.vm-stepper__item--active .vm-stepper__label { color: #047857; }

/* VM hub — single-page manage */
.vm-hub-page__header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.vm-hub-page__title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.vm-hub-page__sub { color: #6b7280; font-size: .875rem; margin: .25rem 0 0; }
.vm-hub-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: 100%;
    overflow: visible;
    padding: 6px 4px;
    box-sizing: border-box;
}
.vm-hub-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}
@media (min-width: 640px) {
    .vm-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .vm-hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.vm-service-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #10b981;
    border-radius: .75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -2px rgb(0 0 0 / 6%);
    /* visible: metrics + actions must not clip on narrow phones */
    overflow: visible;
    transition: box-shadow .2s ease, transform .2s ease;
}
/* Undo layout .content-area * { max-width:100% } breaking nested grids */
.vm-hub-page .vm-service-card,
.vm-hub-page .vm-service-card * {
    max-width: none;
}
.vm-hub-page .vm-service-card {
    max-width: 100%;
    width: 100%;
    min-width: 0;
}
.vm-service-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 8%);
}
.vm-service-card--success { border-left-color: #10b981; }
.vm-service-card--info { border-left-color: #3b82f6; }
.vm-service-card--danger { border-left-color: #ef4444; }
.vm-service-card--muted { border-left-color: #9ca3af; }
.vm-service-card__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "identity power"
        "meta meta";
    gap: .55rem .75rem;
    align-items: start;
    padding: 1rem 1.1rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    border-radius: .75rem .75rem 0 0;
    flex-shrink: 0;
}
.vm-service-card__identity {
    grid-area: identity;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-width: 0;
}
.vm-service-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.vm-service-card__logo { width: 2.125rem; height: 2.125rem; object-fit: contain; display: block; }
.vm-service-card__titles { min-width: 0; flex: 1; }
.vm-service-card__name,
.vm-hub-card__name { font-size: 1.05rem; font-weight: 700; margin: 0; color: #111827; line-height: 1.35; }
.vm-service-card__plan { font-size: .8125rem; color: #6b7280; margin: .15rem 0 0; line-height: 1.4; }
.vm-service-card__power {
    grid-area: power;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    align-self: start;
}
.vm-service-card__power .vm-power-controls {
    gap: .25rem;
}
.vm-service-card__power .vm-power-btn {
    width: 1.75rem;
    height: 1.75rem;
    font-size: .65rem;
    border-radius: .35rem;
}
.vm-service-card__meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .65rem;
    min-width: 0;
}
.vm-service-card__due {
    font-size: .75rem;
    color: #6b7280;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
}
.vm-service-card__due--urgent { color: #b45309; font-weight: 600; }
.vm-service-card__meta .vm-service-card__price {
    margin-left: auto;
}
.vm-service-card__commerce {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .65rem 1.1rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
    flex-shrink: 0;
}
.vm-service-card__commerce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2rem;
    padding: .35rem .7rem;
    border: 1px solid #d1d5db;
    border-radius: .45rem;
    background: #fff;
    color: #111827;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.vm-service-card__commerce-icon {
    font-size: .8125rem;
    line-height: 1;
    opacity: .9;
    color: #059669;
}
.vm-service-card__commerce-btn--renew .vm-service-card__commerce-icon {
    color: #fff;
    opacity: 1;
}
.vm-service-card__commerce-btn:hover {
    border-color: #a7f3d0;
    background: #f0fdf4;
    color: #047857;
}
.vm-service-card__commerce-btn:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}
.vm-service-card__commerce-btn--renew {
    border-color: #059669;
    background: #059669;
    color: #fff;
}
.vm-service-card__commerce-btn--renew:hover {
    border-color: #047857;
    background: #047857;
    color: #fff;
}
.vm-service-card__commerce-btn--urgent {
    border-color: #d97706;
    background: #d97706;
}
.vm-service-card__commerce-btn--urgent:hover {
    border-color: #b45309;
    background: #b45309;
}
.vm-service-card__sale {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.15rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
}
.vm-service-card__commerce-btn--renew .vm-service-card__sale,
.vm-service-card__commerce-btn--urgent .vm-service-card__sale {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}
.vm-service-card__body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1.1rem 1.1rem .85rem;
    flex: 1 0 auto; /* do not shrink under metrics on mobile */
    min-width: 0;
}
.vm-service-card__chip { align-self: flex-start; }
.vm-service-card__price {
    display: inline-flex;
    align-items: baseline;
    gap: .15rem;
    line-height: 1.2;
}
.vm-service-card__price-value {
    font-size: .9375rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}
.vm-service-card__price-unit {
    font-size: .6875rem;
    font-weight: 500;
    color: #9ca3af;
}
.vm-service-card__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem .5rem;
    margin: 0;
    font-size: .8125rem;
}
.vm-service-card__facts > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: .25rem;
    min-width: 0;
}
.vm-service-card__facts dt {
    color: #9ca3af;
    margin: 0;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.3;
}
.vm-service-card__facts dd {
    margin: 0;
    color: #374151;
    line-height: 1.45;
    word-break: break-word;
}
.vm-service-card__installing {
    margin: .75rem 0 0;
    font-size: .8125rem;
    color: #6b7280;
}
.vm-service-card__metrics {
    padding: .75rem;
    border: 1px solid #eef2f7;
    border-radius: .5rem;
    background: #f9fafb;
    flex-shrink: 0;
    min-width: 0;
}
.vm-service-card__metrics-title {
    margin: 0 0 .55rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9ca3af;
}
.vm-service-card__metrics-hint {
    margin: .45rem 0 0;
    font-size: .7rem;
    color: #9ca3af;
}
.vm-metrics-grid { display: grid; gap: .45rem; }
.vm-metrics-row {
    display: grid;
    grid-template-columns: 2.2rem 1fr 2.5rem;
    gap: .45rem;
    align-items: center;
}
.vm-metrics-row--net {
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
}
.vm-metrics-row__label {
    font-size: .7rem;
    font-weight: 600;
    color: #6b7280;
}
.vm-metrics-row__label--tx { text-align: right; }
.vm-metrics-row__bar {
    height: .45rem;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.vm-metrics-row__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .35s ease;
}
.vm-metrics-row__fill--cpu { background: linear-gradient(90deg, #34d399, #059669); }
.vm-metrics-row__fill--ram { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.vm-metrics-row__fill--disk { background: linear-gradient(90deg, #c084fc, #7c3aed); }
.vm-metrics-row__fill--backup { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.vm-metrics-row__value,
.vm-metrics-row__net {
    font-size: .7rem;
    font-weight: 600;
    color: #374151;
    text-align: right;
    white-space: nowrap;
}
.vm-service-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    padding: .85rem 1.1rem 1.1rem;
    margin-top: auto;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
    border-radius: 0 0 .75rem .75rem;
    flex-shrink: 0;
}
.vm-service-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    width: 100%;
    min-height: 2.75rem;
    padding: .6rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .55rem;
    background: #fff;
    color: #1f2937;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.vm-service-card__action:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #111827;
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
.vm-service-card__action:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}
.vm-service-card__action-label { line-height: 1.2; }
.vm-service-card__action-icon {
    font-size: 1rem;
    line-height: 1;
    width: 1.15em;
    text-align: center;
    flex-shrink: 0;
    opacity: 1;
}
.vm-service-card__action--access .vm-service-card__action-icon { color: #3b82f6; }
.vm-service-card__action--ops .vm-service-card__action-icon { color: #8b5cf6; }
.vm-service-card__action--backup .vm-service-card__action-icon { color: #0284c7; }
.vm-service-card__action--billing .vm-service-card__action-icon { color: #10b981; }
.vm-service-card__action--activity .vm-service-card__action-icon { color: #f97316; }
.vm-hub-backup-progress { margin-top: .15rem; }
.vm-hub-backup-progress__row {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.vm-hub-backup-progress__bar { flex: 1 1 auto; min-width: 0; }
.vm-hub-backup-cancel {
    flex: 0 0 auto;
    min-width: 2.15rem;
    padding-left: .55rem;
    padding-right: .55rem;
}
.vm-hub-backup-cancel .fa-trash { font-size: .8125rem; }
.vm-hub-backup-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    padding: 0 .15rem .55rem;
}
.vm-hub-backup-list-head .vm-hub-panel__section-title { margin: 0; }
.vm-hub-backup-count {
    font-size: .75rem;
    font-weight: 600;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.vm-hub-backup-flash {
    margin: 0 0 .65rem;
    font-size: .8125rem;
}
.vm-hub-backup-table { width: 100%; }
.vm-hub-backup-table__created {
    font-weight: 600;
    color: #111827;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.vm-hub-backup-table__expires {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.vm-hub-backup-table__row--busy td { opacity: .72; }
.vm-hub-backup-delete {
    min-width: 5.5rem;
    justify-content: center;
}
.vm-hub-backup-delete__state {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.vm-hub-backup-delete__spinner {
    width: .75rem;
    height: .75rem;
    border-width: 1.5px;
    border-top-color: #b91c1c;
    flex-shrink: 0;
}
@media (max-width: 520px) {
    .vm-hub-backup-table thead { display: none; }
    .vm-hub-backup-table,
    .vm-hub-backup-table tbody,
    .vm-hub-backup-table tr,
    .vm-hub-backup-table td {
        display: block;
        width: 100%;
    }
    .vm-hub-backup-table tr {
        padding: .75rem;
        border-bottom: 1px solid #eef2f7;
    }
    .vm-hub-backup-table tr:last-child { border-bottom: 0; }
    .vm-hub-backup-table td {
        padding: .15rem 0;
        text-align: left !important;
    }
    .vm-hub-backup-table__expires::before {
        content: 'Hết hạn ';
        font-weight: 600;
        color: #9ca3af;
        font-size: .7rem;
    }
    .vm-hub-backup-table .vm-table__actions { margin-top: .45rem; }
    .vm-hub-backup-delete { width: 100%; }
}
.vm-service-card__action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .25rem;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
}
.vm-hub-ops-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}
.vm-hub-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.vm-hub-panel__alert { margin: 0; }
.vm-hub-panel__section {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.vm-hub-panel__section--flush { gap: 0; }
.vm-hub-panel__section-title {
    margin: 0;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #9ca3af;
}
.vm-hub-panel__meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
@media (max-width: 520px) {
    .vm-hub-panel__meta-grid { grid-template-columns: 1fr; }
    .vm-hub-panel__field--full { grid-column: auto; }
}
.vm-hub-panel__field {
    padding: .7rem .75rem;
    border: 1px solid #eef2f7;
    border-radius: .5rem;
    background: #fafafa;
}
.vm-hub-panel__field--full { grid-column: 1 / -1; }
.vm-hub-panel__field dt {
    margin: 0 0 .25rem;
    font-size: .7rem;
    font-weight: 600;
    color: #9ca3af;
}
.vm-hub-panel__field dd {
    margin: 0;
    font-size: .875rem;
    color: #111827;
    line-height: 1.45;
    word-break: break-word;
}
.vm-hub-panel__hint {
    margin: 0;
    padding: .7rem .75rem;
    border: 1px solid #f3f4f6;
    border-radius: .5rem;
    background: #f9fafb;
    font-size: .8125rem;
    color: #6b7280;
    line-height: 1.5;
}
.vm-hub-panel__hint--compact {
    padding: .55rem .65rem;
    font-size: .75rem;
}
.vm-hub-panel__hint--warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}
.vm-hub-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    padding: .75rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #fff;
}
.vm-hub-panel__toolbar-label {
    margin-right: auto;
    font-size: .8125rem;
    font-weight: 600;
    color: #374151;
}
.vm-hub-panel__toolbar .vm-power-controls { margin-left: auto; }
.vm-hub-panel__cta { margin-bottom: .15rem; }
.vm-hub-panel__form-row { margin: 0; }
.vm-hub-panel__empty {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6b7280;
    font-size: .875rem;
}
.vm-hub-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.vm-hub-action-grid__cell { margin: 0; min-width: 0; }
@media (max-width: 520px) {
    .vm-hub-action-grid { grid-template-columns: 1fr; }
}
.vm-hub-panel__table {
    border: 1px solid #eef2f7;
    border-radius: .5rem;
    overflow: hidden;
    background: #fff;
}
.vm-table--panel { margin: 0; font-size: .8125rem; }
.vm-table--panel th {
    background: #f9fafb;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #6b7280;
}
.vm-table--panel td,
.vm-table--panel th { padding: .65rem .75rem; }
.vm-table__actions { text-align: right; white-space: nowrap; }
.vm-table__muted { font-size: .75rem; color: #9ca3af; }
.vm-hub-activity--panel {
    border: 1px solid #eef2f7;
    border-radius: .5rem;
    overflow: hidden;
    background: #fff;
}
.vm-hub-activity--panel .vm-hub-activity__item {
    padding: .7rem .75rem;
    border-bottom-color: #f3f4f6;
}
.vm-hub-activity--panel .vm-hub-activity__item:last-child { border-bottom: none; }
.vm-hub-empty-inline {
    margin: 0;
    color: #6b7280;
    font-size: .875rem;
    text-align: center;
    padding: 1rem 0;
}
.vm-hub-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    overflow: visible;
    width: 100%;
    transition: border-color .28s ease, box-shadow .28s ease;
    isolation: isolate;
}
.vm-hub-card--open {
    border-color: #a7f3d0;
    box-shadow: 0 4px 14px rgb(5 150 105 / 10%), 0 1px 3px rgb(0 0 0 / 6%);
}
.vm-hub-card--open .vm-hub-card__summary { border-bottom-color: #ecfdf5; }
.vm-hub-card__summary {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: background-color .2s ease, border-bottom-color .28s ease;
}
.vm-hub-card__summary:hover { background: #f9fafb; }
.vm-hub-card__summary:focus,
.vm-hub-card__summary:focus-visible { outline: none; }
.vm-hub-card__summary--link { text-decoration: none; color: inherit; display: flex; }
.vm-hub-card__summary--link:hover { background: #f9fafb; }
.vm-hub-card__main { flex: 1 1 12rem; min-width: 0; }
.vm-hub-card__name { font-size: 1.05rem; font-weight: 700; margin: 0; color: #111827; line-height: 1.35; }
.vm-editable-name { min-width: 0; }
.vm-editable-name__label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
}
.vm-editable-name__edit {
    border: none;
    background: transparent;
    padding: .1rem .25rem;
    font-size: .75rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease, color .15s ease;
    flex-shrink: 0;
}
.vm-editable-name__label:hover .vm-editable-name__edit,
.vm-editable-name__edit:focus-visible {
    opacity: 1;
}
.vm-editable-name__edit:hover { color: #059669; }
.vm-editable-name__form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    vertical-align: top;
}
.vm-editable-name__input {
    font: inherit;
    font-weight: 700;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    padding: .15rem .45rem;
    min-width: 8rem;
    max-width: min(100%, 20rem);
    box-shadow: none;
}
.vm-editable-name__input:focus,
.vm-editable-name__input:focus-visible { outline: none; border-color: #9ca3af; }
.vm-editable-name__hint { font-size: .7rem; color: #6b7280; }
.vm-editable-name__error { font-size: .7rem; color: #dc2626; width: 100%; }
.vm-hub-card__plan { font-size: .8rem; color: #6b7280; margin: .2rem 0 0; line-height: 1.45; }
.vm-hub-card__due { white-space: nowrap; }
@media (max-width: 640px) { .vm-hub-card__due { white-space: normal; } }
.vm-hub-card__due--urgent { color: #b45309; font-weight: 600; }
.vm-hub-card__badges { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.vm-hub-card__chevron {
    color: #9ca3af;
    font-size: 1.1rem;
    margin-left: auto;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), color .2s ease;
}
.vm-hub-card__chevron--open { transform: rotate(180deg); color: #059669; }
.vm-hub-card__cta { color: #059669; font-size: .875rem; font-weight: 600; margin-left: auto; }
.vm-hub-card__collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
}
.vm-hub-card__collapse--open {
    grid-template-rows: 1fr;
    pointer-events: auto;
}
.vm-hub-card__collapse-inner {
    overflow: hidden;
    min-height: 0;
    border-radius: 0 0 .75rem .75rem;
}
.vm-hub-card__body {
    padding: 1.25rem 1.25rem 1.35rem;
    background: #fafafa;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .24s ease, transform .32s cubic-bezier(.4, 0, .2, 1);
}
.vm-hub-card__collapse--open .vm-hub-card__body {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .vm-hub-card,
    .vm-hub-card__summary,
    .vm-hub-card__chevron,
    .vm-hub-card__collapse,
    .vm-hub-card__body {
        transition: none;
    }
    .vm-hub-card__body { opacity: 1; transform: none; }
}
.vm-hub-detail { display: flex; flex-direction: column; gap: 1rem; }
.vm-hub-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0; }
.vm-hub-detail__grid .vm-panel { margin-bottom: 0; }
@media (max-width: 768px) { .vm-hub-detail__grid { grid-template-columns: 1fr; } }
.vm-dl--compact > div { padding: .3rem 0; }
.vm-hub-activity { list-style: none; padding: 0; margin: 0; }
.vm-hub-activity__item { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .5rem 0; border-bottom: 1px solid #f9fafb; font-size: .875rem; }
.vm-hub-activity__time { color: #6b7280; font-size: .75rem; min-width: 6.5rem; }
.vm-hub-empty { text-align: center; padding: 2rem; color: #6b7280; }
.vm-table-wrap { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
.vm-btn--primary { background: #059669; color: #fff; border: 1px solid #059669; }
.vm-btn--primary:hover { background: #047857; }
.vm-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.vm-modal__backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 45%); }
.vm-modal__card {
    position: relative;
    background: #fff;
    border-radius: .75rem;
    width: 100%;
    max-width: 24rem;
    box-shadow: 0 20px 40px rgb(0 0 0 / 15%);
    margin: auto;
}
.vm-modal__card--wide {
    max-width: min(36rem, calc(100vw - 2rem));
    max-height: min(92vh, 44rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vm-modal__card--hub {
    max-width: min(32rem, calc(100vw - 2rem));
    max-height: min(92vh, 40rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vm-modal--hub .vm-modal__head-text { min-width: 0; flex: 1; }
.vm-modal--hub .vm-modal__subtitle {
    margin: .2rem 0 0;
    font-size: .8125rem;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.35;
    word-break: break-word;
}
.vm-modal__card--wide .vm-modal__head,
.vm-modal__card--hub .vm-modal__head { flex-shrink: 0; align-items: flex-start; gap: .75rem; }
.vm-modal__card--wide .vm-modal__body,
.vm-modal__card--hub .vm-modal__body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
    padding: 1.1rem 1.25rem 1.25rem;
    gap: 0;
}
.vm-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #f3f4f6; }
.vm-modal__title { font-size: 1rem; font-weight: 700; margin: 0; }
.vm-modal__close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #6b7280; }
.vm-modal__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; box-sizing: border-box; }
.vm-modal__select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .55rem 2.25rem .55rem .75rem;
    font: inherit;
    font-size: .875rem;
    line-height: 1.4;
    color: #111827;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 1.1em 1.1em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.vm-modal__submit { margin-top: .5rem; width: 100%; }

.vm-upgrade-current {
    padding: .75rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #f9fafb;
}
.vm-upgrade-current__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin: 0 0 .25rem; }
.vm-upgrade-current__name { font-size: .9375rem; font-weight: 600; color: #111827; margin: 0; }
.vm-upgrade-current__spec { font-size: .8125rem; color: #6b7280; margin: .2rem 0 0; }

.vm-upgrade-picker { border: none; margin: 0; padding: 0; min-width: 0; }
.vm-upgrade-picker__legend {
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .5rem;
    padding: 0;
}
.vm-upgrade-picker__list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: min(16rem, 42vh);
    overflow-y: auto;
    padding-right: .15rem;
}
.vm-upgrade-picker__item {
    display: block;
    cursor: pointer;
    position: relative;
}
.vm-upgrade-picker__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.vm-upgrade-picker__card {
    display: block;
    padding: .7rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #fff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.vm-upgrade-picker__item:hover .vm-upgrade-picker__card { border-color: #a7f3d0; background: #f9fafb; }
.vm-upgrade-picker__input:focus-visible + .vm-upgrade-picker__card { outline: none; }
.vm-upgrade-picker__input:checked + .vm-upgrade-picker__card {
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 0 0 1px #059669;
}
.vm-upgrade-picker__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.vm-upgrade-picker__name { font-size: .875rem; font-weight: 600; color: #111827; line-height: 1.35; }
.vm-upgrade-picker__price {
    font-size: .8125rem;
    font-weight: 600;
    color: #047857;
    white-space: nowrap;
    flex-shrink: 0;
}
.vm-upgrade-picker__spec { display: block; font-size: .8125rem; color: #6b7280; margin-top: .2rem; line-height: 1.4; }
.vm-upgrade-note { font-size: .75rem; color: #6b7280; line-height: 1.5; margin: 0; }

.vm-resource-upgrade__due { font-size: .75rem; color: #6b7280; margin: .45rem 0 0; line-height: 1.45; }
.vm-resource-upgrade__controls { display: flex; flex-direction: column; gap: .65rem; }
.vm-resource-upgrade__row {
    display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
    padding: .65rem .75rem; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff;
}
.vm-resource-upgrade__meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.vm-resource-upgrade__label { font-size: .875rem; font-weight: 600; color: #111827; }
.vm-resource-upgrade__hint { font-size: .72rem; color: #6b7280; line-height: 1.35; }
.vm-resource-upgrade__stepper { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.vm-resource-upgrade__btn {
    width: 1.85rem; height: 1.85rem; border: 1px solid #d1d5db; border-radius: .45rem;
    background: #fff; color: #374151; font-size: 1rem; line-height: 1; cursor: pointer;
    padding: 0; min-width: 0; box-sizing: border-box; flex-shrink: 0;
}
.vm-resource-upgrade__btn:hover:not(:disabled) { border-color: #059669; color: #047857; background: #ecfdf5; }
.vm-resource-upgrade__btn:disabled { opacity: .45; cursor: not-allowed; }
.vm-resource-upgrade__value { min-width: 4.5rem; text-align: center; font-size: .8125rem; font-weight: 600; color: #047857; }
.vm-resource-upgrade__preview {
    padding: .65rem .75rem; border: 1px dashed #bbf7d0; border-radius: .5rem; background: #f0fdf4;
}
.vm-resource-upgrade__preview-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #047857; margin: 0 0 .2rem; }
.vm-resource-upgrade__preview-spec { font-size: .875rem; font-weight: 600; color: #065f46; margin: 0; }
.vm-resource-upgrade__cost {
    padding: .75rem; border-radius: .5rem; background: #f9fafb; border: 1px solid #e5e7eb;
    display: flex; flex-direction: column; gap: .35rem;
}
.vm-resource-upgrade__cost-row { display: flex; justify-content: space-between; gap: .75rem; font-size: .8125rem; color: #374151; }
.vm-resource-upgrade__cost-row--total { font-size: .9375rem; color: #111827; padding-top: .35rem; border-top: 1px solid #e5e7eb; }
.vm-resource-upgrade__cost-note { font-size: .72rem; color: #b45309; margin: .15rem 0 0; line-height: 1.4; }
.vm-resource-upgrade__ipv4-note { font-size: .72rem; color: #6b7280; margin: .35rem 0 0; line-height: 1.45; }

@media (max-width: 540px) {
    .vm-modal { padding: .75rem; align-items: flex-start; }
    .vm-modal__card--wide { max-height: calc(100vh - 1.5rem); }
    .vm-resource-upgrade__row {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }
    .vm-resource-upgrade__stepper { justify-content: flex-end; }
}

.vm-hub-password { font-size: .875rem; background: #f9fafb; padding: .15rem .35rem; border-radius: .25rem; }
.vm-hub-password--masked { filter: blur(5px); opacity: .55; user-select: none; }
.vm-secret-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }

/* View toggle + bulk table */
.vm-hub-page__tools { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.vm-view-toggle { display: inline-flex; border: 1px solid #e5e7eb; border-radius: .5rem; overflow: hidden; background: #fff; }
.vm-view-toggle__btn {
    border: none; background: transparent; padding: .4rem .85rem; font-size: .8125rem;
    color: #4b5563; cursor: pointer;
}
.vm-view-toggle__btn:hover { background: #f9fafb; }
.vm-view-toggle__btn--active { background: #ecfdf5; color: #047857; font-weight: 600; }
.vm-bulk-bar {
    display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between;
    padding: .75rem 1rem; margin-bottom: .75rem; border: 1px solid #a7f3d0; border-radius: .75rem;
    background: #ecfdf5;
}
.vm-bulk-bar__count { font-size: .875rem; color: #065f46; }
.vm-bulk-bar__actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.vm-hub-table-panel { padding: 0; overflow: visible; }
.vm-hub-table { min-width: 920px; font-size: .8125rem; }
.vm-hub-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; white-space: nowrap; }
.vm-hub-table__check { width: 2.5rem; text-align: center; }
.vm-hub-table__checkbox { width: 1rem; height: 1rem; cursor: pointer; accent-color: #059669; }
.vm-hub-table__name { font-weight: 600; color: #111827; }
.vm-hub-table__sub { font-size: .75rem; color: #6b7280; margin-top: .1rem; }
.vm-hub-table__ip { white-space: nowrap; }
.vm-hub-table__login { min-width: 10rem; }
.vm-hub-table__login-line { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .15rem 0; }
.vm-hub-table__login-label { font-size: .7rem; color: #9ca3af; min-width: 2.2rem; }
.vm-hub-table__spec { white-space: nowrap; }
.vm-hub-table__due { white-space: nowrap; }
.vm-hub-table__due--urgent { color: #b45309; font-weight: 600; }
.vm-hub-table__due-sub { display: block; font-size: .7rem; color: #6b7280; font-weight: 400; }
.vm-hub-table__due-sub--over { color: #dc2626; }
.vm-hub-table__row--urgent { background: #fffbeb; }
.vm-hub-table__actions { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.vm-power-controls--table { margin: 0; }
.vm-power-controls--table .vm-power-btn { width: 1.75rem; height: 1.75rem; font-size: .7rem; }
@media (max-width: 768px) {
    .vm-hub-page__header { flex-direction: column; }
    .vm-hub-page__tools { width: 100%; justify-content: space-between; }
    .vm-hub-page__actions { width: 100%; }
    .vm-hub-page__actions .vm-btn { flex: 1 1 auto; justify-content: center; min-width: 0; }
}
.vm-restore-ip { margin-top: .75rem; }
.vm-extend-disk { margin-top: .75rem; }
.vm-hint--restore { margin-top: .35rem; font-size: .72rem; color: #6b7280; line-height: 1.4; }

/* —— Reinstall OS modal —— */
.vm-modal__card--reinstall {
    max-width: min(40rem, calc(100vw - 1.5rem));
    max-height: min(92vh, 52rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: .85rem;
}
.vm-modal__head--danger {
    align-items: flex-start;
    gap: .75rem;
    background: #fff;
    border-bottom: 1px solid #fee2e2;
}
.vm-modal__head-text { min-width: 0; flex: 1; }
.vm-modal__eyebrow {
    margin: 0 0 .2rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #b91c1c;
}
.vm-modal--reinstall .vm-modal__title { font-size: 1.0625rem; letter-spacing: -.01em; }
.vm-modal__subtitle {
    margin: .2rem 0 0;
    font-size: .8125rem;
    color: #6b7280;
    font-weight: 500;
}
.vm-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: .85rem 1.25rem 1.1rem;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
    flex-shrink: 0;
}
.vm-reinstall-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
.vm-reinstall-form__body {
    gap: .9rem;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overflow-anchor: none;
}
.vm-reinstall-form__foot .vm-reinstall-form__submit { min-width: 8.5rem; }
.vm-reinstall-form__foot .vm-reinstall-form__cancel { min-width: 5rem; }

.vm-reinstall-current {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    flex-wrap: wrap;
    padding: .65rem .8rem;
    border: 1px solid #e5e7eb;
    border-radius: .55rem;
    background: #f9fafb;
}
.vm-reinstall-current__label {
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
    font-weight: 700;
}
.vm-reinstall-current__name {
    font-size: .875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.vm-reinstall-os { border: none; margin: 0; padding: 0; min-width: 0; }
.vm-reinstall-os__legend {
    font-size: .8125rem;
    font-weight: 650;
    color: #374151;
    margin-bottom: .55rem;
    padding: 0;
}

.vm-reinstall-confirm {
    display: flex;
    gap: .65rem;
    align-items: center;
    padding: .7rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .55rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.vm-reinstall-confirm:hover { border-color: #fca5a5; background: #fffafa; }
.vm-reinstall-confirm--checked { border-color: #f87171; background: #fef2f2; }
.vm-reinstall-confirm input {
    margin: 0;
    flex-shrink: 0;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #dc2626;
    cursor: pointer;
}
.vm-reinstall-confirm__text { font-size: .8125rem; color: #374151; line-height: 1.4; font-weight: 500; }

.vm-template-picker--reinstall { margin: 0; }
.vm-template-picker--reinstall .vm-template-picker__head { display: none; }
.vm-template-picker--reinstall .vm-template-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.vm-template-picker--reinstall .vm-template-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .7rem;
    padding: .7rem .8rem;
    border: 1px solid #e5e7eb;
    border-radius: .65rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    min-height: 3.85rem;
    text-align: left;
}
.vm-template-picker--reinstall .vm-template-card:hover {
    border-color: #a7f3d0;
    background: #f8fafc;
}
.vm-template-picker--reinstall .vm-template-card--selected {
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.14);
}
.vm-template-picker--reinstall .vm-template-card:focus-within {
    outline: none;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.18);
}
.vm-template-picker--reinstall .vm-template-card__radio {
    position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0;
}
.vm-template-picker--reinstall .vm-template-card__icon {
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}
.vm-template-picker--reinstall .vm-template-card--selected .vm-template-card__icon {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.28);
}
.vm-template-picker--reinstall .vm-template-card__logo {
    width: 1.65rem; height: 1.65rem; object-fit: contain; display: block;
}
.vm-template-picker--reinstall .vm-template-card__body {
    width: 100%; min-width: 0; text-align: left;
    display: flex; flex-direction: column; gap: .15rem;
}
.vm-template-picker--reinstall .vm-template-card__name {
    display: block;
    font-size: .8125rem;
    font-weight: 650;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vm-template-picker--reinstall .vm-template-card__meta {
    display: block; font-size: .6875rem; color: #6b7280; margin: 0;
}
.vm-template-picker--reinstall .vm-template-card__version {
    width: 100%;
    margin-top: .15rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    padding: .2rem .35rem;
    font-size: .6875rem;
    color: #374151;
    background: #fff;
}
.vm-template-picker--reinstall .vm-template-card__check {
    display: none;
    position: absolute;
    top: .4rem;
    right: .45rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    background: #059669;
    color: #fff;
    font-size: .625rem;
    align-items: center;
    justify-content: center;
}
.vm-template-picker--reinstall .vm-template-card--selected .vm-template-card__check { display: inline-flex; }

.vm-template-picker--reinstall .vm-template-card--iso {
    grid-column: 1 / -1;
    border-style: dashed;
    border-color: #d1d5db;
    background: #fafafa;
}
.vm-template-picker--reinstall .vm-template-card--iso:hover {
    border-color: #86efac;
    background: #f0fdf4;
}
.vm-template-picker--reinstall .vm-template-card--iso.vm-template-card--selected {
    border-style: solid;
    border-color: #059669;
    background: #ecfdf5;
}

/* Custom ISO picker (hub /vms — không load vm-catalog.css) */
.vm-iso-picker-panel {
    margin-top: .65rem;
    padding: .75rem .8rem;
    border: 1px solid #e5e7eb;
    border-radius: .65rem;
    background: #f8fafc;
}
.vm-iso-picker-panel[hidden] { display: none !important; }
.vm-iso-picker-panel__label {
    display: block;
    font-size: .75rem;
    font-weight: 650;
    color: #4b5563;
    margin: 0 0 .45rem;
}
.vm-iso-picker-panel__empty {
    margin: 0;
    font-size: .8125rem;
    color: #6b7280;
    line-height: 1.45;
}
.vm-iso-picker-panel__empty a {
    color: #059669;
    font-weight: 600;
    text-decoration: none;
}
.vm-iso-picker-panel__empty a:hover { text-decoration: underline; }
.vm-iso-picker-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.vm-iso-picker-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .7rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.vm-iso-picker-item:hover { border-color: #a7f3d0; background: #f9fafb; }
.vm-iso-picker-item--selected {
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 0 0 1px rgba(5, 150, 105, 0.12);
}
.vm-iso-picker-item__radio {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    accent-color: #059669;
    margin: 0;
    cursor: pointer;
}
.vm-iso-picker-item__body {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}
.vm-iso-picker-item__name {
    font-size: .8125rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vm-iso-picker-item__size {
    flex-shrink: 0;
    font-size: .6875rem;
    font-weight: 600;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}
.vm-iso-picker-panel__manage {
    display: inline-block;
    margin-top: .55rem;
    font-size: .75rem;
    font-weight: 600;
    color: #059669;
    text-decoration: none;
}
.vm-iso-picker-panel__manage:hover { text-decoration: underline; }

.vm-btn--danger {
    background: #dc2626;
    color: #fff;
    border: 1px solid #dc2626;
}
.vm-btn--danger:hover:not(:disabled) { background: #b91c1c; border-color: #b91c1c; }
.vm-btn--danger:disabled { opacity: .45; cursor: not-allowed; }
.vm-btn--danger-outline { border-color: #fca5a5; color: #b91c1c; }
.vm-btn--danger-outline:hover { background: #fef2f2; }

/* VM hub — góp ý / phản ánh (feedback-box partial) */
.vm-feedback { margin-top: 1.75rem; }
.vm-feedback__card {
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    background: #fafafa;
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
.vm-feedback__head {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.vm-feedback__icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
}
.vm-feedback__icon svg { width: 1.35rem; height: 1.35rem; }
.vm-feedback__icon i { font-size: 1.125rem; line-height: 1; }
.vm-feedback__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
    color: #111827;
}
.vm-feedback__sub {
    margin: .2rem 0 0;
    font-size: .8125rem;
    color: #6b7280;
    line-height: 1.45;
}
.vm-feedback__thanks {
    margin-bottom: .85rem;
    padding: .65rem .85rem;
    border-radius: .55rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}
.vm-feedback__thanks-text {
    margin: 0;
    font-size: .875rem;
    color: #374151;
    line-height: 1.45;
}
.vm-feedback__label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}
.vm-feedback__input {
    width: 100%;
    min-height: 6.5rem;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: .55rem;
    padding: .65rem .75rem;
    font-size: .875rem;
    line-height: 1.5;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.vm-feedback__input::placeholder { color: #9ca3af; }
.vm-feedback__input:focus {
    outline: none;
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgb(156 163 175 / 18%);
}
.vm-feedback__input:disabled { opacity: .65; background: #f9fafb; }
.vm-feedback__hint { margin: .35rem 0 0; font-size: .8125rem; }
.vm-feedback__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-top: .65rem;
}
.vm-feedback__counter { font-size: .75rem; color: #9ca3af; }

@media (max-width: 640px) {
    .vm-modal__foot { flex-direction: column-reverse; }
    .vm-reinstall-form__foot .vm-reinstall-form__submit,
    .vm-reinstall-form__foot .vm-reinstall-form__cancel { width: 100%; min-width: 0; }
    .vm-template-picker--reinstall .vm-template-cards { grid-template-columns: 1fr; }
    .vm-template-picker--reinstall .vm-template-card--iso { grid-column: auto; }
    .vm-iso-picker-item__body { flex-direction: column; align-items: flex-start; gap: .15rem; }

    /* Hub cards: keep full content when metrics present */
    .vm-service-card__facts {
        grid-template-columns: 1fr;
    }
    .vm-metrics-row--net {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .vm-metrics-row__label--tx {
        text-align: left;
    }
    .vm-metrics-row__value,
    .vm-metrics-row__net {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
