:root {
    --bg: #f6f8fb;
    --card: #fff;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --blue: #155eef;
    --green: #079455;
    --red: #d92d20;
    --amber: #dc6803;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
}

main.console-layout {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 56px;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

main.console-layout.is-public {
    grid-template-columns: 248px minmax(0, 1fr);
}

.console-main {
    min-width: 0;
}

.shell {
    display: grid;
    gap: 18px;
}

.sidebar, .topbar, .card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.06);
}

.sidebar {
    position: sticky;
    top: 20px;
    min-height: calc(100vh - 56px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.topbar {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
    color: inherit;
}

.mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.side-nav {
    display: grid;
    gap: 18px;
}

.nav-section {
    display: grid;
    gap: 6px;
}

.nav-section-title {
    margin: 0 0 4px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
    border-radius: 12px;
    color: #344054;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-link.is-active {
    background: #eff4ff;
    color: var(--blue);
    box-shadow: inset 3px 0 0 var(--blue);
}

.nav-link.is-disabled {
    color: #98a2b3;
    cursor: not-allowed;
}

.nav-link small {
    color: #98a2b3;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.signout-link {
    width: 100%;
}

.public-nav {
    display: grid;
    gap: 10px;
}

.public-nav .button {
    width: 100%;
}

.language-switch {
    display: flex;
    justify-content: center;
    width: 100%;
}

.language-select {
    width: 100%;
    min-height: 38px;
    margin: 0;
    padding: 7px 34px 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: #fff;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.language-select:focus-visible {
    outline: 3px solid rgba(21, 94, 239, 0.18);
    outline-offset: 1px;
    border-color: var(--blue);
}

.site-footer { padding: 8px 4px; color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: #475467; }
.site-footer p { margin: 8px 0 0; font-size: 12px; }

.legal-document { max-width: 920px; padding: clamp(24px, 5vw, 54px); }
.legal-header { padding-bottom: 20px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.legal-document h1 { font-size: clamp(34px, 6vw, 58px); }
.legal-document section { scroll-margin-top: 24px; }
.legal-document section + section { margin-top: 32px; }
.legal-document h2 { font-size: clamp(20px, 3vw, 26px); line-height: 1.3; }
.legal-document p { color: #344054; }
.legal-notice { margin-top: 36px; padding: 18px; border: 1px solid #f2c94c; border-radius: 14px; background: #fffaeb; }
.legal-notice p { margin-bottom: 0; }
.policy-index nav { display: flex; flex-wrap: wrap; gap: 10px; }
.policy-index a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: #344054; text-decoration: none; }
.policy-index a[aria-current="page"] { border-color: var(--blue); color: var(--blue); background: #eff4ff; }

.card {
    padding: 24px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card .eyebrow {
    margin-bottom: 0;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.2;
    color: var(--text);
}

.stat-card p {
    margin: 0;
}

.hero {
    padding: 44px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eff4ff;
    color: #155eef;
    font-size: 12px;
    font-weight: 800;
}

h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.045em;
}

h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.button, button {
    border: 0;
    border-radius: 999px;
    min-height: 40px;
    padding: 0 15px;
    background: #111827;
    color: #fff;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.button:hover, button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.button.secondary, button.secondary {
    background: #f3f4f6;
    color: #111827;
}

.button.danger, button.danger {
    background: #fee4e2;
    color: #b42318;
}

.button.success, button.success {
    background: #dcfae6;
    color: #067647;
}

.button.warn, button.warn {
    background: #fff4e5;
    color: #b54708;
}

.button.blue, button.blue {
    background: #155eef;
    color: white;
}

.button:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

button.disabled,
button.disabled:hover {
    background: #eef0f4;
    color: #98a2b3;
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.region-card.is-coming-soon {
    background: #f8fafc;
    border-color: #e4e7ec;
    box-shadow: none;
    color: #667085;
}

.region-card.is-coming-soon h2,
.region-card.is-coming-soon p {
    color: #667085;
}

.region-card.is-coming-soon {
    filter: saturate(0.35);
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    background: #f3f4f6;
    color: #344054;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 750;
}

.pill.green {
    background: #ecfdf3;
    color: #067647;
}

.pill.red {
    background: #fef3f2;
    color: #b42318;
}

.pill.blue {
    background: #eff4ff;
    color: #155eef;
}

.pill.gray {
    background: #f2f4f7;
    color: #667085;
}

.console-beta-card {
    display: grid;
    gap: 16px;
}

.console-beta-header,
.console-beta-actions,
.console-beta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.console-beta-header h1 {
    margin-bottom: 4px;
}

.console-beta-warning {
    border: 1px solid #fedf89;
    background: #fffaeb;
    color: #93370d;
    padding: 12px 14px;
    border-radius: 14px;
}

.console-terminal {
    width: 100%;
    min-height: 520px;
    border: 1px solid #1f2937;
    border-radius: 16px;
    background: #020617;
    color: #d1fae5;
    padding: 12px;
    overflow: hidden;
    outline: none;
}

body.is-console-maximized,
html.is-console-maximized {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

html.is-console-maximized main.console-layout,
body.is-console-maximized main.console-layout {
    position: fixed;
    inset: 0;
    z-index: 9997;
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    background: #020617;
}

html.is-console-maximized .sidebar,
body.is-console-maximized .sidebar,
html.is-console-maximized .console-beta-header,
body.is-console-maximized .console-beta-header,
html.is-console-maximized .console-beta-warning,
body.is-console-maximized .console-beta-warning,
html.is-console-maximized .console-beta-footer .muted,
body.is-console-maximized .console-beta-footer .muted {
    display: none;
}

html.is-console-maximized .console-main,
body.is-console-maximized .console-main,
html.is-console-maximized .shell,
body.is-console-maximized .shell,
html.is-console-maximized .console-beta-card,
body.is-console-maximized .console-beta-card {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

html.is-console-maximized .shell,
body.is-console-maximized .shell,
html.is-console-maximized .console-beta-card,
body.is-console-maximized .console-beta-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

html.is-console-maximized .console-terminal,
body.is-console-maximized .console-terminal {
    flex: 1 1 auto;
    width: 100vw;
    min-height: 0;
    border-radius: 0;
    border-width: 0;
    padding: 12px;
}

html.is-console-maximized .console-terminal .xterm,
body.is-console-maximized .console-terminal .xterm,
html.is-console-maximized .console-terminal .xterm-screen,
body.is-console-maximized .console-terminal .xterm-screen,
html.is-console-maximized .console-terminal .xterm-viewport,
body.is-console-maximized .console-terminal .xterm-viewport {
    width: 100% !important;
    height: calc(100vh - 112px) !important;
    height: calc(100dvh - 112px) !important;
}

.console-fit-measure {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
    white-space: pre;
    font: 14px/1.25 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html.is-console-maximized .console-beta-footer,
body.is-console-maximized .console-beta-footer {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.console-terminal:focus,
.console-terminal:focus-within {
    border-color: #155eef;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.16);
}

.console-terminal .xterm {
    height: 520px;
}

.console-terminal .xterm-viewport {
    border-radius: 12px;
}

.console-terminal-fallback {
    overflow: auto;
    white-space: pre;
    font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pill.amber {
    background: #fff4e5;
    color: #b54708;
}

.pill.orange {
    background: #ffedd5;
    color: #c2410c;
}

.admin-support-message {
    max-width: 280px;
    white-space: normal;
    word-break: break-word;
}

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

.table thead th {
    background: #f9fafb;
}

.table tbody tr:nth-child(even) {
    background: #fbfcff;
}

.table th, .table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 14px;
}

.table th {
    color: #667085;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table tbody tr:hover {
    background: rgba(21, 94, 239, 0.03);
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.row-actions button,
.row-actions .button {
    min-height: 34px;
    padding: 0 11px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
}

form {
    display: grid;
    gap: 13px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 750;
    color: #344054;
}

input, select, textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 0 12px;
    font: inherit;
    background: #fff;
    transition: border-color 0.2s ease;
}

textarea {
    padding-top: 10px;
    resize: vertical;
}

.support-message-input {
    min-height: 176px;
    line-height: 1.55;
}

.support-message-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.support-admin-table {
    min-width: 1040px;
}

.support-customer-table {
    min-width: 820px;
}

.support-admin-table th,
.support-admin-table td,
.support-customer-table th,
.support-customer-table td {
    vertical-align: middle;
    padding-top: 16px;
    padding-bottom: 16px;
}

.support-admin-table tbody tr + tr td,
.support-customer-table tbody tr + tr td {
    border-top: 1px solid #eaecf0;
}

.support-ticket-id,
.support-status-cell,
.support-time-cell {
    white-space: nowrap;
}

.support-user-cell {
    min-width: 190px;
}

.support-user-cell strong,
.support-user-cell small {
    display: block;
}

.support-user-cell small {
    margin-top: 3px;
    color: #667085;
    white-space: nowrap;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.label-optional {
    color: var(--muted);
    font-weight: 600;
}

.messages {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.messages li {
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff4ff;
    color: #155eef;
    animation: slideIn 0.3s ease;
}

.inline-feedback {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff4ff;
    color: #155eef;
    font-size: 14px;
}

.inline-feedback.success {
    background: #dcfae6;
    color: #067647;
}

.inline-feedback.error {
    background: #fee4e2;
    color: #b42318;
}

.inline-feedback.warning {
    background: #fef0c7;
    color: #b54708;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.connection-details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.connection-details div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eaecf0;
}

.connection-details div:last-child {
    border-bottom: 0;
}

.connection-details dt {
    color: var(--muted);
    font-weight: 600;
}

.connection-details dd {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    flex-wrap: wrap;
}

.icon-copy {
    border: 0;
    background: transparent;
    color: #155eef;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
}

.icon-copy:hover,
.icon-copy.copied {
    background: #eff4ff;
}

.password-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.password-top-row,
.password-copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.password-top-row {
    width: 100%;
}

.password-copy-row.second-row {
    width: 100%;
}

.password-copy-row.second-row .copy-password {
    width: 100%;
    justify-content: center;
}

.password-value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #f9fafb;
    color: var(--text);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    font-size: 14px;
    line-height: 1.4;
}

.copy-password,
.reveal-password {
    flex: 0 0 auto;
}

.reveal-password {
    min-width: 44px;
    padding: 0 12px;
}

.password-value.is-hidden {
    color: #475467;
    letter-spacing: 0.08em;
}

.password-value.is-revealed {
    letter-spacing: normal;
}

.muted {
    color: var(--muted);
}

.muted-card {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    color: #475467;
    padding: 14px;
}

.template-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.template-card:hover,
.template-card:has(input:checked) {
    border-color: #84caff;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.10);
    transform: translateY(-1px);
}

.template-card input {
    width: auto;
    margin-top: 3px;
}

.template-card strong,
.template-card small {
    display: block;
}

.template-card strong {
    color: #101828;
    margin-bottom: 4px;
}

.template-card small {
    color: var(--muted);
    line-height: 1.45;
}

.compact-form {
    margin-top: 12px;
}

.api-key-once {
    display: grid;
    gap: 10px;
    margin: 12px 0 18px;
    padding: 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 14px;
}

.api-key-copy-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.api-key-copy-row code {
    overflow-wrap: anywhere;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.check-row input {
    width: auto;
}

.current-plan-card {
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.current-plan-card strong {
    color: #344054;
    font-size: 15px;
}

.danger-zone {
    border-color: #fecdca;
}

.two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.console-stack {
    display: grid;
    gap: 18px;
}

.instances-card {
    overflow-x: auto;
}

.instances-heading {
    margin-bottom: 16px;
}

.instances-table th:last-child,
.instances-table td:last-child {
    text-align: right;
}

.row-actions-manage {
    justify-content: flex-end;
}

.manage-button {
    min-width: 92px;
    justify-content: center;
}

.create-instance-card {
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, 0.08), transparent 34%),
        rgba(255, 255, 255, 0.96);
}

.create-instance-form {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.choice-section {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fbfcff;
}

.choice-section-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.choice-section-heading h3 {
    margin: 0 0 3px;
    font-size: 16px;
}

.choice-section-heading p,
.choice-card p,
.create-submit-row p {
    margin: 0;
}

.choice-step {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #101828;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.choice-card {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 16px;
    background: #fff;
}

.choice-card.is-selected {
    border-color: #84caff;
    box-shadow: 0 10px 30px rgba(21, 94, 239, 0.08);
}

.region-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.region-card-option {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.region-card-option:hover {
    border-color: #84caff;
    transform: translateY(-1px);
}

.region-card-option.is-selected {
    border-color: #1570ef;
    background: #eff8ff;
    box-shadow: 0 10px 30px rgba(21, 94, 239, 0.12);
}

.choice-card strong {
    color: #101828;
}

.choice-card p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.os-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.os-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    min-height: 112px;
    padding: 13px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 16px;
    background: #fff;
    color: #101828;
    box-shadow: none;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.os-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.os-card:hover {
    transform: translateY(-1px);
    border-color: #b2ccff;
    background: #f8fbff;
}

.os-card.is-selected {
    border-color: #2e90fa;
    background: #eff8ff;
    box-shadow: 0 10px 26px rgba(21, 94, 239, .10);
}

.os-logo {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -.03em;
    color: #fff;
    background: #344054;
}

.os-logo-ubuntu { background: #e95420; }
.os-logo-debian { background: #a81d33; }
.os-logo-centos { background: #7f3f98; }
.os-logo-almalinux { background: #0e8f79; }
.os-logo-rocky { background: #10a37f; }

.os-card-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.os-card-text strong {
    color: #101828;
    font-size: 14px;
}

.os-card-text span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.os-version-select {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 9px 34px 9px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background-color: #fff;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.os-card.is-selected .os-version-select {
    border-color: #84caff;
}

.os-card:focus-visible,
.os-version-select:focus-visible {
    outline: 3px solid rgba(46, 144, 250, .28);
    outline-offset: 2px;
}

.compact-field {
    margin: 0;
}

.compact-field select {
    border-radius: 14px;
    border-color: #d0d5dd;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
}

.compact-field select:focus {
    border-color: #84caff;
    box-shadow: 0 10px 30px rgba(21, 94, 239, 0.08);
}

.form-grid.two-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bulk-name-field {
    display: grid;
    gap: 8px;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 750;
    color: #344054;
}

.quantity-field {
    display: grid;
    gap: 6px;
}

.quantity-stepper {
    display: grid;
    grid-template-columns: 42px minmax(72px, 1fr) 42px;
    align-items: center;
    gap: 8px;
}

.quantity-stepper input {
    text-align: center;
    font-weight: 800;
}

.quantity-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.create-submit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 4px;
}

.create-submit-row .blue {
    min-width: 168px;
}

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

.traffic-pools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.traffic-pool-region {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.traffic-pool-title,
.traffic-pool-usage-text {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.traffic-pool-title h3 {
    margin: 0;
    font-size: 18px;
}

.traffic-pool-usage {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.traffic-pool-breakdown {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.progress-fill.network {
    background: linear-gradient(90deg, #079455 0%, #12b76a 100%);
}

.traffic-pool-progress {
    height: 9px;
    overflow: hidden;
    display: flex;
    background: #e4e7ec;
    border-radius: 999px;
}

.traffic-pool-progress-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.traffic-pool-progress-fill.included {
    background: linear-gradient(90deg, #079455 0%, #12b76a 100%);
}

.traffic-pool-progress-fill.overage {
    background: linear-gradient(90deg, #fdb022 0%, #f79009 100%);
}

.traffic-pool-overage-note {
    margin: 0;
    color: #b54708;
    font-size: 13px;
    font-weight: 700;
}

.traffic-pool-unmetered-note {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #abefc6;
    border-radius: 14px;
    background: #ecfdf3;
    color: #067647;
    font-size: 13px;
    font-weight: 700;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 880px) {
    main.console-layout,
    main.console-layout.is-public {
        width: min(100% - 32px, 720px);
        grid-template-columns: 1fr;
        padding-top: 12px;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }

    .side-nav {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 4px;
    }

    .nav-section {
        min-width: 180px;
    }

    .sidebar-footer {
        margin-top: 0;
    }

    .two {
        grid-template-columns: 1fr;
    }

    .section-heading-row,
    .create-submit-row,
    .choice-card {
        flex-direction: column;
        align-items: stretch;
    }

    .form-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .create-submit-row .blue,
    .instances-heading .button {
        width: 100%;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        padding: 28px;
    }
}

/* Monitoring Stats */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.metric h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    margin: 0 0 8px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-fill.cpu {
    background: linear-gradient(90deg, #155eef 0%, #3b82f6 100%);
}


/* Kubernetes provisioning progress */
.k3s-provisioning-panel {
    --k3s-progress: 20%;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 18px 0 14px;
    padding: 16px;
    border: 1px solid #d9e6ff;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #eff4ff 100%);
}

.k3s-progress-ring {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle closest-side, #ffffff 72%, transparent 74% 100%),
        conic-gradient(#155eef var(--k3s-progress), #dbeafe 0);
    box-shadow: inset 0 0 0 1px rgba(21, 94, 239, 0.08), 0 14px 32px rgba(21, 94, 239, 0.14);
}

.k3s-progress-ring span {
    color: #155eef;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.k3s-progress-copy {
    min-width: 0;
}

.k3s-progress-copy strong {
    display: block;
    color: #111827;
    font-size: 16px;
    margin-bottom: 3px;
}

.k3s-progress-copy p {
    margin: 0;
}

.k3s-current-phase {
    margin-top: 4px !important;
    font-size: 13px;
}

.progress-steps.compact {
    margin: 10px 0 16px;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.progress-steps.compact li {
    position: relative;
    padding: 9px 12px 9px 34px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #667085;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 700;
}

.progress-steps.compact li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: #cbd5e1;
}

.progress-steps.compact li.active {
    border-color: #b2ccff;
    color: #155eef;
    background: #eff4ff;
}

.progress-steps.compact li.active::before {
    background: #155eef;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.14);
}

@media (max-width: 640px) {
    .k3s-provisioning-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .k3s-progress-ring {
        width: 84px;
        height: 84px;
        flex-basis: 84px;
    }
}

.progress-fill.memory {
    background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
}

.progress-fill.disk {
    background: linear-gradient(90deg, #dc6803 0%, #fb923c 100%);
}

.metric-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.network-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.network-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 8px;
}

.network-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
}

.network-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.row-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.mini-stat {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 42px;
}

.mini-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mini-value {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

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

/* Customer-safe modals and provisioning progress */
.modal-overlay,
.progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.modal-overlay.active,
.progress-overlay.active {
    display: flex;
}

.progress-overlay.active {
    cursor: not-allowed;
}

.progress-overlay.active * {
    cursor: not-allowed;
}

.modal-card,
.progress-card {
    width: min(540px, 100%);
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    box-shadow: 0 32px 100px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    padding: 30px;
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.danger-confirm {
    border-color: #f04438;
    box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.12), 0 24px 80px rgba(180, 35, 24, 0.22);
}

.danger-eyebrow {
    background: #fee4e2;
    color: #b42318;
}

.danger-warning {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid #fecdca;
    border-radius: 14px;
    background: #fffbfa;
    color: #b42318;
    font-weight: 700;
    line-height: 1.6;
}

.warning-modal {
    border: 2px solid #fef0c7;
    box-shadow: 0 0 0 6px rgba(247, 144, 9, 0.12), 0 28px 90px rgba(181, 71, 8, 0.26);
    animation: warningBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes warningBounce {
    0% { transform: scale(0.92); opacity: 0; }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.warning-eyebrow {
    background: #fef0c7;
    color: #b54708;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.warning-message {
    margin: 16px 0 0;
    padding: 16px 18px;
    border: 1.5px solid #fedf89;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffcf5 0%, #fff9eb 100%);
    color: #7a2e0e;
    font-weight: 600;
    line-height: 1.7;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.danger-confirm input {
    margin-top: 8px;
}

.progress-bar.large {
    height: 14px;
    margin: 20px 0;
    background: #f3f4f6;
    border-radius: 999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.progress-bar.large .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.38);
}

.progress-steps {
    display: grid;
    gap: 11px;
    margin: 20px 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
}

.progress-steps li {
    position: relative;
    padding-left: 28px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-steps li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-size: 16px;
    color: #d0d5dd;
    transition: all 0.3s ease;
}

.progress-steps li.active {
    color: #c2410c;
    font-weight: 700;
}

.progress-steps li.active::before {
    content: '◉';
    color: #f97316;
    animation: pulseCircle 1.2s ease-in-out infinite;
}

@keyframes pulseCircle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.progress-steps li.done {
    color: #344054;
    font-weight: 600;
}

.progress-steps li.done::before {
    content: '✓';
    color: var(--green);
    font-weight: 800;
}

body:has(.progress-overlay.active) {
    overflow: hidden;
}

.create-progress-panel {
    display: none;
    margin-top: 18px;
    padding: 18px;
    border: 1.5px solid #fed7aa;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.14);
}

.create-progress-panel.active {
    display: block;
    cursor: progress;
}

.create-progress-panel.active * {
    cursor: progress;
}

.create-progress-panel h3 {
    margin: 8px 0 6px;
}

.create-progress-panel.is-success {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fee7 100%);
}

html.is-create-locked,
body.is-create-locked {
    overflow: hidden;
    overscroll-behavior: none;
    cursor: progress;
}

body.is-create-locked .create-progress-panel {
    position: relative;
    z-index: 10000;
}

.create-lock-layer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 84px;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(2px);
    cursor: progress;
    pointer-events: all;
    touch-action: none;
}

.create-lock-layer[hidden] {
    display: none;
}

.create-lock-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 12px 18px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: rgba(255, 251, 235, 0.97);
    box-shadow: 0 18px 60px rgba(154, 52, 18, 0.18);
    color: #7c2d12;
    font-size: 13px;
    overflow: hidden;
}

.create-lock-warning-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #f59e0b 0%, #f97316 100%);
}

.create-lock-card .spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(245, 158, 11, 0.28);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.create-lock-card span:last-child {
    color: var(--muted);
}

a[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.55;
}

.button-progress-running {
    gap: 8px;
    min-width: 96px;
    opacity: 0.9 !important;
    cursor: progress !important;
}

.action-progress-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(17, 24, 39, 0.18);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex: 0 0 auto;
}

.button.blue .action-progress-spinner,
button.blue .action-progress-spinner {
    border-color: rgba(255, 255, 255, 0.32);
    border-top-color: #fff;
}

.action-progress-label {
    white-space: nowrap;
}

/* ========== Enhanced Monitoring Dashboard v2 ========== */
.monitoring-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.metric-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.metric-card:hover::before {
    opacity: 1;
}

.cpu-card::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.memory-card::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.disk-card::before {
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.network-card::before {
    background: linear-gradient(90deg, #10b981, #f59e0b);
}

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

.metric-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-big-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-big-number .unit {
    font-size: 18px;
    font-weight: 600;
    margin-left: 2px;
}

.chart-container {
    height: 80px;
    margin: 12px 0;
    position: relative;
}

.chart-container canvas {
    max-height: 80px;
}

.progress-bar-large {
    width: 100%;
    height: 12px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    margin: 16px 0 12px;
}

.network-stats-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.network-stats-v2 .network-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.network-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.network-dot.in {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.network-dot.out {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.network-stats-v2 .network-label {
    font-size: 12px;
    color: #667085;
    font-weight: 500;
    min-width: 32px;
}

.network-stats-v2 .network-value {
    font-size: 14px;
    color: #111827;
    font-weight: 600;
    margin-left: auto;
}

/* Enhanced Progress Bars */
.metric-card .progress-bar {
    height: 8px;
    margin-bottom: 8px;
}

.metric-card .progress-fill {
    position: relative;
    overflow: visible;
}

.metric-card .progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: inherit;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover .progress-fill::after {
    opacity: 1;
}

.metric-card .metric-value {
    font-size: 12px;
    color: #667085;
    font-weight: 500;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .monitoring-grid-v2 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

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

    .metric-card {
        padding: 16px;
    }

    .chart-container {
        height: 60px;
    }

    .metric-big-number {
        font-size: 28px;
    }
}

/* Plan Details Display */
.plan-details {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.plan-details p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
}

.plan-details .plan-specs {
    font-weight: 500;
    color: #374151;
}

.plan-details .plan-network {
    color: #6b7280;
}

.plan-details .plan-price {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
}

/* ========== Admin Console UI Polish ========== */

/* Admin controls grid: better spacing on narrow screens */
.admin-controls-grid {
    gap: 18px;
}

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

/* Admin form spacing */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Instance diagnostics: compact inline layout */
.instance-diagnostics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 320px;
}

.diagnostic-item {
    display: inline-block;
    padding: 3px 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    color: #4b5563;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Admin actions container */
.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 280px;
}

.admin-action-primary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-suspend-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-suspend-reason {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
}

.admin-suspended-reason {
    margin: 4px 0 0;
    padding: 8px 12px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
}

.admin-action-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

/* Admin button variants */
.admin-btn-main {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
}

.admin-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

/* Admin instances table tweaks */
.admin-instances-table td {
    vertical-align: top;
    padding: 14px 12px;
}

.admin-instances-table thead th {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Responsive table for admin */
@media (max-width: 1024px) {
    .admin-instances-table {
        font-size: 13px;
    }

    .instance-diagnostics {
        max-width: 240px;
    }

    .diagnostic-item {
        font-size: 11px;
        padding: 2px 6px;
    }
}

@media (max-width: 768px) {
    .admin-actions {
        min-width: auto;
    }

    .admin-action-secondary {
        flex-direction: column;
    }

    .admin-btn-sm {
        width: 100%;
    }
}

/* ============================================
   Firewall Groups UI
   ============================================ */

/* Template selector grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.template-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.template-card:hover {
    border-color: #b2ddff;
    transform: translateY(-2px);
}

.template-card:has(input:checked) {
    border-color: #84caff;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.10);
    background: #f0f9ff;
}

.template-card input[type="radio"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.template-card strong {
    display: block;
    font-size: 15px;
    color: #101828;
    margin-bottom: 4px;
}

.template-card small {
    display: block;
    font-size: 13px;
    color: #667085;
    line-height: 1.5;
}

/* Rule list display */
.rule-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

/* Attach instances panel */
.attach-panel {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 10px;
}

.attach-panel summary {
    cursor: pointer;
    font-weight: 500;
    color: #155eef;
    list-style: none;
    user-select: none;
    padding: 4px 0;
}

.attach-panel summary::-webkit-details-marker {
    display: none;
}

.attach-panel summary::before {
    content: "▸ ";
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.attach-panel[open] summary::before {
    transform: rotate(90deg);
}

.attach-panel summary:hover {
    color: #1849cc;
}

.firewall-group-actions {
    display: flex;
    justify-content: flex-end;
    margin: 12px 0 4px;
}

[data-template-ssh-source][hidden] {
    display: none !important;
}

.firewall-group-actions form {
    margin: 0;
}

.summary-help {
    margin-left: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.attach-panel form {
    margin-top: 14px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-row:hover {
    background: #ffffff;
    margin: 0 -8px;
    padding: 8px 8px;
    border-radius: 6px;
}

/* Info row for instance detail */
.info-row {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaecf0;
}

.info-row .label-text {
    display: block;
    font-size: 13px;
    color: #667085;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

.info-row .value-text {
    font-size: 15px;
    color: #101828;
    margin: 0;
    display: flex;
    align-items: center;
}

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

    .admin-ip-change-actions {
        min-width: auto;
    }

    .admin-action-buttons {
        flex-direction: column;
    }

    .admin-btn-action {
        width: 100%;
    }
}

/* ============================================
   IP Change Requests UI (Admin)
   ============================================ */

.admin-ip-changes-table {
    table-layout: auto;
    min-width: 100%;
}

.admin-ip-changes-table th,
.admin-ip-changes-table td {
    padding: 14px 12px;
    vertical-align: top;
}

.admin-ip-changes-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #667085;
    font-weight: 600;
    white-space: nowrap;
}

.admin-ip-changes-table td {
    font-size: 14px;
    line-height: 1.5;
}

/* Compact timestamp formatting */
.admin-timestamp {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    word-break: keep-all;
    white-space: nowrap;
}

/* Terminal status display */
.admin-terminal-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-note-details {
    margin-top: 8px;
}

.admin-note-details summary {
    cursor: pointer;
    color: var(--blue);
    font-size: 13px;
    user-select: none;
}

.admin-note-details summary:hover {
    text-decoration: underline;
}

.admin-note-content {
    margin-top: 8px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.admin-note-content small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

/* IP change action forms */
.admin-ip-change-actions {
    min-width: 320px;
}

.admin-ip-change-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-note-area {
    margin-bottom: 4px;
}

.admin-note-area label {
    margin-bottom: 0;
}

.admin-note-area textarea {
    min-height: 60px;
    font-size: 13px;
    resize: vertical;
}

.admin-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-btn-action {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 100px;
}

.admin-btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message column max-width */
.admin-ip-changes-table .admin-support-message {
    max-width: 200px;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   IP Change Requests UI (Customer)
   ============================================ */

.ip-change-request-list {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eaecf0;
}

.ip-change-request-list h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #344054;
}

.ip-change-request-item {
    background: #f9fafb;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.ip-change-request-item:last-child {
    margin-bottom: 0;
}

.ip-change-request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ip-change-request-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ip-change-request-id strong {
    font-size: 14px;
    color: #101828;
}

.ip-change-request-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.ip-change-request-dates small {
    font-size: 12px;
    line-height: 1.4;
}

.ip-change-support-note {
    background: #fff;
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.ip-change-support-note strong {
    display: block;
    font-size: 13px;
    color: var(--blue);
    margin-bottom: 6px;
}

.ip-change-support-note p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #344054;
}

.ip-change-support-note small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.ip-change-no-note {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* Responsive adjustments for IP change UI */
@media (max-width: 1200px) {
    .admin-ip-changes-table {
        font-size: 13px;
    }

    .admin-timestamp {
        font-size: 12px;
    }

    .admin-support-message {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .ip-change-request-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ip-change-request-dates {
        text-align: left;
    }

    /* Allow horizontal scroll on small screens */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-ip-changes-table {
        min-width: 1200px; /* Force horizontal scroll instead of crushing columns */
    }
}

/* ============================================
   Firewall Confirmation Dialog
   ============================================ */

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-message {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-actions button {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.confirm-actions .secondary {
    background: var(--bg);
    border-color: var(--line);
    color: var(--text);
}

.confirm-actions .secondary:hover {
    background: var(--line);
    transform: translateY(-1px);
}

.confirm-actions .primary {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.confirm-actions .primary:hover {
    background: #0051b8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 94, 239, 0.3);
}

/* ============================================
   Alert Cards
   ============================================ */

.alert-card {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s ease;
    border: 1px solid;
}

.alert-card.error {
    background: #fef3f2;
    border-color: #f04438;
    color: #b42318;
}

.alert-card.success {
    background: #ecfdf3;
    border-color: #12b76a;
    color: #067647;
}

.alert-card.warning {
    background: #fffaeb;
    border-color: #f79009;
    color: #b54708;
}

.alert-card.info {
    background: #eff8ff;
    border-color: #53b1fd;
    color: #2e90fa;
}

.alert-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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