:root {
    color-scheme: light dark;
    --bg: #f5f7fb;
    --fg: #1f2733;
    --muted: #6b778c;
    --brand: #2f6fed;
    --brand-dark: #1c4cc8;
    --card: #ffffff;
    --border: #dce3f0;
    --surface-header: #ffffff;
    --surface-control: #ffffff;
    --surface-tile: #f2f5ff;
    --surface-icon: #f0f4ff;
    --surface-soft: #f7f9ff;
    --surface-alt: #f8faff;
    --surface-admin-summary: #f5f7ff;
    --surface-announcement: #f9fbff;
    --brand-soft: rgba(47, 111, 237, 0.12);
    --brand-badge: rgba(47, 111, 237, 0.15);
    --warning-surface: #fff4e5;
    --warning-border: #ffe2b5;
    --danger: #c32f27;
    --text-on-brand: #ffffff;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(31, 39, 51, 0.08);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.servicehub-page {
    padding: 2rem;
}

.servicehub-shell {
    max-width: 1120px;
    margin: 0 auto;
}

.servicehub-shell.narrow {
    max-width: 720px;
}

.servicehub-hero {
    margin-bottom: 1.25rem;
}

.servicehub-hero .eyebrow {
    margin: 0 0 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.servicehub-hero h1 {
    margin: 0;
    font-size: 2.5rem;
}

.servicehub-hero p {
    max-width: 760px;
    color: var(--muted);
}

.servicehub-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    align-items: start;
}

.servicehub-form,
.servicehub-side,
.servicehub-history,
.servicehub-alert {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.servicehub-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.servicehub-form label {
    display: grid;
    gap: 0.4rem;
    font-weight: 700;
}

.servicehub-form label.full,
.servicehub-safe-note,
.servicehub-form .btn {
    grid-column: 1 / -1;
}

.servicehub-form input,
.servicehub-form select,
.servicehub-form textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    font: inherit;
    background: #fff;
}

.servicehub-form textarea {
    resize: vertical;
}

.servicehub-safe-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.servicehub-side {
    padding: 1rem;
}

.servicehub-side h2,
.servicehub-history h2 {
    margin-top: 0;
}

.servicehub-side dl {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.servicehub-side dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.servicehub-side dd {
    margin: 0.15rem 0 0;
    overflow-wrap: anywhere;
}

.servicehub-alert {
    display: grid;
    gap: 0.25rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
}

.servicehub-alert.success {
    border-color: #95d5b2;
    background: #eefaf3;
}

.servicehub-alert.error {
    border-color: #f1aeb5;
    background: #fff5f5;
}

.servicehub-history {
    margin-top: 1rem;
    padding: 1rem;
}

.servicehub-history-list {
    display: grid;
    gap: 0.75rem;
}

.servicehub-history-list article {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem;
}

.servicehub-history-list p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.servicehub-history-list span {
    align-self: start;
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 0.25rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.servicehub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 800px) {
    .servicehub-page {
        padding: 1rem;
    }

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

    .servicehub-hero h1 {
        font-size: 2rem;
    }
}

.call-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.call-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.call-hero h1,
.call-hero p {
    margin: 0;
}

.call-hero h1 {
    font-size: 2.2rem;
}

.call-hero p:not(.eyebrow) {
    color: var(--muted);
}

.call-shell,
.call-queue-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.call-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    min-height: 560px;
}

.call-stage {
    min-height: 420px;
    padding: 1rem;
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 1rem;
    background: #111827;
    border-radius: 8px 0 0 8px;
}

.call-annotation-canvas {
    position: absolute;
    inset: 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    z-index: 8;
    pointer-events: none;
    touch-action: none;
}

.call-annotation-canvas.active {
    pointer-events: auto;
    cursor: crosshair;
}

.call-remote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.call-tile {
    min-height: 220px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: #1f2937;
    color: #fff;
}

.call-tile video {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.call-tile p {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    margin: 0;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.75);
    padding: 0.25rem 0.6rem;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
}

.call-avatar {
    width: 112px;
    height: 112px;
    z-index: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--avatar-color, var(--brand));
    color: var(--text-on-brand);
    font-size: 2rem;
    font-weight: 800;
}

.call-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-panel {
    padding: 1rem;
    display: grid;
    align-content: start;
    gap: 1rem;
}

.call-panel.horizontal {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-top: 1px solid var(--border);
}

.call-status-card,
.call-queue-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem;
    background: var(--surface-soft);
}

.call-status-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.call-status-card p,
.call-queue-card p {
    margin: 0.15rem 0 0;
    color: var(--muted);
}

.call-status-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    background: var(--muted);
}

.call-status-dot[data-tone="ok"] {
    background: #047857;
}

.call-status-dot[data-tone="warn"] {
    background: #b45309;
}

.call-status-dot[data-tone="error"] {
    background: var(--danger);
}

.call-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.call-actions .btn,
.call-actions select {
    min-height: 2.6rem;
}

.call-actions .btn.active,
.call-actions .btn.attention {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.call-actions .btn.attention {
    animation: call-tool-pulse 1.3s ease-in-out infinite;
}

@keyframes call-tool-pulse {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-1px);
    }
}

.call-actions select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    background: var(--surface-control);
    font: inherit;
}

.btn.danger {
    background: var(--danger);
    color: #fff;
}

.call-tech-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 1rem;
}

.call-queue-list {
    padding: 1rem;
}

.call-queue-list .widget-header {
    align-items: center;
}

.call-queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: 0.75rem;
    background: var(--surface-soft);
}

.call-queue-item p,
.call-queue-item span {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-detail-list {
    display: grid;
    gap: 0.75rem;
}

.admin-detail-list div {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 0.75rem;
}

.admin-detail-list dt {
    color: var(--muted);
    font-weight: 800;
}

.admin-detail-list dd {
    margin: 0;
}

@media (max-width: 900px) {
    .call-page {
        padding: 1rem;
    }

    .call-hero,
    .call-panel.horizontal {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .call-shell,
    .call-tech-grid,
    .call-stage {
        grid-template-columns: 1fr;
    }

    .call-stage {
        border-radius: 8px 8px 0 0;
    }
}

.asset-discovery {
    max-width: 780px;
    margin: 1rem auto 0;
    padding: 0 1rem;
}

.asset-discovery-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
}

.asset-discovery-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    color: var(--brand);
}

.asset-discovery-icon {
    width: 108px;
    height: 108px;
    border-radius: 22px;
    margin: 1rem auto 0.75rem;
    font-size: 3rem;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(47, 111, 237, 0.16), rgba(14, 165, 164, 0.18));
    border: 1px solid rgba(47, 111, 237, 0.28);
}

.asset-discovery-type {
    margin: 0.25rem 0 0;
    font-size: 1.05rem;
    color: var(--muted);
}

.asset-discovery-id {
    margin: 0.65rem 0 0;
    color: var(--muted);
}

.asset-discovery-id code,
.asset-discovery-qr code {
    word-break: break-all;
}

.asset-discovery-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.asset-discovery-qr {
    margin: 1rem 0 0;
    color: var(--muted);
}

.asset-discovery-status {
    margin: 0.9rem 0 0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1729;
        --fg: #e5ecff;
        --muted: #9aa7c7;
        --card: #141c24;
        --border: #27334a;
        --surface-header: #101827;
        --surface-control: #1a2336;
        --surface-tile: #1d2944;
        --surface-icon: #1a2640;
        --surface-soft: #182238;
        --surface-alt: #141d2d;
        --surface-admin-summary: #1b2840;
        --surface-announcement: #182238;
        --brand-soft: rgba(47, 111, 237, 0.25);
        --brand-badge: rgba(47, 111, 237, 0.32);
        --warning-surface: #3d2c1a;
        --warning-border: #75542b;
        --danger: #ff7a66;
        --shadow: 0 20px 48px rgba(3, 7, 18, 0.6);
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.app-header {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    background: var(--surface-header);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header .brand a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand);
}

.global-search {
    display: flex;
    gap: 0.5rem;
}

.global-search input {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    min-width: 220px;
}

.global-search button {
    border: none;
    background: var(--brand);
    color: var(--text-on-brand);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.header-actions {
    margin-left: 1rem;
}

.guest-actions {
    display: flex;
    align-items: center;
}

.guest-actions .btn {
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    list-style: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.45rem 0.35rem 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    cursor: pointer;
    user-select: none;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    overflow: hidden;
    background: var(--avatar-color, var(--brand));
    color: var(--text-on-brand);
    font-size: 0.9rem;
    font-weight: 700;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.user-label {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.user-menu-trigger::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.7;
}

.user-menu[open] .user-menu-trigger {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 190px;
    display: grid;
    gap: 0.2rem;
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
    z-index: 200;
}

.user-menu-dropdown a {
    text-decoration: none;
    color: var(--fg);
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
}

.user-menu-dropdown a:hover {
    background: var(--surface-soft);
}

.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.app-footer {
    text-align: center;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    width: 100%;
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.top-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.reports-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.reports-hero h1 {
    margin: 0;
}

.reports-hero p {
    margin: 0.45rem 0 0;
    color: var(--muted);
}

.report-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.report-type-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem;
    background: var(--surface-control);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.report-type-card h3 {
    margin: 0;
}

.report-type-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.report-type-count {
    align-self: flex-start;
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: rgba(14, 165, 164, 0.14);
    color: #0f766e;
    font-weight: 600;
}

.report-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-recent-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-control);
    padding: 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.report-recent-main {
    flex: 1 1 auto;
    min-width: 0;
}

.report-recent-main h3 {
    margin: 0;
    font-size: 1rem;
}

.report-recent-main p {
    margin: 0.3rem 0 0.5rem;
    color: var(--muted);
}

.report-summary-line {
    margin: 0 0 0.5rem;
    font-size: 0.83rem;
    color: var(--fg);
}

.report-recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.report-recent-meta span {
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.18rem 0.48rem;
    font-size: 0.76rem;
    color: var(--muted);
}

.report-recent-metrics {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.report-recent-metric {
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.report-detail-page {
    gap: 1rem;
}

.report-detail-hero h1 {
    margin: 0.3rem 0 0;
}

.report-back-link {
    text-decoration: none;
    color: var(--brand);
    font-weight: 600;
}

.report-detail-kind {
    margin: 0.8rem 0 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand);
}

.report-detail-subtitle {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.report-detail-meta {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.report-detail-meta span {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    padding: 0.2rem 0.5rem;
    font-size: 0.76rem;
    color: var(--muted);
}

.report-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.report-metric-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-control);
    padding: 0.8rem;
}

.report-metric-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-metric-card h3 {
    margin: 0.35rem 0 0;
    font-size: 1.12rem;
}

.report-detail-panel {
    overflow: hidden;
}

.report-traceroute-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.25rem;
}

.report-traceroute-list code {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.report-table-wrap {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.report-table th,
.report-table td {
    text-align: left;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: top;
}

.report-table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.report-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-soft);
}

.report-pill.ok {
    color: #0b7a68;
    border-color: rgba(11, 122, 104, 0.35);
    background: rgba(11, 122, 104, 0.14);
}

.report-pill.warn {
    color: #9a4c05;
    border-color: rgba(154, 76, 5, 0.32);
    background: rgba(154, 76, 5, 0.14);
}

.report-warning {
    margin: 0 0 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--warning-border);
    background: var(--warning-surface);
    color: #8a4b03;
}

.report-summary-block p {
    margin: 0.3rem 0;
}

.report-summary-sync {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 600;
}

.report-summary-sync.ok {
    background: rgba(11, 122, 104, 0.14);
    border-color: rgba(11, 122, 104, 0.35);
    color: #0b7a68;
}

.report-summary-sync.warn {
    background: rgba(195, 47, 39, 0.12);
    border-color: rgba(195, 47, 39, 0.3);
    color: #9d251f;
}

.report-sync-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-weight: 700;
}

.report-connectivity p {
    margin: 0.25rem 0;
}

.report-merge-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.7rem;
}

.report-inline-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.25rem;
}

.report-inline-muted {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.report-host-card-list {
    display: grid;
    gap: 0.75rem;
}

.report-host-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-control);
    padding: 0.75rem;
}

.report-host-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.report-host-card-header h3 {
    margin: 0;
    font-size: 1rem;
}

.report-host-card-header p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.report-host-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.report-host-details {
    margin-top: 0.6rem;
}

.report-host-details summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.86rem;
}

.report-host-details[open] summary {
    margin-bottom: 0.55rem;
}

.report-merge-table td {
    min-width: 120px;
}

.report-merge-main-row td {
    vertical-align: top;
}

.report-merge-subrow td {
    background: var(--surface-soft);
    border-top: 0;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.report-host-subrow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.65rem;
}

.report-subsection {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-control);
    padding: 0.55rem;
}

.report-subsection h4 {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.report-subsection p {
    margin: 0.25rem 0 0;
}

.report-voice-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.55rem;
}

.report-voice-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-control);
    padding: 0.65rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.report-voice-row span {
    color: var(--muted);
    font-size: 0.85rem;
}

.report-voice-row strong {
    font-size: 0.95rem;
    text-align: right;
}

.report-json {
    margin: 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.8rem;
    background: #0f172a;
    color: #dbeafe;
    font-size: 0.82rem;
    line-height: 1.45;
    overflow: auto;
}

.report-raw-toggle summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand);
}

.report-raw-toggle[open] summary {
    margin-bottom: 0.7rem;
}

@media (max-width: 720px) {
    .report-recent-item {
        flex-direction: column;
        align-items: stretch;
    }

    .report-table {
        min-width: 560px;
    }

    .report-metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }
}

.featured-services {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.featured-header h2 {
    margin: 0;
}

.featured .service-card {
    border: 2px solid var(--brand);
    box-shadow: 0 18px 44px rgba(47, 111, 237, 0.18);
}

.featured .service-card.featured-card {
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.08), rgba(28, 76, 200, 0.14));
}

.hero-search {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 24px;
    padding: 3.5rem 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.18), rgba(28, 76, 200, 0.28));
    color: var(--fg);
    text-align: center;
}

.hero-search::before,
.hero-search::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(47, 111, 237, 0.35), transparent 70%);
    filter: blur(0);
    animation: heroGlow 12s infinite alternate;
}

.hero-search::before {
    top: -120px;
    left: -80px;
}

.hero-search::after {
    bottom: -140px;
    right: -60px;
    animation-delay: 4s;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.hero-inner h1 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0;
}

.hero-caption {
    margin: 0;
    max-width: 600px;
    color: var(--muted);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-search-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.hero-suggestions {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(600px, 80vw);
    max-height: 240px;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding: 0.25rem;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(47, 111, 237, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-suggestions[hidden] {
    display: none;
}

.hero-suggestion {
    display: block;
    padding: 0.6rem 0.85rem;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.95rem;
    color: #0f1729;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.hero-suggestion:hover,
.hero-suggestion:focus,
.hero-suggestion.is-active {
    background: rgba(47, 111, 237, 0.12);
    transform: translateX(3px);
}

.hero-search-form input {
    width: min(600px, 80vw);
    padding: 0.9rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.85);
    color: #0f1729;
    font-size: 1rem;
    box-shadow: 0 16px 45px rgba(47, 111, 237, 0.22);
}

@media (prefers-color-scheme: dark) {
    .hero-search {
        background: linear-gradient(135deg, rgba(47, 111, 237, 0.3), rgba(28, 76, 200, 0.5));
    }

    .hero-search-form input {
        background: rgba(20, 28, 36, 0.8);
        color: var(--fg);
        border-color: rgba(39, 51, 74, 0.8);
        box-shadow: 0 20px 55px rgba(3, 7, 18, 0.7);
    }

    .hero-suggestions {
        background: rgba(20, 28, 36, 0.92);
        border-color: rgba(39, 51, 74, 0.8);
        box-shadow: 0 20px 58px rgba(3, 7, 18, 0.65);
    }

    .hero-suggestion {
        color: var(--fg);
    }

    .hero-suggestion:hover,
    .hero-suggestion:focus,
    .hero-suggestion.is-active {
        background: rgba(47, 111, 237, 0.25);
    }
}

.hero-search-form button {
    padding: 0.9rem 1.75rem;
    border-radius: 18px;
    border: none;
    background: var(--brand);
    color: var(--text-on-brand);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 12px 36px rgba(47, 111, 237, 0.35);
}

@keyframes heroGlow {
    from {
        transform: scale(0.9) translate3d(0, 0, 0);
        opacity: 0.8;
    }
    to {
        transform: scale(1.2) translate3d(20px, -10px, 0);
        opacity: 1;
    }
}

.widget {
    background: var(--card);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.profile-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.profile-hero,
.profile-settings {
    border: 1px solid var(--border);
    border-radius: 8px;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-identity h1,
.profile-identity p {
    margin: 0;
}

.profile-identity p {
    color: var(--muted);
}

.profile-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    flex: 0 0 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--avatar-color, var(--brand));
    color: var(--text-on-brand);
    font-size: 2rem;
    font-weight: 800;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-avatar-form {
    display: grid;
    gap: 1rem;
}

.profile-avatar-form label {
    display: grid;
    gap: 0.4rem;
    font-weight: 700;
}

.profile-avatar-form input[type="text"],
.profile-avatar-form input:not([type]),
.profile-avatar-form input[type="file"],
.profile-avatar-form select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: var(--surface-control);
    font: inherit;
}

.profile-avatar-form select {
    min-height: 2.75rem;
}

.field-hint {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 500;
}

.avatar-mode-fieldset,
.avatar-character-fieldset,
.avatar-color-fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
}

.avatar-mode-fieldset legend,
.avatar-character-fieldset legend,
.avatar-color-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 800;
}

.avatar-mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.avatar-mode-card {
    position: relative;
    display: block !important;
    cursor: pointer;
    font-weight: 600 !important;
}

.avatar-mode-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.avatar-mode-card span {
    min-height: 84px;
    display: grid;
    align-content: center;
    gap: 0.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--surface-control);
}

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

.avatar-mode-card small {
    color: var(--muted);
    font-weight: 500;
    line-height: 1.35;
}

.avatar-mode-card input:checked + span {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent);
}

.avatar-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.avatar-color-option {
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.avatar-color-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.avatar-color-option span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: block;
    background: var(--avatar-color);
    border: 3px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.avatar-color-option input:checked + span {
    border-color: var(--fg);
}

.checkbox-row {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600 !important;
}

.checkbox-row input {
    width: auto;
}

.notice {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    background: var(--surface-soft);
}

.notice.success {
    border-color: rgba(4, 120, 87, 0.35);
    background: rgba(4, 120, 87, 0.08);
}

.notice.error {
    border-color: rgba(195, 47, 39, 0.35);
    background: rgba(195, 47, 39, 0.08);
}

.weather-card {
    position: relative;
    border-radius: 20px;
    padding: 1.75rem;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(47, 111, 237, 0.95), rgba(28, 76, 200, 0.75));
    box-shadow: 0 25px 45px rgba(28, 76, 200, 0.35);
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.weather-card::before {
    content: "";
    position: absolute;
    inset: -40% 20% 40% -40%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.4), transparent 65%);
    opacity: 0.65;
    animation: weatherGlow 18s infinite alternate;
}

.weather-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -60px;
    top: -60px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45), transparent 65%);
    filter: blur(4px);
    opacity: 0.7;
}

.weather-card .weather-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 1;
}

.weather-card .weather-readout {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: right;
}

.weather-card .weather-temp {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
}

.weather-card .weather-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: capitalize;
}

.weather-card .weather-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.weather-card .weather-meta span::before {
    content: "•";
    margin-right: 0.45rem;
}

.weather-card .weather-meta span:first-child::before {
    content: "";
    margin: 0;
}

.weather-icon {
    position: relative;
    width: 120px;
    height: 120px;
}

.weather-icon .sun {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe27a, #ffb347);
    box-shadow: 0 0 25px rgba(255, 226, 122, 0.4);
    animation: spin 20s linear infinite;
}

.weather-icon .sun.halo {
    width: 86px;
    height: 86px;
    top: 8px;
    left: 8px;
    background: radial-gradient(circle at center, rgba(255, 226, 122, 0.45), transparent 70%);
    animation: sunPulse 6s ease-in-out infinite;
}

.weather-icon .cloud {
    position: absolute;
    bottom: 18px;
    width: 76px;
    height: 46px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 24px;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.12));
    animation: cloudDrift 12s ease-in-out infinite;
}

.weather-icon .cloud::before,
.weather-icon .cloud::after {
    content: "";
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.weather-icon .cloud::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 12px;
}

.weather-icon .cloud::after {
    width: 32px;
    height: 32px;
    top: -16px;
    right: 16px;
}

.weather-icon .cloud-1 {
    left: 12px;
}

.weather-icon .cloud-2 {
    left: 36px;
    opacity: 0.85;
    animation-delay: 3s;
}

.weather-icon .precip {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.weather-icon .rain {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    border-radius: 2px;
    top: 70px;
    animation: rainDrop 1.2s linear infinite;
}

.weather-icon .rain-1 {
    left: 48px;
}

.weather-icon .rain-2 {
    left: 68px;
    animation-delay: 0.6s;
}

.weather-icon .snow {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    top: 72px;
    animation: snowDrift 2.8s ease-in-out infinite;
}

.weather-icon .snow-1 {
    left: 46px;
}

.weather-icon .snow-2 {
    left: 68px;
    animation-delay: 1.4s;
}

.weather-card[data-state="clear"] .cloud,
.weather-card[data-state="clear"] .precip {
    opacity: 0;
}

.weather-card[data-state="partly"] .cloud-2 {
    opacity: 0.6;
}

.weather-card[data-state="cloudy"] .sun,
.weather-card[data-state="fog"] .sun {
    opacity: 0.25;
}

.weather-card[data-state="cloudy"] .cloud,
.weather-card[data-state="fog"] .cloud {
    opacity: 0.95;
}

.weather-card[data-state="rain"] .rain {
    opacity: 1;
}

.weather-card[data-state="snow"] .snow {
    opacity: 1;
}

.weather-card[data-state="storm"] {
    background: linear-gradient(170deg, rgba(28, 40, 90, 0.95), rgba(15, 24, 44, 0.9));
}

.weather-card[data-state="storm"] .sun {
    opacity: 0.2;
}

.weather-card[data-state="storm"] .rain {
    opacity: 1;
    animation-duration: 0.8s;
}

.weather-card[data-state="fog"] .cloud {
    filter: blur(1px);
}

.weather-card[data-state="error"] {
    background: linear-gradient(160deg, rgba(72, 85, 99, 0.95), rgba(45, 55, 72, 0.9));
}

@keyframes weatherGlow {
    from {
        transform: translate3d(-10px, 0, 0) scale(1);
        opacity: 0.6;
    }
    to {
        transform: translate3d(10px, -10px, 0) scale(1.1);
        opacity: 0.9;
    }
}

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

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

@keyframes cloudDrift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

@keyframes rainDrop {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

@keyframes snowDrift {
    0% { transform: translate(0, 0); opacity: 0.8; }
    50% { transform: translate(-4px, 8px); opacity: 1; }
    100% { transform: translate(-8px, 16px); opacity: 0.4; }
}

.widget-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.announcement-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.announcement-list li {
    border-left: 3px solid var(--brand);
    padding-left: 0.75rem;
}

.service-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
}

.service-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-toolbar .toolbar-right {
    margin-left: auto;
}

.service-toolbar input {
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    min-width: 240px;
    background: var(--surface-control);
    color: var(--fg);
}

.view-toggle {
    display: inline-flex;
    background: var(--surface-control);
    border-radius: 999px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.view-toggle button {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: var(--muted);
}

.view-toggle button.active {
    background: var(--brand);
    color: var(--text-on-brand);
}

.services {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.services.list-view {
    display: flex;
    flex-direction: column;
}

.service-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card[data-featured="true"] {
    border-color: var(--brand);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(31, 39, 51, 0.12);
}

.services.list-view .service-card {
    flex-direction: row;
}

.service-visual {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--surface-tile);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    font-size: 2rem;
}

.service-visual img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

.service-visual.emoji {
    font-size: 2.1rem;
    line-height: 1;
}

.service-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-content header h3 {
    margin: 0;
}

.service-content header a {
    text-decoration: none;
    color: inherit;
}

.service-url {
    font-size: 0.85rem;
    color: var(--muted);
}

.service-description {
    margin: 0;
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-list li {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
}

.service-meta {
    display: flex;
    gap: 1.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.service-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: var(--brand);
    color: var(--text-on-brand);
    text-decoration: none;
    cursor: pointer;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: saturate(0.6);
}

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

.empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.service-detail {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.service-detail .service-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: var(--surface-icon);
    padding: 0.5rem;
}

.service-detail .service-icon-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    line-height: 1;
}

.service-denied {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.denied-hero {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.denied-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--surface-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.denied-icon img {
    max-width: 64px;
    max-height: 64px;
}

.denied-summary h1 {
    margin: 0 0 0.25rem;
}

.denied-details {
    background: var(--surface-soft);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.denied-form {
    margin-top: 1rem;
}

.screenshots .screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.screenshot-grid figure {
    margin: 0;
    background: var(--surface-alt);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface-soft);
    padding: 1rem;
    border-radius: 12px;
}

.review-form fieldset {
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-form legend {
    font-weight: 600;
    padding: 0;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
}

.rating-input input {
    display: none;
}

.rating-input span {
    background: var(--surface-control);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.rating-input label input:checked + span,
.rating-input span:hover {
    background: var(--brand);
    color: var(--text-on-brand);
}

.review-form textarea {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.75rem;
    resize: vertical;
}

.review-form button {
    align-self: flex-start;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    background: var(--brand);
    color: var(--text-on-brand);
    cursor: pointer;
}

.review-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-list li {
    background: var(--surface-soft);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.unauthorized .card {
    background: var(--warning-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--warning-border);
    box-shadow: var(--shadow);
}

.unauthorized .weather {
    margin-top: 1rem;
    background: var(--card);
    padding: 1rem;
    border-radius: 12px;
}

.admin-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-header-copy h1 {
    margin-bottom: 0.25rem;
}

.admin-header-copy p {
    margin: 0;
    color: var(--muted);
}

.admin-header .btn {
    text-decoration: none;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-nav .btn.active {
    background: var(--brand);
    color: var(--text-on-brand);
}

.admin-section {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.admin-kpi {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
}

.admin-kpi-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.admin-kpi-value {
    margin: 0.25rem 0;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
}

.admin-kpi-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-link-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    background: var(--surface-soft);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-link-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-link-card:hover,
.admin-link-card:focus {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.admin-mini-queues {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-mini-queues article {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--surface-soft);
}

.admin-mini-queues h3 {
    margin-top: 0;
}

.group-list.compact {
    gap: 0.6rem;
}

.group-list.compact li {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    background: var(--surface-control);
}

.group-list.compact p {
    margin: 0.35rem 0 0;
}

.label-studio {
    display: grid;
    grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.label-library {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--surface-soft);
    max-height: 920px;
    overflow: auto;
}

.label-library-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.label-library-head h3 {
    margin: 0;
}

.label-library-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-library-select {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: inherit;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    cursor: pointer;
}

.label-library-select.active {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.label-editor-shell {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--surface-soft);
    min-width: 0;
}

.label-editor-form {
    gap: 1rem;
}

.label-meta-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 0.85rem;
}

.label-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.label-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1rem;
    align-items: start;
    min-width: 0;
}

.label-stage-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
}

.label-stage-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.label-stage-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.label-kind-btn {
    text-transform: none;
}

.label-canvas-shell {
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: repeating-linear-gradient(
        45deg,
        rgba(148, 163, 184, 0.08),
        rgba(148, 163, 184, 0.08) 10px,
        transparent 10px,
        transparent 20px
    );
}

.label-canvas-scroll {
    overflow: auto;
    padding: 0.8rem;
    min-width: 0;
}

.label-canvas-wrap {
    min-width: 240px;
    max-width: 920px;
    margin: 0 auto;
}

.label-canvas {
    width: min(100%, 920px);
    aspect-ratio: 40 / 20;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
    touch-action: none;
}

.label-canvas::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 8% 8%;
    pointer-events: none;
}

.label-canvas::after {
    content: attr(data-size);
    position: absolute;
    right: 0.45rem;
    bottom: 0.35rem;
    font-size: 0.7rem;
    color: rgba(15, 23, 42, 0.55);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 0.15rem 0.35rem;
    pointer-events: none;
}

.label-canvas-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.label-canvas-item {
    position: absolute;
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
    color: #0f172a;
    line-height: 1.15;
    padding: 0.14rem 0.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    cursor: grab;
}

.label-canvas.is-dragging .label-canvas-item.is-selected {
    cursor: grabbing;
}

.label-canvas-item.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.18);
}

.label-canvas-item-text {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.label-canvas-item-text.is-wrapped {
    white-space: normal;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.label-canvas-item.kind-qrCode {
    border-style: dashed;
    background: rgba(15, 23, 42, 0.1);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 0.08rem;
    align-items: stretch;
    justify-content: stretch;
}

.label-canvas-qr {
    width: 100%;
    height: 100%;
    display: block;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    padding: 0.08rem;
    pointer-events: none;
}

.label-canvas-qr canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

.label-canvas-item.kind-image,
.label-canvas-item.kind-logo {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.5);
    align-items: stretch;
    justify-content: stretch;
    padding: 0.08rem;
}

.label-canvas-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
    background: #ffffff;
}

.label-canvas-icon-svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

.label-canvas-item.kind-icon,
.label-canvas-item.kind-emoji {
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.45);
}

.label-canvas-handle {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: var(--brand);
    position: absolute;
    right: -6px;
    bottom: -6px;
    cursor: nwse-resize;
}

.label-inspector-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.label-inspector-card h3,
.label-inspector-card h4 {
    margin: 0;
}

.label-layer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 220px;
    overflow: auto;
}

.label-layer-button {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-control);
    color: inherit;
    text-align: left;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
}

.label-layer-button.active {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.label-inspector-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.label-inspector-grid .span-two {
    grid-column: 1 / -1;
}

.label-inspector-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.label-inspector-grid .align-end {
    align-self: end;
    min-height: 40px;
    justify-content: flex-end;
}

.label-icon-library {
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.label-icon-library h4 {
    margin: 0;
}

.label-icon-grid {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 0.45rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    gap: 0.38rem;
    max-height: 220px;
    overflow: auto;
}

.label-icon-button {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    color: #0f172a;
    border-radius: 7px;
    min-height: 36px;
    padding: 0.1rem;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.label-icon-preview {
    width: 18px;
    height: 18px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    pointer-events: none;
}

.label-icon-button:hover,
.label-icon-button:focus {
    border-color: var(--brand);
    background: rgba(47, 111, 237, 0.08);
}

.label-icon-button.active {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.2);
    background: rgba(47, 111, 237, 0.12);
}

.label-icon-empty {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.45rem 0.25rem;
}

.label-media-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.label-media-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.label-media-head h3 {
    margin: 0;
}

.label-media-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.label-media-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.7rem;
}

.label-media-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 0.5rem;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.label-media-item.is-used {
    border-color: rgba(16, 185, 129, 0.45);
}

.label-media-select {
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    border-radius: 8px;
    width: 72px;
    height: 72px;
    display: block;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.label-media-select img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: repeating-linear-gradient(
        45deg,
        rgba(15, 23, 42, 0.04),
        rgba(15, 23, 42, 0.04) 6px,
        rgba(255, 255, 255, 0.95) 6px,
        rgba(255, 255, 255, 0.95) 12px
    );
}

.label-media-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.label-media-meta span {
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-media-meta small {
    color: var(--muted);
    font-size: 0.76rem;
}

.label-sample-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    padding: 0.75rem 0.85rem;
}

.label-sample-card summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--fg);
}

.label-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.8rem;
}

.label-syncro-lookup {
    margin-top: 0.75rem;
    margin-bottom: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--surface-soft);
    display: grid;
    gap: 0.65rem;
}

.label-syncro-customer-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.label-syncro-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.label-syncro-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    box-shadow: var(--shadow);
    z-index: 30;
}

.label-syncro-option {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    padding: 0.55rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    cursor: pointer;
}

.label-syncro-option small {
    color: var(--muted);
    font-size: 0.78rem;
}

.label-syncro-option:hover,
.label-syncro-option:focus {
    background: var(--surface-control);
}

.service-wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 41, 0.64);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 200;
}

.service-wizard-overlay[hidden] {
    display: none !important;
}

.service-wizard-card {
    position: relative;
    max-width: 840px;
    width: 100%;
    background: var(--card);
    border-radius: 24px;
    box-shadow: 0 36px 80px rgba(15, 23, 41, 0.28);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wizard-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
}

.wizard-subtitle {
    margin: 0;
    color: var(--muted);
}

.wizard-progress {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.wizard-progress-item {
    flex: 1;
    min-width: 140px;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.wizard-progress-item.active {
    background: var(--brand);
    color: var(--text-on-brand);
    border-color: transparent;
}

.wizard-progress-item.completed {
    border-color: var(--brand);
    color: var(--brand);
}

.service-wizard-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.wizard-step {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.wizard-step.active {
    display: flex;
}

.wizard-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.wizard-status {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    color: var(--muted);
}

.icon-designer {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 1.25rem;
    align-items: center;
}

.icon-preview {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: var(--surface-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--fg);
    border: 1px solid var(--border);
}

.icon-preview img {
    max-width: 90px;
    max-height: 90px;
    border-radius: 18px;
    object-fit: contain;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.icon-preview-fallback {
    font-size: 1rem;
    color: var(--muted);
}

.icon-preview-emoji {
    font-size: 3rem;
    line-height: 1;
}

.icon-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.emoji-palette {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--muted);
}

.emoji-option {
    border: none;
    background: var(--surface-control);
    border-radius: 12px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    font-size: 1.2rem;
}

.emoji-option:hover,
.emoji-option:focus {
    background: var(--brand-soft);
}

.access-requests {
    display: grid;
    gap: 1.25rem;
}

.access-request {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    background: var(--surface-soft);
    box-shadow: var(--shadow);
}

.access-request header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.access-request .status {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
}

.access-request .request-user code {
    font-size: 0.9rem;
    background: rgba(15, 23, 41, 0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.access-request-form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.access-actions {
    display: flex;
    gap: 0.75rem;
}

.admin-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox input {
    width: auto;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-control);
}

.admin-form button,
.inline-form button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: var(--brand);
    color: var(--text-on-brand);
    cursor: pointer;
    align-self: flex-start;
}

.inline-form {
    margin-top: 0.75rem;
}

.admin-form .danger,
.inline-form .danger {
    background: var(--danger);
}

.admin-form .hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.notification-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.notification-settings-form {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.notification-settings-form:first-child {
    padding-top: 0;
    border-top: 0;
}

.notification-settings-form h3 {
    margin: 0;
}

.notification-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.notification-webhook-box {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.notification-webhook-box input,
.webhook-copy-row input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
}

.webhook-copy-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.webhook-copy-row input {
    min-width: 0;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-control);
}

.channel-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-content: flex-start;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    min-width: 0;
}

.channel-fieldset legend {
    padding: 0 0.35rem;
    font-weight: 700;
}

.channel-fieldset .hint {
    flex-basis: 100%;
}

.channel-fieldset .form-grid {
    flex-basis: 100%;
    width: 100%;
}

.webhook-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.identity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.identity-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.identity-form select {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-control);
}

.table-scroll {
    overflow-x: auto;
}

.identity-table {
    width: 100%;
    table-layout: fixed;
}

.identity-table th,
.identity-table td {
    word-break: break-word;
    vertical-align: top;
}

.identity-table code {
    word-break: break-all;
}

.service-admin-card summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface-admin-summary);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.service-admin-card .meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.group-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.group-list .badge {
    background: var(--brand-badge);
    color: var(--brand);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.badge {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
}

.pinning-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pinning-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.pinning-row-fixed {
    grid-template-columns: 1fr auto;
}

.pinning-row input[disabled] {
    opacity: 0.7;
}

.group-rules table,
.audit-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.group-rules th,
.group-rules td,
.audit-table th,
.audit-table td {
    border: 1px solid var(--border);
    padding: 0.65rem;
    text-align: left;
}

.audit-table code {
    white-space: pre-wrap;
    word-break: break-word;
}

.table-action-cell {
    width: 1%;
    white-space: nowrap;
}

.compact-btn {
    padding: 0.42rem 0.65rem;
    font-size: 0.86rem;
}

.notification-detail-dialog {
    width: min(980px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    background: transparent;
}

.notification-detail-dialog::backdrop {
    background: rgba(15, 23, 42, 0.62);
}

.notification-detail-panel {
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    padding: 1.35rem;
}

.notification-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.notification-detail-header h3 {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
    line-height: 1.2;
}

.notification-detail-eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.notification-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.notification-detail-grid div {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.notification-detail-grid dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.notification-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.notification-detail-block {
    margin-top: 1rem;
}

.notification-detail-block h4 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}

.notification-detail-block p {
    margin: 0;
    overflow-wrap: anywhere;
}

.notification-detail-pre {
    max-height: 360px;
    overflow: auto;
    margin: 0;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-control);
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.announcement-admin-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.announcement-admin-list li {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    background: var(--surface-announcement);
}

.admin .app-main {
    max-width: 1280px;
}

.snapit {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.snapit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.snapit-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.snapit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.snapit-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.snapit-fields-stack {
    grid-template-columns: 1fr;
}

.snapit-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.snapit-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--snapit-outline);
    background: rgba(255, 255, 255, 0.75);
    min-height: 140px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.snapit-category-card input {
    position: absolute;
    opacity: 0;
    inset: 0;
    pointer-events: auto;
}

.snapit-category-card.is-selected {
    border-color: rgba(14, 165, 164, 0.6);
    box-shadow: 0 18px 40px var(--snapit-glow);
    transform: translateY(-2px);
}

.snapit-category-card:focus-within {
    border-color: rgba(14, 165, 164, 0.8);
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.2);
}

.snapit-category-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 164, 0.15);
    color: var(--snapit-accent-strong);
}

.snapit-category-icon svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.snapit-category-text {
    font-weight: 600;
    font-size: 1rem;
}

.snapit-category-sub {
    color: var(--muted);
    font-size: 0.85rem;
}

.snapit-customer-field[hidden] {
    display: none;
}

.snapit-customer-field {
    position: relative;
}

.snapit-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.snapit-field input,
.snapit-field select {
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--fg);
}

.snapit-field-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.snapit-customer-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-height: 240px;
    overflow: auto;
    z-index: 20;
}

.snapit-customer-summary {
    background: var(--surface-control);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
}

.snapit-customer-meta strong {
    color: var(--muted);
    font-weight: 600;
    margin-right: 0.35rem;
}

.snapit-customer-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    color: var(--fg);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.snapit-customer-option small {
    color: var(--muted);
    font-size: 0.78rem;
}

.snapit-customer-option:hover,
.snapit-customer-option:focus {
    background: var(--surface-control);
}

.snapit-upload {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snapit-upload-card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapit-upload-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.snapit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.snapit-support {
    font-size: 0.85rem;
    color: var(--muted);
}

.snapit-photo-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapit-photo-card {
    background: var(--card);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snapit-photo-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.snapit-remove {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.snapit-photo-body {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 1.5rem;
}

.snapit-preview img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 16px 28px rgba(31, 39, 51, 0.08);
}

.snapit-photo-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.snapit-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.snapit-inline-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.snapit-scan-status,
.snapit-ocr-status {
    font-size: 0.85rem;
    color: var(--muted);
}

.snapit-code-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.snapit-code-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.snapit-code-list li span {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--brand-badge);
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.snapit-code-list li strong {
    font-size: 0.85rem;
}

.snapit-code-status {
    margin-left: auto;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.18);
    color: #15803d;
}

.snapit-code-status.needs-verify {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}

.snapit-code-list li button {
    margin-left: 0.35rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.snapit-code-empty {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.snapit-code-entry {
    display: grid;
    grid-template-columns: 1fr 140px auto;
    gap: 0.5rem;
    align-items: center;
}

.snapit-code-entry input,
.snapit-code-entry select,
.snapit-photo-details textarea {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--fg);
}

.snapit-photo-details textarea {
    resize: vertical;
    min-height: 90px;
}

.snapit-submit {
    display: flex;
    justify-content: flex-end;
}

.snapit-submissions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.snapit-submission {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snapit-submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.snapit-submission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.snapit-review-note {
    background: var(--surface-soft);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.snapit-badge {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.snapit-badge.status-pending {
    background: var(--brand-badge);
    color: var(--brand);
}

.snapit-badge.status-accepted {
    background: rgba(46, 204, 113, 0.18);
    color: #1b7a4b;
}

.snapit-badge.status-rejected {
    background: rgba(195, 47, 39, 0.16);
    color: var(--danger);
}

.snapit-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.snapit-photo-tile {
    background: var(--surface-alt);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.snapit-photo-tile img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    background: rgba(15, 23, 42, 0.05);
}

.snapit-photo-button {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: zoom-in;
}

.snapit-photo-button img {
    display: block;
}

.snapit-image-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(1.5rem + env(safe-area-inset-top)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
    z-index: 260;
}

.snapit-image-modal[hidden] {
    display: none;
}

.snapit-image-card {
    width: min(960px, 95vw);
    max-height: 90vh;
    background: var(--snapit-card);
    border-radius: 24px;
    border: 1px solid var(--snapit-outline);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapit-image-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.snapit-image-header h3 {
    margin: 0;
}

.snapit-image-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.snapit-image-canvas {
    flex: 1;
    overflow: auto;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    border: 1px solid var(--snapit-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: grab;
    touch-action: none;
    overscroll-behavior: contain;
}

.snapit-image-canvas.is-zoomed {
    align-items: flex-start;
    justify-content: flex-start;
}

.snapit-image-canvas.is-panning {
    cursor: grabbing;
}

.snapit-image-canvas img {
    max-width: none;
    height: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.snapit-photo-info {
    padding: 0 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.snapit-photo-info h3 {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
}

.snapit-photo-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.snapit-photo-info li span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 0.4rem;
    color: var(--muted);
}

.snapit-photo-info textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.6rem 0.75rem;
    background: var(--surface-control);
    color: var(--fg);
    resize: vertical;
}

.snapit-review {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.snapit-review input {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--fg);
}

.snapit-review-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.snapit-live-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 250;
}

.snapit-live-modal[hidden] {
    display: none;
}

.snapit-live-card {
    width: min(520px, 92vw);
    background: var(--snapit-card);
    border-radius: 24px;
    border: 1px solid var(--snapit-outline);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapit-live-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.snapit-live-header h3 {
    margin: 0;
}

.snapit-live-video {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    border: 1px solid var(--snapit-outline);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snapit-live-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.snapit-live-actions {
    display: flex;
    justify-content: flex-end;
}

.snapit-filter {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.snapit-filter label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.snapit-filter input,
.snapit-filter select {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--fg);
}

.snapit-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.snapit-card p {
    margin: 0;
    color: var(--muted);
}

.snapit-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

body.snapit-page {
    --snapit-accent: #0ea5a4;
    --snapit-accent-strong: #0f766e;
    --snapit-warm: #f59e0b;
    --snapit-ink: #0f172a;
    --snapit-card: rgba(255, 255, 255, 0.94);
    --snapit-outline: rgba(15, 23, 42, 0.12);
    --snapit-glow: rgba(14, 165, 164, 0.18);
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 164, 0.16), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.2), transparent 40%),
        var(--bg);
}

body.snapit-page .app-main {
    padding-top: calc(2.5rem + env(safe-area-inset-top));
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom));
    max-width: 1280px;
}

.snapit-shell {
    gap: 2rem;
}

.snapit-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 2.25rem;
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.18), rgba(47, 111, 237, 0.16));
    border: 1px solid var(--snapit-outline);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}

.snapit-hero::before,
.snapit-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(0);
    opacity: 0.9;
}

.snapit-hero::before {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle at center, rgba(14, 165, 164, 0.4), transparent 65%);
    top: -120px;
    right: -60px;
}

.snapit-hero::after {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.35), transparent 70%);
    bottom: -120px;
    left: -60px;
}

.snapit-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.snapit-kicker {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--snapit-accent-strong);
    font-weight: 600;
}

.snapit-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--snapit-ink);
}

.snapit-lede {
    margin: 0;
    max-width: 640px;
    color: var(--muted);
    font-size: 1rem;
}

.snapit-hero-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.snapit-hero-tags span {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(14, 165, 164, 0.15);
    color: var(--snapit-accent-strong);
    border: 1px solid rgba(14, 165, 164, 0.25);
}

.snapit-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: center;
}

.snapit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.75rem;
    align-items: start;
}

.snapit-panel {
    background: var(--snapit-card);
    border: 1px solid var(--snapit-outline);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.snapit-panel--tight {
    padding: 1.25rem;
}

.snapit-header {
    background: var(--snapit-card);
    border: 1px solid var(--snapit-outline);
    border-radius: 22px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.snapit-header p {
    margin: 0.5rem 0 0;
}

.snapit-form {
    gap: 1.75rem;
}

.snapit-field input,
.snapit-field select,
.snapit-review input,
.snapit-filter input,
.snapit-filter select,
.snapit-code-entry input,
.snapit-code-entry select,
.snapit-photo-details textarea {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.snapit-field input:focus,
.snapit-field select:focus,
.snapit-review input:focus,
.snapit-filter input:focus,
.snapit-filter select:focus,
.snapit-code-entry input:focus,
.snapit-code-entry select:focus,
.snapit-photo-details textarea:focus {
    outline: none;
    border-color: rgba(14, 165, 164, 0.6);
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.15);
}

.snapit-upload-card {
    gap: 1.25rem;
}

.snapit-photo-card {
    border-left: 4px solid rgba(14, 165, 164, 0.5);
}

.snapit-preview img {
    border-radius: 18px;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.snapit-code-list li {
    background: rgba(14, 165, 164, 0.08);
    border: 1px solid rgba(14, 165, 164, 0.2);
}

.snapit-code-list li span {
    background: rgba(14, 165, 164, 0.2);
    color: var(--snapit-accent-strong);
}

.snapit-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 110px;
}

.snapit-aside-card {
    background: var(--snapit-card);
    border: 1px solid var(--snapit-outline);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.snapit-aside-card h3 {
    margin-top: 0;
}

.snapit-aside-card ul,
.snapit-aside-card ol {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
}

.snapit-aside-highlight {
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.16), rgba(245, 158, 11, 0.18));
    border-color: rgba(14, 165, 164, 0.25);
}

.snapit-submission {
    border: 1px solid var(--snapit-outline);
}

.snapit-submission-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.snapit-photo-tile {
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.snapit-filter {
    padding: 1rem 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--snapit-outline);
    background: var(--snapit-card);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.snapit-badge.status-pending {
    background: rgba(14, 165, 164, 0.18);
    color: var(--snapit-accent-strong);
}

.snapit-badge.status-accepted {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.snapit-badge.status-rejected {
    background: rgba(239, 68, 68, 0.16);
    color: #b91c1c;
}

.snapit-card {
    background: linear-gradient(135deg, rgba(14, 165, 164, 0.12), rgba(47, 111, 237, 0.12));
    border-radius: 18px;
    padding: 1.25rem;
    border: 1px solid rgba(14, 165, 164, 0.2);
}

.snapit-card h2 {
    margin: 0;
}

.snapit-card p {
    color: var(--muted);
}

.reports-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(47, 111, 237, 0.14));
    border-color: rgba(245, 158, 11, 0.25);
}

.snapit-page .btn {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.snapit-page .btn.secondary {
    background: rgba(14, 165, 164, 0.16);
    color: var(--snapit-accent-strong);
}

.person-verify {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    isolation: isolate;
}

.person-verify::before {
    content: "";
    position: absolute;
    inset: 120px -80px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 111, 237, 0.18), transparent 70%);
    z-index: -1;
}

.person-verify-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(47, 111, 237, 0.16), rgba(28, 76, 200, 0.12));
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.person-verify-hero::before,
.person-verify-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(47, 111, 237, 0.25), transparent 70%);
    opacity: 0.6;
}

.person-verify-hero::before {
    top: -90px;
    left: -60px;
}

.person-verify-hero::after {
    bottom: -110px;
    right: -70px;
}

.person-verify-hero > * {
    position: relative;
    z-index: 1;
}

.person-verify-kicker {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.7rem;
    color: var(--brand);
    margin: 0 0 0.5rem;
}

.person-verify-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.person-verify-card h2 {
    margin-top: 0;
}

.person-verify-form {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.person-verify-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.person-verify-field input {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-control);
    color: var(--fg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.person-verify-field small {
    font-size: 0.8rem;
}

.person-verify-field input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.person-verify-alert {
    border: 1px solid var(--warning-border);
    background: var(--warning-surface);
}

.person-verify-retry {
    margin-top: 1rem;
}

.person-verify-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.person-verify-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.person-verify-list li {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 0.5rem;
    align-items: baseline;
}

.person-verify-match {
    background: var(--surface-soft);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.person-verify-match h3 {
    margin: 0 0 0.75rem;
}

.person-verify-match + .person-verify-match {
    margin-top: 1rem;
}

.person-verify-phones {
    list-style: none;
    padding: 0.5rem 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.person-verify-details {
    margin-top: 1rem;
}

.person-verify-details summary {
    cursor: pointer;
    color: var(--brand);
}

.person-verify-subsection {
    margin-top: 1.25rem;
}

.person-verify-subsection h3 {
    margin: 0 0 0.65rem;
    font-size: 1rem;
}

.person-verify-relatives {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.person-verify-relatives li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.person-verify-relative-btn {
    background: none;
    border: none;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

.person-verify-relative-btn:hover {
    text-decoration: underline;
}

.person-verify-relative-name {
    font-weight: 600;
}

.person-verify-relative-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.person-verify-relative-card {
    display: grid;
    gap: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--card);
}

.person-verify-relative-card .relative-row {
    display: grid;
    grid-template-columns: minmax(120px, 160px) 1fr;
    gap: 0.5rem;
}

.person-verify-relative-relatives {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--surface-soft);
}

.person-verify-relative-relatives .relative-relatives-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.person-verify-relative-relatives ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.person-verify-relative-relatives li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.person-verify-json {
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    font-size: 0.85rem;
    white-space: pre-wrap;
    overflow-x: auto;
}

@media (prefers-color-scheme: dark) {
    body.snapit-page {
        --snapit-card: rgba(15, 23, 41, 0.9);
        --snapit-outline: rgba(148, 163, 184, 0.2);
        background:
            radial-gradient(circle at 20% 0%, rgba(14, 165, 164, 0.18), transparent 45%),
            radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.22), transparent 40%),
            var(--bg);
    }

    .snapit-hero h1 {
        color: var(--fg);
    }

    .snapit-field input,
    .snapit-field select,
    .snapit-review input,
    .snapit-filter input,
    .snapit-filter select,
    .snapit-code-entry input,
    .snapit-code-entry select,
    .snapit-photo-details textarea {
        background: rgba(15, 23, 41, 0.8);
        border-color: rgba(148, 163, 184, 0.2);
    }

    .snapit-photo-tile {
        background: rgba(15, 23, 41, 0.7);
    }

    .snapit-category-card {
        background: rgba(15, 23, 41, 0.85);
        border-color: rgba(148, 163, 184, 0.25);
    }
}

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

    .snapit-aside {
        position: static;
    }

    .snapit-hero {
        padding: 2rem 1.5rem;
    }

    .snapit-hero-actions {
        align-items: flex-start;
    }

    .label-workbench {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .person-verify-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .person-verify-form {
        align-items: stretch;
    }

    .snapit-photo-body {
        grid-template-columns: 1fr;
    }

    .snapit-code-entry {
        grid-template-columns: 1fr;
    }

    .label-studio {
        grid-template-columns: 1fr;
    }

    .label-library {
        max-height: none;
    }
}

@media (max-width: 760px) {
    .label-stage-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .label-stage-toolbar-group {
        justify-content: flex-start;
    }

    .label-inspector-grid {
        grid-template-columns: 1fr;
    }

    .label-icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
        max-height: 180px;
    }

    .label-sample-grid {
        grid-template-columns: 1fr;
    }

    .label-media-list {
        grid-template-columns: 1fr;
    }

    .label-media-item {
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-areas:
            "preview meta"
            "delete delete";
    }

    .label-media-item .label-media-select {
        grid-area: preview;
        width: 64px;
        height: 64px;
    }

    .label-media-item .label-media-meta {
        grid-area: meta;
    }

    .label-media-item .btn {
        grid-area: delete;
        justify-self: start;
    }

    .label-canvas-scroll {
        padding: 0.55rem;
    }

    .label-syncro-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .app-main {
        padding: 1.5rem 1rem;
    }

    .hero-search {
        padding: 2.5rem 1.5rem;
    }

    .hero-search-form {
        flex-direction: column;
    }

    .hero-search-form input,
    .hero-search-form button {
        width: 100%;
    }

    .hero-suggestions {
        width: 100%;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .global-search {
        order: 3;
        width: 100%;
    }

    .global-search input {
        flex: 1;
    }

    .user-label {
        max-width: 120px;
    }

    .service-card {
        flex-direction: column;
    }

    .service-visual {
        align-self: flex-start;
    }

    .service-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .global-search input {
        min-width: 160px;
    }

    .service-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .service-toolbar .toolbar-left {
        justify-content: center;
    }

    .service-toolbar .toolbar-right {
        width: 100%;
        margin-left: 0;
    }

    .service-toolbar input {
        width: 100%;
    }

    .service-wizard-overlay {
        padding: 1.5rem;
    }

    .service-wizard-card {
        max-height: 90vh;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .webhook-copy-row {
        grid-template-columns: 1fr;
    }

    .icon-designer {
        grid-template-columns: 1fr;
    }

    .icon-preview {
        width: 96px;
        height: 96px;
        margin: 0 auto;
    }

    .denied-hero {
        flex-direction: column;
        text-align: center;
    }

    .denied-summary h1 {
        font-size: 1.75rem;
    }
}
