﻿/* ============================================================
   MKS DTECH - portal theme
   Same visual language as the MKS website (MKS-Website/app/globals.css)
   and the current customer portal (MKS-Portal/src/index.css):
   light-grey background with a faint blueprint grid, near-black text,
   MKS blue (#1DB7F1) accent, hairline borders, soft cards, mono eyebrows.
   Loaded after Bootstrap and the legacy stylesheets, so it restyles
   every page (Bootstrap classes included) without touching markup.
   ============================================================ */

:root {
    /* surfaces */
    --bg: #f5f5f7;
    --bg-2: #ebebee;
    --bg-alt: #fbfbfd;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-2: rgba(255, 255, 255, 0.92);
    --border: rgba(0, 0, 0, 0.07);
    --border-2: rgba(0, 0, 0, 0.13);

    /* text */
    --text: #111114;
    --text-dim: #3a3a42;
    --text-faint: #66666e;
    --text-ghost: #999999;

    /* brand */
    --mks-blue: #1DB7F1;
    --mks-blue-dim: rgba(29, 183, 241, 0.70);
    --accent: #0e8fbf;
    --accent-soft: rgba(29, 183, 241, 0.10);
    --accent-line: rgba(29, 183, 241, 0.24);

    /* status */
    --ok-bg: #dcfce7; --ok-fg: #166534;
    --info-bg: #e0f2fe; --info-fg: #0369a1;
    --warn-bg: #fef9c3; --warn-fg: #854d0e;
    --danger-bg: #fee2e2; --danger-fg: #dc2626; --danger-fg2: #991b1b;

    /* type */
    --sans: -apple-system, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --radius: 16px;

    /* Bootstrap hooks */
    --bs-primary: #1DB7F1;
    --bs-primary-rgb: 29, 183, 241;
    --bs-body-font-family: var(--sans);
    --bs-body-color: var(--text);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--mks-blue);
    --bs-border-color: var(--border-2);

    /* legacy portal variables, mapped onto the theme */
    --main-background: transparent;
    --font-main: var(--sans);
    --font-medium: var(--sans);
    --font-bold: var(--sans);
    --font-color-text: var(--text);
    --font-color-label: var(--text-faint);
    --font-color-blue: var(--mks-blue);
    --border-color: var(--border-2);
    --border-color-active: var(--mks-blue);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* faint blueprint grid across the page, fading out down the fold */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center -1px;
    -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 70%);
    mask-image: radial-gradient(120% 80% at 50% 0%, #000 20%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
}

::selection { background: var(--accent-soft); color: var(--text); }

h1, h2, h3, h4, h5 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.03em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--mks-blue); }
a:not(.btn):hover { text-decoration: underline; }

/* ============================================================
   Page header: mono eyebrow + big tight title + subtitle
   ============================================================ */
.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: clamp(20px, 3vw, 32px); }
.page-eyebrow, .eyebrow {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mks-blue);
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.page-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--mks-blue); opacity: 0.7; }
/* The eyebrow as the way back to what the page belongs to ("← Team name"). */
.page-eyebrow.back { align-self: flex-start; text-decoration: none !important; }
.page-eyebrow.back::before { content: none; }
.page-eyebrow.back .material-symbols-outlined { font-size: 15px; transition: transform .15s; }
.page-eyebrow.back:hover .material-symbols-outlined { transform: translateX(-2px); }
.page-title { font-size: clamp(26px, 3vw, 32px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
.page-sub { font-size: clamp(15px, 1.6vw, 17px); color: var(--text-faint); max-width: 46em; margin: 0; }

/* ============================================================
   Buttons (Bootstrap classes restyled)
   ============================================================ */
.btn {
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 10px 17px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: transform .18s cubic-bezier(.2,.7,.3,1), background .18s, border-color .18s, box-shadow .18s, color .18s;
}
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.btn-lg { font-size: 16px; padding: 13px 22px; }
.btn:disabled, .btn.disabled { opacity: 0.55; }

.btn-primary, .btn-primary:focus {
    background: var(--mks-blue);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 2px rgba(29,183,241,.22), 0 4px 12px -6px rgba(29,183,241,.40);
}
.btn-primary:hover:not(:disabled), .btn-primary:active {
    background: #0ea5d9 !important;
    border-color: transparent !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(29,183,241,.28), 0 6px 16px -6px rgba(29,183,241,.48);
}

.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark, .btn-light, .btn-secondary {
    background: #fff;
    color: #18181b;
    border-color: rgba(0,0,0,.12);
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn-outline-primary:hover:not(:disabled), .btn-outline-secondary:hover:not(:disabled), .btn-outline-dark:hover:not(:disabled),
.btn-light:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
    background: #fafafa;
    color: #18181b;
    border-color: rgba(0,0,0,.2);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.btn-danger { background: var(--danger-fg); border-color: transparent; color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-fg2); border-color: transparent; transform: translateY(-1px); }
.btn-outline-danger { background: #fff; color: var(--danger-fg); border-color: rgba(220, 38, 38, .35); }
.btn-outline-danger:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger-fg2); border-color: rgba(220, 38, 38, .5); }

.btn-link { color: var(--accent); text-decoration: none; padding-inline: 0; }
.btn-link:hover { color: var(--mks-blue); text-decoration: underline; }

.btn:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft) !important; }

/* ============================================================
   Form fields
   ============================================================ */
.form-label { font-size: 12.5px; color: var(--text-faint); letter-spacing: -0.005em; margin-bottom: 6px; }
.form-control, .form-select {
    font-family: var(--sans);
    font-size: 14.5px;
    color: var(--text);
    background-color: #fff;
    border: 1px solid var(--border-2);
    border-radius: 9px;
    padding: 10px 13px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:active { box-shadow: none; }
.form-control::placeholder { color: var(--text-ghost); }
.form-control:focus, .form-select:focus {
    border-color: var(--mks-blue-dim);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Dropdowns: one look everywhere. Room on the right for a thin chevron; long options end in "…", never under it. */
.form-select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 38px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238a8f98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 14px 14px;
}
.form-select:hover:not(:disabled) { border-color: var(--border-strong, rgba(0, 0, 0, .22)); }
.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231DB7F1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}
.form-select:disabled { background-color: var(--bg); color: var(--text-faint); cursor: default; }
.form-select-sm { padding: 6px 32px 6px 10px; font-size: 13px; border-radius: 8px; background-position: right 10px center; }
/* The site's dropdown (Components/Controls/Select.razor): looks like a field, opens a menu we draw. */
.mks-select { position: relative; display: inline-block; width: 100%; }
.mks-select-button {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 10px 13px; border: 1px solid var(--border-2); border-radius: 9px; background: #fff;
    font-family: var(--sans); font-size: 14.5px; color: var(--text); text-align: left; cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.mks-select-button:hover:not(:disabled) { border-color: var(--border-strong, rgba(0, 0, 0, .22)); }
.mks-select-button:focus-visible, .mks-select.open .mks-select-button { outline: none; border-color: var(--mks-blue-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.mks-select-button:disabled { background: var(--bg); color: var(--text-faint); cursor: default; }
.mks-select-value { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mks-select-value.is-placeholder { color: var(--text-ghost); }
.mks-select-chevron { flex-shrink: 0; font-size: 20px; color: var(--text-faint); transition: transform .15s; }
.mks-select.open .mks-select-chevron { transform: rotate(180deg); color: var(--mks-blue); }
.mks-select.sm .mks-select-button { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

.mks-select-backdrop { position: fixed; inset: 0; z-index: 1050; }
.mks-select-menu {
    position: fixed; z-index: 1051; margin: 0; padding: 5px; list-style: none;
    max-height: 300px; overflow-y: auto; max-width: min(360px, calc(100vw - 16px));
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 12px 32px rgba(17, 17, 20, .12), 0 2px 6px rgba(17, 17, 20, .06);
    animation: mks-select-in .12s ease-out;
}
@keyframes mks-select-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.mks-select-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.mks-select-option.active { background: var(--bg-2); }
.mks-select-option.selected { color: var(--accent); font-weight: 500; }
.mks-select-option.disabled { color: var(--text-ghost); cursor: default; }
.mks-select-option-text { flex: 1; min-width: 0; display: grid; }
.mks-select-option-text small { font-size: 12px; font-weight: 400; color: var(--text-faint); }
.mks-select-check { flex-shrink: 0; font-size: 18px; color: var(--accent); }

.form-text { font-size: 12.5px; color: var(--text-faint); }
.form-check-input:checked { background-color: var(--mks-blue); border-color: var(--mks-blue); }

/* ============================================================
   Cards, badges, alerts, tables
   ============================================================ */
.card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card.border-danger { border-color: rgba(220, 38, 38, .25) !important; }

.card-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 0;
}

.badge {
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.badge.bg-success { background: var(--ok-bg) !important; color: var(--ok-fg); }
.badge.bg-secondary { background: var(--bg-2) !important; color: var(--text-faint); }
.badge.bg-primary, .badge.bg-info { background: var(--info-bg) !important; color: var(--info-fg); }

.alert { border-radius: 12px; border: 1px solid transparent; font-size: 14.5px; padding: 12px 16px; }
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border-color: rgba(22, 101, 52, .12); }
.alert-danger { background: var(--danger-bg); color: var(--danger-fg2); border-color: rgba(220, 38, 38, .15); }
.alert-info { background: var(--info-bg); color: var(--info-fg); border-color: rgba(3, 105, 161, .12); }
.alert-warning { background: var(--warn-bg); color: var(--warn-fg); border-color: rgba(133, 77, 14, .12); }

.table { --bs-table-bg: transparent; color: var(--text); }
.table > thead th {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    border-bottom: 1px solid var(--border-2);
}
.table > tbody td { border-color: var(--border); }
.table > tbody tr:hover > * { background: var(--accent-soft); }

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.18);
    padding: 6px;
}
.dropdown-item { border-radius: 8px; font-size: 14px; padding: 7px 12px; }
.dropdown-item:active { background: var(--accent-soft); color: var(--text); }

/* ============================================================
   Settings pages: section title + explanation on the left,
   controls on the right, hairline between sections
   ============================================================ */
.settings-card { padding: 0 !important; overflow: hidden; margin-bottom: 24px; }
.settings-section {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 2fr;
    gap: 24px 40px;
    padding: clamp(20px, 2.6vw, 30px);
    border-top: 1px solid var(--border);
}
.settings-section:first-child { border-top: none; }
.settings-intro h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 6px; }
.settings-intro p { font-size: 13.5px; color: var(--text-faint); margin: 0; line-height: 1.5; }
.settings-body { display: grid; gap: 14px; align-content: start; min-width: 0; }
.settings-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.settings-danger .settings-intro h2 { color: var(--danger-fg); }
@media (max-width: 760px) { .settings-section { grid-template-columns: 1fr; } }

.value-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 14.5px;
    color: var(--text);
    max-width: 100%;
}

.method-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}
.method-row .method-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ok-fg); }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }

.plain-list { margin: 0; padding-left: 18px; color: var(--text-faint); font-size: 14px; display: grid; gap: 4px; }

/* ============================================================
   Sign-in pages: glass card on the grid backdrop
   ============================================================ */
.auth-layout {
    display: flex;
    justify-content: center;
    padding: 6vh 16px 48px;
}
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface-2);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.10), 0 1px 0 rgba(0, 0, 0, 0.03);
    padding: 2.4rem 2rem 2rem;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2rem;
    width: 44px;
    height: 2px;
    background: linear-gradient(90deg, var(--mks-blue), transparent);
}
.auth-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--mks-blue);
    margin: 0 0 0.6rem;
}
.auth-card h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 0.35rem; }
.auth-sub { font-size: 14.5px; color: var(--text-faint); margin: 0 0 1.6rem; }
.auth-card .mb-3 { margin-bottom: 0.9rem !important; }
.auth-card .btn { width: 100%; padding: 11px 16px; }
.auth-card .btn-sm { width: auto; }

.auth-error, .auth-success {
    margin-top: 14px;
    padding: 10px 13px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
}
.auth-error { background: var(--danger-bg); color: var(--danger-fg2); text-align: left; }
.auth-success { background: var(--ok-bg); color: var(--ok-fg); text-align: left; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--text-ghost);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-2); }

.provider-buttons { display: grid; gap: 10px; }
.provider-button { display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; }

.email-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 13px;
    margin-bottom: 1rem;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 14.5px;
}
.email-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-note { font-size: 14px; color: var(--text-dim); line-height: 1.55; margin: 0 0 1.1rem; }

.auth-links {
    margin-top: 1.4rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 6px;
    justify-items: center;
    font-size: 13px;
    color: var(--text-faint);
}
.auth-links .auth-link-row { display: flex; gap: 6px; padding: 0; }
.auth-links .auth-link-row span { color: var(--text-faint); }
.link-button { color: var(--accent); cursor: pointer; text-decoration: none; }
.link-button:hover { color: var(--mks-blue); text-decoration: underline; }

.code-input {
    font-family: var(--mono);
    font-size: 22px !important;
    letter-spacing: 0.45em;
    text-align: center;
    padding: 12px 13px !important;
}
.code-input::placeholder { letter-spacing: 0.45em; color: var(--bg-2); }

/* ============================================================
   Organization member list
   ============================================================ */
.member-list { display: grid; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--border); }
.member-row:first-child { border-top: none; }
.member-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.member-who { flex: 1; min-width: 0; }
.member-name { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-email { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-role { width: auto; min-width: 110px; padding-top: 5px; padding-bottom: 5px; font-size: 13px; }

/* ============================================================
   Company domains and company accounts
   ============================================================ */
.domain-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 14px 16px; display: grid; gap: 10px; }
.domain-card.verified { border-color: rgba(34, 197, 94, .25); }
.domain-head { display: flex; align-items: center; gap: 10px; }
.domain-name { font-weight: 600; font-size: 15px; }
.domain-help { margin: 0; font-size: 13.5px; color: var(--text-faint); }
.dns-record { display: grid; gap: 6px; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--border-2); font-size: 13px; }
.dns-record > div { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.dns-label { width: 46px; flex-shrink: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.dns-record code { color: var(--text); background: none; padding: 0; word-break: break-all; font-size: 12.5px; user-select: all; }
.company-chip { margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.member-confirm { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--danger-bg); color: var(--danger-fg2); font-size: 13.5px; }


/* ============================================================
   App pages (sidebar shell): header row with an action,
   settings with their own side menu, list toolbars, data tables
   ============================================================ */
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-head-row .btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; }
.page-head-row .btn .material-symbols-outlined { font-size: 19px; }
.narrow-page { max-width: 640px; }
.text-faint { color: var(--text-faint); }

.settings-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; }
.section-nav { position: sticky; top: 0; display: grid; gap: 2px; }
.section-nav-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); padding: 0 10px 8px; }
.section-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-dim); font-size: 14px; font-weight: 500; text-decoration: none !important; }
.section-link .material-symbols-outlined { font-size: 18px; color: var(--text-faint); }
.section-link:hover { background: rgba(0, 0, 0, .045); color: var(--text); }
.section-link.active { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgba(0, 0, 0, .04); }
.section-link.active .material-symbols-outlined { color: var(--mks-blue); }
.section-link.danger, .section-link.danger .material-symbols-outlined { color: var(--danger-fg); }
.section-content { min-width: 0; }
.settings-section.stacked { grid-template-columns: 1fr; gap: 16px; }
@media (max-width: 900px) {
    .settings-shell { grid-template-columns: 1fr; gap: 16px; }
    .section-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .section-nav-label { display: none; }
}

.list-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.list-toolbar .form-select { padding: 7px 36px 7px 12px; font-size: 14px; min-width: 130px; background-position: right 12px center; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); margin-right: auto; }
.segmented button { border: 0; background: transparent; border-radius: 8px; padding: 6px 12px; font-size: 13.5px; font-weight: 500; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.segmented button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.segmented .count { font-size: 12px; color: var(--text-faint); background: rgba(0, 0, 0, .05); border-radius: 999px; padding: 0 7px; }
.search-box { position: relative; width: 260px; max-width: 100%; }
.search-box .material-symbols-outlined { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--text-faint); pointer-events: none; }
.search-box .form-control { padding: 7px 12px 7px 36px; font-size: 14px; }

.data-card { padding: 0 !important; overflow: visible; }
.data-table > thead th { padding: 11px 16px; }
.data-table > tbody td { padding: 10px 16px; vertical-align: middle; }
.data-table > tbody tr:last-child td { border-bottom: none; }
.data-table > tbody tr:hover > * { background: rgba(0, 0, 0, .015); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.you-chip, .guest-chip { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--bg-2); color: var(--text-faint); vertical-align: 2px; }
.you-chip { margin-left: 6px; }
.role-label { font-size: 13.5px; color: var(--text-dim); }
.icon-button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; color: var(--text-faint); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover:not(:disabled) { background: rgba(0, 0, 0, .06); color: var(--text); }
.icon-button:disabled { opacity: .35; }
.dropdown-item .material-symbols-outlined { font-size: 18px; vertical-align: -4px; margin-right: 6px; color: inherit; opacity: .75; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-faint); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; color: var(--text-faint); }
.empty-state .material-symbols-outlined { font-size: 34px; color: var(--text-ghost); }
.empty-state p { margin: 0; }
.inline-confirm { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; background: var(--danger-bg); color: var(--danger-fg2); font-size: 13.5px; }

/* ---------- dialog ---------- */
.mks-dialog-backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(17, 17, 20, .32); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.mks-dialog { width: 100%; max-width: 480px; background: #fff; border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .2); outline: none; }
.mks-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.mks-dialog-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.mks-dialog.danger .mks-dialog-head h2 { color: var(--danger-fg); }
.mks-dialog-close { border: 0; background: none; color: var(--text-faint); font-size: 22px; border-radius: 8px; }
.mks-dialog-close:hover { background: var(--bg); color: var(--text); }
.mks-dialog-body { padding: 14px 20px 18px; display: grid; gap: 14px; }
.mks-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-alt); border-radius: 0 0 16px 16px; }
.dialog-note { margin: 0; font-size: 14px; color: var(--text-dim); line-height: 1.5; }

/* ---------- overview tiles ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-tile { display: grid; gap: 6px; padding: 18px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 0, 0, .04); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.stat-tile:hover { border-color: var(--accent-line); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); color: var(--text); }
.stat-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-faint); font-weight: 500; }
.stat-label .material-symbols-outlined { font-size: 18px; color: var(--mks-blue); }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.stat-foot { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-card { padding: 18px 20px; display: grid; gap: 4px; }
.setup-card .card-eyebrow { margin-bottom: 6px; }
.setup-step { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.setup-step:hover { background: var(--bg); color: var(--text); }
.setup-step > .material-symbols-outlined:first-child { color: var(--text-ghost); font-size: 22px; }
.setup-step.done > .material-symbols-outlined:first-child { color: #16a34a; }
.setup-step.done strong { text-decoration: line-through; color: var(--text-faint); }
.setup-text { flex: 1; display: grid; font-size: 14px; }
.setup-text span { font-size: 13px; color: var(--text-faint); }
.setup-step .chevron { color: var(--text-ghost); }

/* ---------- apps ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.app-card { display: grid; gap: 16px; padding: 20px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.app-card.inactive { opacity: .7; }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #1DB7F1, #0a6f9a); flex-shrink: 0; }
.app-card.inactive .app-icon { background: var(--bg-2); color: var(--text-faint); }
.app-title { display: grid; gap: 2px; min-width: 0; }
.app-name { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.app-status-off { font-size: 13px; color: var(--text-faint); }
.app-seats { display: grid; gap: 6px; }
.app-seats-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-faint); }
.seat-meter { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.seat-meter span { display: block; height: 100%; border-radius: 999px; background: var(--mks-blue); }
.app-facts { display: grid; gap: 6px; font-size: 13px; color: var(--text-faint); border-top: 1px solid var(--border); padding-top: 12px; }
.app-facts .material-symbols-outlined { font-size: 16px; vertical-align: -3px; margin-right: 4px; }

@media (max-width: 700px) {
    .col-account { display: none; }
    .data-table > thead th, .data-table > tbody td { padding-left: 12px; padding-right: 8px; }
    .data-table .member-role { min-width: 0; padding-right: 30px; background-position: right 8px center; }
    .page-head-row { flex-direction: column; gap: 0; }
    .page-head-row .btn { margin-top: 0; margin-bottom: 20px; }
    .search-box { width: 100%; }
}

/* ---------- personal overview: organizations and hints ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.section-head a { font-size: 13.5px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.org-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 0, 0, .04); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.org-card:hover { border-color: var(--accent-line); box-shadow: 0 4px 14px rgba(0, 0, 0, .06); color: var(--text); }
.org-card.new { border-style: dashed; box-shadow: none; background: transparent; }
.org-avatar { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #1DB7F1, #0a6f9a); }
.org-avatar.new { background: var(--bg-2); color: var(--text-faint); font-size: 20px; font-weight: 400; }
.org-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.org-name { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-sub { font-size: 12.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-card .chevron { color: var(--text-ghost); }
/* ---------- home: app widgets ---------- */
.home-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.home-app { display: grid; gap: 14px; align-content: start; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.home-app.inactive { opacity: .6; }
.home-app-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-app-name { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-logo { width: 40px; height: 40px; flex-shrink: 0; object-fit: cover; border-radius: 50%; }
.app-logo-initial { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #1DB7F1, #0a6f9a); color: #fff; font-weight: 600; }
.home-app-teams { display: flex; flex-wrap: wrap; gap: 6px; }
.home-team { display: grid; gap: 18px; margin-top: 28px; padding: 22px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0, 0, 0, .04); }
.home-team-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-team-name { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.home-team-meta { font-size: 13px; color: var(--text-faint); }
.home-team-empty { display: grid; justify-items: center; gap: 8px; padding: 28px 16px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--border-2); font-size: 14px; color: var(--text-faint); }
.home-team-empty .material-symbols-outlined { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--border); font-size: 24px; color: var(--text-ghost, var(--text-faint)); }
.home-team .home-app { box-shadow: none; }
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.activity-list li:last-child { border-bottom: 0; }
.activity-time { flex-shrink: 0; font-size: 12.5px; color: var(--text-faint); }
.apps-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--border); font-size: 14px; color: var(--text-faint); }
.apps-empty a { font-size: 13.5px; font-weight: 600; }
.hint-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; background: var(--info-bg); border: 1px solid rgba(3, 105, 161, .15); margin-bottom: 8px; }
.hint-icon { font-size: 26px; color: var(--info-fg); }
.hint-text { flex: 1; min-width: 220px; display: grid; gap: 2px; font-size: 14px; color: var(--text-dim); }
.hint-text strong { color: var(--text); font-weight: 600; }
.hint-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- reconnecting box (replaces Blazor's default) ---------- */
.mks-reconnect { display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; background: rgba(245, 245, 247, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mks-reconnect.components-reconnect-show, .mks-reconnect.components-reconnect-retrying, .mks-reconnect.components-reconnect-failed, .mks-reconnect.components-reconnect-rejected { display: flex; }
.mks-reconnect-card { width: 260px; padding: 26px 24px 22px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 24px 64px rgba(0, 0, 0, .12); text-align: center; }
.mks-reconnect-logo { font-family: var(--font-logo); font-size: 22px; letter-spacing: .02em; margin-bottom: 18px; }
.mks-reconnect-logo .blue { color: var(--mks-blue); }
.mks-reconnect-bar { height: 3px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-bottom: 14px; }
.mks-reconnect-bar span { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--mks-blue); animation: mks-reconnect-slide 1.1s ease-in-out infinite; }
@keyframes mks-reconnect-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
.mks-reconnect p { margin: 0; font-size: 13.5px; color: var(--text-faint); }
.mks-reconnect-lost { display: none; }
.mks-reconnect.components-reconnect-failed .mks-reconnect-busy, .mks-reconnect.components-reconnect-rejected .mks-reconnect-busy { display: none; }
.mks-reconnect.components-reconnect-failed .mks-reconnect-lost { display: block; }
.mks-reconnect.components-reconnect-failed .mks-reconnect-bar span { animation: none; width: 100%; background: var(--danger-fg); opacity: .5; }
.mks-reconnect-lost button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.mks-reconnect-lost button:hover { text-decoration: underline; }

/* ---------- pages don't scroll, their lists do ---------- */
.app-main > .content-container > * { flex-shrink: 0; }
.data-card { flex: 1 1 0; min-height: 220px; display: flex; flex-direction: column; overflow: hidden; }
.data-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.data-scroll .data-table > thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--border); }
.data-card .pager { flex-shrink: 0; }
.data-card.empty-state, .data-card > .empty-state { flex: 0 0 auto; }
@media (max-width: 900px) {
    .data-card { flex: 0 0 auto; min-height: 0; overflow: visible; }
    .data-scroll { overflow: visible; }
    .data-scroll .data-table > thead th { position: static; }
}

/* ---------- verified teams ---------- */
.verified-badge { display: inline-flex; align-items: center; color: var(--mks-blue); flex-shrink: 0; }
.verified-badge .material-symbols-outlined { font-size: 16px; font-variation-settings: 'FILL' 1; }
.verified-pill { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 3px 10px 3px 7px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.verified-pill .material-symbols-outlined { font-size: 16px; font-variation-settings: 'FILL' 1; }

/* Cancel: a quiet white button with red text, next to the main action. */
.btn.btn-cancel { background: #fff; border: 1px solid var(--border-2); color: var(--danger-fg, #b42318); }
.btn.btn-cancel:hover, .btn.btn-cancel:focus-visible { background: var(--danger-bg, #fdecec); border-color: rgba(180, 35, 24, .3); color: var(--danger-fg, #b42318); }


/* ============================================================
   Settings cards (admin plan and product pages): one setting per row
   ============================================================ */
.plan-card { min-height: 0 !important; padding: 0; margin-bottom: 18px; max-width: 760px; }

.plan-card-head { padding: 18px 22px 12px; }
.plan-card-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.plan-card-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-faint); }

/* One setting per row: what it is on the left, the control on the right. */
.setting-row { display: flex; align-items: center; gap: 24px; padding: 14px 22px; border-top: 1px solid var(--border); }
.setting-text { flex: 1; min-width: 0; }
.setting-name { display: block; margin: 0; font-size: 14.5px; font-weight: 500; color: var(--text); }
.setting-help { font-size: 12.5px; color: var(--text-faint); line-height: 1.45; }
.setting-control { flex: 0 0 200px; display: flex; justify-content: flex-end; }
.setting-control .form-select, .setting-control > .form-control { width: 100%; }
.setting-control .form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }

/* A number with its unit inside the field. */
.input-unit { position: relative; width: 100%; }
.input-unit .form-control { padding-right: 48px; }
.input-unit span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-faint); pointer-events: none; }

.plan-card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 14px 14px; }
.plan-message { font-size: 13px; }
.plan-message.ok { color: #15803d; }
.plan-message.error { color: var(--danger-fg, #b42318); }

@media (max-width: 640px) {
    .setting-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .setting-control { flex-basis: auto; justify-content: flex-start; }
}

.plan-intro { margin: 2px 0 0; max-width: 620px; font-size: 13.5px; color: var(--text-faint); }
.setting-key { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: var(--bg-2); color: var(--text-dim); font-size: 11.5px; font-weight: 400; }
.setting-row-button { width: 100%; border: 0; border-top: 1px solid var(--border); background: transparent; text-align: left; color: var(--text); cursor: pointer; }
.plan-card > .setting-row-button:first-child, .plan-card > .setting-row:first-child { border-top: 0; }
.setting-row-button:hover { background: var(--bg); }
.setting-default { flex-shrink: 0; display: grid; justify-items: end; font-size: 12.5px; color: var(--text-faint); }
.setting-default strong { color: var(--text); font-weight: 500; }
.setting-type { font-size: 11.5px; }
.setting-go { color: var(--text-faint); }
.setting-control-wide { flex-basis: 280px; }
.btn-reset { margin-left: 6px; padding: 0; border: 0; background: none; font-size: 12.5px; color: var(--accent); cursor: pointer; }
.btn-reset:hover { text-decoration: underline; }
.plan-card-foot-start { justify-content: flex-start; }
.price-input { max-width: 300px; }

/* A value shown on the right of a settings row (read-only). */
.setting-value { flex-shrink: 0; max-width: 60%; font-size: 13.5px; color: var(--text); text-align: right; overflow-wrap: anywhere; }
.setting-value-text { color: var(--text-dim); }

/* Small labels on a plan or licence: what kind it is. */
.plan-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.plan-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--bg-2); color: var(--text-dim); font-size: 11.5px; font-weight: 500; line-height: 1.6; vertical-align: 1px; }
.plan-chip.free { background: var(--accent-soft); color: var(--accent); }
.plan-chip.warn { background: #fdf3e1; color: #a86b00; }
.status-chip { display: inline-flex; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-chip.ok { background: rgba(34, 197, 94, .1); color: #15803d; }
.status-chip.off { background: var(--bg-2); color: var(--text-faint); }
.holder-icon { font-size: 17px !important; margin-right: 5px; vertical-align: -3px; color: var(--text-faint); }
.setting-value code, .setting-help code { padding: 1px 6px; border-radius: 5px; background: var(--bg-2); color: var(--text-dim); font-size: 12px; }

/* Where a page sits, above its title (Components/Controls/Crumbs.razor). */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; color: var(--text-faint); }
.crumbs a { color: var(--text-faint); text-decoration: none; }
.crumbs a:hover { color: var(--mks-blue); }
.crumbs > span:last-child { color: var(--text-dim); }
.crumbs-sep { font-size: 16px !important; color: var(--text-ghost, var(--text-faint)); }

/* An API call shown to admins: method, path, request and response. */
.api-example { display: grid; gap: 10px; padding: 4px 22px 18px; }
.api-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.api-line code { color: var(--text); background: none; padding: 0; }
.api-method { padding: 1px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.api-example pre { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-dim); white-space: pre-wrap; }

/* Product app settings: a row per setting, a column per plan. */
.settings-matrix-card { max-width: none; }
.settings-matrix-scroll { overflow-x: auto; }
.settings-matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.settings-matrix th { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-faint); text-align: left; white-space: nowrap; }
.settings-matrix th a { color: var(--text); text-decoration: none; }
.settings-matrix th a:hover { color: var(--mks-blue); }
.settings-matrix td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.settings-matrix tbody tr:last-child td { border-bottom: 0; }
.matrix-setting { min-width: 220px; }
.matrix-setting-row { display: flex; align-items: flex-start; gap: 10px; }
.matrix-gear { flex-shrink: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 18px !important; color: var(--text-faint); cursor: pointer; transition: color .12s, border-color .12s; }
.matrix-gear:hover, .matrix-gear:focus-visible { color: var(--mks-blue); border-color: var(--accent-line, rgba(29, 183, 241, .4)); outline: none; }
.plan-card-foot .btn .material-symbols-outlined { font-size: 18px; vertical-align: -4px; margin-right: 4px; }
.matrix-setting .setting-key { margin-left: 0; display: inline-block; margin-top: 2px; }
.matrix-default { color: var(--text-dim); white-space: nowrap; }
.matrix-input, .settings-matrix .mks-select { min-width: 120px; }
.settings-matrix th .plan-chip, .setting-name + .plan-chip, td > .plan-chip { margin-left: 6px; }

/* Values typed as badges (Components/Controls/TagInput.razor). */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border-2); border-radius: 9px; background: #fff; cursor: text; transition: border-color .15s, box-shadow .15s; }
.tag-input:focus-within { border-color: var(--mks-blue-dim); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500; }
.tag-remove { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 15px !important; cursor: pointer; }
.tag-remove:hover { background: rgba(29, 183, 241, .18); }
.tag-field { flex: 1; min-width: 120px; padding: 4px 4px; border: 0; outline: none; font-family: var(--sans); font-size: 14.5px; color: var(--text); background: transparent; }

/* Clickable rows: no link underline, the arrow close to its text. */
a.setting-row-button, a.setting-row-button:hover, a.setting-row-button * { text-decoration: none !important; }
.setting-row-button { gap: 16px; }
.setting-row-button .setting-go { margin-left: -10px; font-size: 20px !important; }
