:root {
    --fc-primary: #379f3c;
    --fc-primary-hover: #2d8a31;
    --fc-primary-50: #f0fdf4;
    --fc-primary-100: #dcfce7;
    --fc-primary-200: #bbf7d0;
    --fc-primary-500: #22c55e;
    --fc-forest: #14532d;
    --fc-gray-50: #f9fafb;
    --fc-gray-100: #f3f4f6;
    --fc-gray-200: #e5e7eb;
    --fc-gray-300: #d1d5db;
    --fc-gray-400: #9ca3af;
    --fc-gray-500: #6b7280;
    --fc-gray-600: #4b5563;
    --fc-gray-700: #374151;
    --fc-gray-800: #1f2937;
    --fc-gray-900: #111827;
    --fc-amber-50: #fffbeb;
    --fc-amber-100: #fef3c7;
    --fc-amber-600: #d97706;
    --fc-amber-800: #92400e;
    --fc-red-50: #fef2f2;
    --fc-red-600: #dc2626;
    --fc-green-600: #16a34a;
    --fc-shadow-soft: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
    --fc-shadow-card: 0 1px 3px rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
    --fc-shadow-elevated: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --fc-radius-xl: 1rem;
    --fc-radius-2xl: 1.25rem;
    --fc-radius-3xl: 1.5rem;
    --fc-touch-min: 44px;
}

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

html, body {
    min-height: 100%;
}

body {
    background: var(--fc-gray-50);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--fc-gray-800);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, input {
    font-family: inherit;
}

a {
    color: var(--fc-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    border-radius: var(--fc-radius-xl);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    touch-action: manipulation;
    text-decoration: none;
    background: none;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--fc-primary-hover);
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background: #fff;
    color: var(--fc-gray-700);
    border-color: var(--fc-gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--fc-gray-50);
}

.btn-ghost {
    color: var(--fc-gray-600);
    background: transparent;
}

.btn-ghost:hover {
    background: var(--fc-gray-100);
    color: var(--fc-gray-900);
}

.btn-danger {
    color: #fff;
    background: var(--fc-red-600);
    border-color: var(--fc-red-600);
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.alert {
    border-radius: var(--fc-radius-xl);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-danger,
.alert-error {
    background: var(--fc-red-50);
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background: var(--fc-primary-50);
    border-color: var(--fc-primary-200);
    color: #166534;
}

.no-access {
    max-width: 28rem;
    margin: 4rem auto;
    background: #fff;
    border: 1px solid var(--fc-gray-200);
    border-radius: var(--fc-radius-3xl);
    box-shadow: var(--fc-shadow-card);
    padding: 2rem;
    text-align: center;
}

.no-access img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.no-access h1 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.no-access p {
    color: var(--fc-gray-500);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ----- DownDetector-style status page ----- */

.dd-body {
    background: #eef1f4;
    overflow-x: hidden;
}

.dd-top {
    background: #fff;
    border-bottom: 1px solid var(--fc-gray-200);
    position: sticky;
    top: 0;
    z-index: 20;
}

.dd-top-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dd-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--fc-gray-900);
}

.dd-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.dd-brand strong {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dd-brand em {
    display: block;
    font-style: normal;
    font-size: 0.7rem;
    color: var(--fc-gray-500);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dd-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: auto;
}

.dd-nav a {
    color: var(--fc-gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 0.75rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.dd-nav a:hover {
    background: var(--fc-gray-100);
    color: var(--fc-gray-900);
}

.dd-nav a.active {
    background: var(--fc-primary-50);
    color: var(--fc-primary);
}

.dd-top-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dd-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fc-gray-600);
    background: var(--fc-gray-100);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
}

.dd-live .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fc-primary);
    box-shadow: 0 0 0 0 rgb(55 159 60 / 0.6);
    animation: live-pulse 1.8s ease-out infinite;
}

.dd-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.dd-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fc-primary-100);
    color: var(--fc-forest);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.dd-user-meta {
    display: none;
}

.dd-user-meta .name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.dd-user-meta .role {
    font-size: 0.7rem;
    color: var(--fc-gray-500);
    text-transform: capitalize;
}

.dd-logout {
    border: none;
    background: none;
    color: var(--fc-gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.45rem 0.7rem;
    border-radius: 0.75rem;
    min-height: 44px;
}

.dd-logout:hover {
    background: var(--fc-gray-100);
    color: var(--fc-gray-900);
}

.dd-hero {
    color: #fff;
    background: var(--fc-primary);
    transition: background 200ms ease;
}

.dd-hero.is-ok {
    background: linear-gradient(180deg, #3aa940 0%, #2f8b34 100%);
}

.dd-hero.is-degraded {
    background: linear-gradient(180deg, #e0a00e 0%, #c4840a 100%);
}

.dd-hero.is-down {
    background: linear-gradient(180deg, #e11d2e 0%, #be123c 100%);
}

.dd-hero.is-checking {
    background: linear-gradient(180deg, #6b7280 0%, #4b5563 100%);
}

.dd-hero-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.25rem 1.25rem 2.4rem;
}

.dd-hero-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 0.4rem;
}

.dd-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin: 0;
    color: #fff;
}

.dd-hero p {
    margin-top: 0.55rem;
    font-size: 1.05rem;
    max-width: 40rem;
    color: rgb(255 255 255 / 0.9);
}

.dd-hero-meta {
    margin-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.1rem;
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 0.8);
}

.dd-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 2.5rem;
}

.dd-chart-card,
.dd-list,
.dd-feed {
    background: #fff;
    border: 1px solid var(--fc-gray-200);
    border-radius: var(--fc-radius-2xl);
    box-shadow: var(--fc-shadow-card);
}

.dd-chart-card {
    padding: 1.1rem 1.2rem 0.85rem;
    margin-bottom: 1.1rem;
}

.dd-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.dd-card-head h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fc-gray-900);
}

.dd-card-head p,
.dd-muted {
    font-size: 0.8rem;
    color: var(--fc-gray-500);
}

.dd-chart-plot {
    position: relative;
    touch-action: pan-y;
}

.dd-chart-svg {
    width: 100%;
    height: 220px;
    display: block;
    cursor: crosshair;
}

.dd-chart-svg .area {
    fill: rgb(55 159 60 / 0.22);
}

.dd-chart-svg .line {
    fill: none;
    stroke: var(--fc-primary);
    stroke-width: 2;
}

.dd-chart-card.is-hot .area {
    fill: rgb(220 38 38 / 0.18);
}

.dd-chart-card.is-hot .line {
    stroke: var(--fc-red-600);
}

.dd-chart-card.is-warn .area {
    fill: rgb(217 119 6 / 0.2);
}

.dd-chart-card.is-warn .line {
    stroke: var(--fc-amber-600);
}

.dd-chart-svg .hover-line {
    stroke: var(--fc-gray-500);
    stroke-width: 1.25;
    stroke-dasharray: 3 3;
}

.dd-chart-svg .hover-dot {
    fill: #fff;
    stroke-width: 2;
}

.dd-chart-svg .hover-dot:not([data-series]) {
    stroke: var(--fc-primary);
}

.dd-chart-card.is-hot .hover-dot {
    stroke: var(--fc-red-600);
}

.dd-chart-card.is-warn .hover-dot {
    stroke: var(--fc-amber-600);
}

.dd-chart-tip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    background: var(--fc-gray-900);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
    white-space: nowrap;
    transform: translate(-50%, calc(-100% - 10px));
}

.dd-chart-tip:has(.dd-tip-row) {
    white-space: normal;
    min-width: 11.5rem;
    transform: translate(-50%, 8px);
}

.dd-chart-tip small {
    display: block;
    font-weight: 500;
    color: var(--fc-gray-300);
    margin-top: 0.1rem;
}

.dd-tip-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: rgb(255 255 255 / 0.88);
    margin-top: 0.28rem;
}

.dd-tip-row em {
    margin-left: auto;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #fff;
}

.dd-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    padding: 0.1rem 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fc-gray-600);
}

.dd-chart-legend[hidden] {
    display: none;
}

.dd-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dd-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fc-gray-400);
    flex-shrink: 0;
}

.dd-legend-swatch[data-line="ecommerce"],
.dd-legend-swatch[data-i="0"] { background: #379f3c; }
.dd-legend-swatch[data-line="hr"],
.dd-legend-swatch[data-i="1"] { background: #0284c7; }
.dd-legend-swatch[data-line="bi"],
.dd-legend-swatch[data-i="2"] { background: #7c3aed; }
.dd-legend-swatch[data-i="3"] { background: #d97706; }
.dd-legend-swatch[data-i="4"] { background: #e11d48; }
.dd-legend-swatch[data-i="5"] { background: #0f766e; }

.dd-chart-svg .series-line {
    fill: none;
}

.dd-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--fc-gray-400);
    padding: 0.15rem 0.15rem 0.35rem;
    font-variant-numeric: tabular-nums;
}

.dd-latency {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.dd-latency.is-ok {
    color: var(--fc-green-600);
}

.dd-latency.is-warn {
    color: var(--fc-amber-600);
}

.dd-latency.is-down {
    color: var(--fc-red-600);
}

.dd-latency.is-muted {
    color: var(--fc-gray-400);
    font-weight: 600;
}

.dd-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 1.1rem;
    align-items: start;
}

.dd-list,
.dd-feed {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dd-feed {
    max-height: 36rem;
}

.dd-list-head,
.dd-feed-head {
    padding: 0.95rem 1.15rem 0.7rem;
    border-bottom: 1px solid var(--fc-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dd-list-head h2,
.dd-feed-head h2 {
    font-size: 0.95rem;
    font-weight: 600;
}

.dd-filters {
    display: inline-flex;
    background: var(--fc-gray-100);
    border-radius: 0.75rem;
    padding: 0.2rem;
}

.dd-filters button,
.dd-filters a {
    border: none;
    background: transparent;
    color: var(--fc-gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 0.6rem;
    cursor: pointer;
    min-height: 36px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.dd-filters button.active,
.dd-filters a.active {
    background: #fff;
    color: var(--fc-gray-900);
    box-shadow: var(--fc-shadow-soft);
}

.dd-service {
    border-bottom: 1px solid var(--fc-gray-100);
}

.dd-service:last-child {
    border-bottom: none;
}

.dd-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 140px 118px 28px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.95rem 1.15rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    background: #fff;
    border: 0;
    font: inherit;
    color: inherit;
    transition: background 160ms ease;
}

.dd-row:hover {
    background: var(--fc-gray-50);
}

.dd-service.is-open .dd-row {
    background: var(--fc-gray-50);
    box-shadow: inset 3px 0 0 var(--fc-primary);
}

.dd-service.is-down .dd-row {
    background: #fff7f7;
}

.dd-service.is-down .dd-row:hover,
.dd-service.is-down.is-open .dd-row {
    background: #fff1f1;
    box-shadow: inset 3px 0 0 var(--fc-red-600);
}

.dd-chevron {
    width: 18px;
    height: 18px;
    color: var(--fc-gray-400);
    display: grid;
    place-items: center;
    transition: transform 180ms ease, color 180ms ease;
}

.dd-chevron svg {
    width: 16px;
    height: 16px;
}

.dd-service.is-open .dd-chevron {
    transform: rotate(180deg);
    color: var(--fc-gray-700);
}

.dd-mark {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--fc-primary);
    flex-shrink: 0;
}

.dd-mark svg {
    width: 22px;
    height: 22px;
}

.dd-mark.icon-bag {
    background: #379f3c;
}

.dd-mark.icon-clock {
    background: #14532d;
}

.dd-mark.icon-chart {
    background: #0f7a4a;
}

.dd-mark.icon-globe {
    background: #0284c7;
}

.dd-mark.icon-server {
    background: #57534e;
}

.dd-service.is-down .dd-mark {
    background: var(--fc-red-600);
}

.dd-row-name {
    font-weight: 700;
    color: var(--fc-gray-900);
    font-size: 0.98rem;
}

.dd-row-sub {
    font-size: 0.78rem;
    color: var(--fc-gray-500);
}

.dd-spark {
    width: 140px;
    height: 44px;
    display: block;
}

.dd-status-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--fc-green-600);
    text-align: right;
}

.dd-service.is-down .dd-status-label {
    color: var(--fc-red-600);
}

.dd-row.is-checking .dd-status-label {
    color: var(--fc-amber-800);
}

.dd-detail {
    display: grid;
    grid-template-rows: 0fr;
    background: var(--fc-gray-50);
    transition: grid-template-rows 180ms ease;
}

.dd-service.is-open .dd-detail {
    grid-template-rows: 1fr;
}

.dd-detail-inner {
    min-height: 0;
    overflow: hidden;
    padding: 0 1.15rem 0;
}

.dd-service.is-open .dd-detail-inner {
    padding-bottom: 1.1rem;
}

.dd-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.dd-kv {
    background: #fff;
    border: 1px solid var(--fc-gray-200);
    border-radius: 0.9rem;
    padding: 0.65rem 0.75rem;
}

.dd-kv span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-gray-500);
    font-weight: 600;
}

.dd-kv strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fc-gray-800);
    word-break: break-all;
}

.dd-kv a {
    text-decoration: none;
}

.dd-kv-wide {
    grid-column: span 2;
}

.dd-perf {
    margin-top: 0.85rem;
    background: #fff;
    border: 1px solid var(--fc-gray-200);
    border-radius: 0.9rem;
    padding: 0.7rem 0.8rem 0.55rem;
}

.dd-perf-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--fc-gray-500);
}

.dd-perf-head span:first-child {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 10px;
}

.dd-perf-svg {
    height: 120px;
}

.dd-perf.is-warn .line {
    stroke: var(--fc-amber-600);
}

.dd-perf.is-warn .area {
    fill: rgb(217 119 6 / 0.18);
}

.dd-perf.is-warn .hover-dot {
    stroke: var(--fc-amber-600);
}

.dd-perf.is-hot .line {
    stroke: var(--fc-red-600);
}

.dd-perf.is-hot .area {
    fill: rgb(220 38 38 / 0.16);
}

.dd-perf.is-hot .hover-dot {
    stroke: var(--fc-red-600);
}

.dd-feed-list {
    list-style: none;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 12rem;
    overscroll-behavior: contain;
}

.dd-feed-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--fc-gray-100);
    background: #fff;
}

.dd-feed-pager[hidden] {
    display: none;
}

.dd-page-btn {
    border: 1px solid var(--fc-gray-200);
    background: #fff;
    color: var(--fc-gray-700);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 0.6rem;
    cursor: pointer;
    min-height: 36px;
}

.dd-page-btn:hover:not(:disabled) {
    background: var(--fc-gray-50);
}

.dd-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

#incidentPageLabel {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--fc-gray-500);
}

.dd-incident {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--fc-gray-100);
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.dd-incident:last-child {
    border-bottom: none;
}

.dd-incident .pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.35rem;
    background: var(--fc-gray-300);
}

.dd-incident.is-open .pip {
    background: var(--fc-red-600);
}

.dd-incident.is-resolved .pip {
    background: var(--fc-primary);
}

.dd-incident h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--fc-gray-900);
}

.dd-incident p {
    font-size: 0.78rem;
    color: var(--fc-gray-500);
    margin-top: 0.15rem;
}

.dd-empty {
    padding: 1.5rem 1.15rem;
    text-align: center;
    color: var(--fc-gray-500);
    font-size: 0.85rem;
}

.alerts-form {
    padding: 0 1.2rem 1.2rem;
}

.settings-form {
    padding: 0 1.2rem 1.2rem;
}

.privacy-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.privacy-search-action {
    display: flex;
    align-items: center;
    min-height: 40px;
}

.privacy-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.privacy-flow > div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.7rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    background: #fff;
    border: 1px solid var(--fc-gray-200);
    border-radius: var(--fc-radius-xl);
}

.privacy-flow span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: var(--fc-primary-50);
    color: var(--fc-primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.privacy-flow strong {
    color: var(--fc-gray-900);
    font-size: 0.82rem;
}

.privacy-flow small {
    color: var(--fc-gray-500);
    font-size: 0.72rem;
}

.privacy-subject-label {
    margin-top: 0.2rem;
    color: var(--fc-gray-500);
    font-size: 0.76rem;
}

.privacy-subject-label strong {
    color: var(--fc-gray-700);
}

.privacy-records-body {
    padding: 1rem 1.15rem 1.2rem;
}

.privacy-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.privacy-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: var(--fc-gray-50);
    border: 1px solid var(--fc-gray-100);
    border-radius: var(--fc-radius-xl);
}

.privacy-summary span {
    color: var(--fc-gray-500);
    font-size: 0.75rem;
    font-weight: 600;
}

.privacy-summary strong {
    color: var(--fc-gray-900);
    font-size: 1.05rem;
}

.privacy-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1rem 0;
}

.privacy-action-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--fc-gray-200);
    border-radius: var(--fc-radius-xl);
    background: #fff;
}

.privacy-action-card.is-danger {
    border-color: #fecaca;
    background: var(--fc-red-50);
}

.privacy-action-kicker {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--fc-gray-500);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.privacy-action-card.is-danger .privacy-action-kicker {
    color: var(--fc-red-600);
}

.privacy-action-card h3 {
    color: var(--fc-gray-900);
    font-size: 0.92rem;
}

.privacy-action-card p {
    margin-top: 0.3rem;
    color: var(--fc-gray-500);
    font-size: 0.78rem;
    line-height: 1.5;
}

.privacy-action-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.privacy-action-form small {
    margin-top: -0.35rem;
    color: var(--fc-gray-500);
    font-size: 0.7rem;
}

.privacy-action-form .btn {
    align-self: flex-start;
}

.privacy-hold-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid var(--fc-amber-100);
    border-radius: var(--fc-radius-xl);
    background: var(--fc-amber-50);
}

.privacy-hold-banner strong {
    color: var(--fc-gray-900);
    font-size: 0.85rem;
}

.privacy-hold-banner p {
    margin-top: 0.2rem;
    color: var(--fc-gray-600);
    font-size: 0.76rem;
}

.privacy-table-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fc-gray-100);
}

.privacy-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.privacy-section-head h3 {
    color: var(--fc-gray-900);
    font-size: 0.88rem;
}

.privacy-section-head span {
    color: var(--fc-gray-500);
    font-size: 0.72rem;
}

.privacy-empty {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    border: 1px dashed var(--fc-gray-300);
    border-radius: var(--fc-radius-xl);
}

.privacy-empty strong {
    color: var(--fc-gray-700);
    font-size: 0.84rem;
}

.privacy-empty p {
    margin-top: 0.25rem;
    color: var(--fc-gray-500);
    font-size: 0.75rem;
}

.privacy-retention-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.privacy-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--fc-primary-50);
    color: var(--fc-primary);
    font-size: 0.7rem;
    font-weight: 700;
}

.dd-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dd-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.dd-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    border: 0;
    padding: 0;
    min-width: 0;
}

.dd-field > span,
.dd-field legend {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fc-gray-500);
}

.dd-field legend {
    margin-bottom: 0.55rem;
    padding: 0;
}

.dd-field > span em {
    font-style: normal;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--fc-gray-400);
}

.dd-field input[type="text"],
.dd-field input[type="url"] {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--fc-gray-200);
    border-radius: 0;
    background: transparent;
    padding: 0.35rem 0 0.5rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--fc-gray-900);
    min-height: 40px;
    box-shadow: none;
}

.dd-field input[type="text"]:hover,
.dd-field input[type="url"]:hover {
    border-bottom-color: var(--fc-gray-400);
}

.dd-field input[type="text"]:focus,
.dd-field input[type="url"]:focus {
    outline: none;
    border-bottom-color: var(--fc-primary);
    box-shadow: none;
}

.dd-field input[readonly] {
    color: var(--fc-gray-500);
}

.dd-choice-row,
.dd-icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dd-icon-row {
    padding-top: 0.15rem;
}

.dd-choice,
.dd-icon-choice {
    position: relative;
    cursor: pointer;
}

.dd-choice input,
.dd-icon-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dd-choice span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--fc-gray-100);
    color: var(--fc-gray-600);
    font-size: 0.78rem;
    font-weight: 600;
}

.dd-choice input:focus-visible + span,
.dd-icon-choice input:focus-visible + .dd-mark {
    outline: 2px solid var(--fc-primary);
    outline-offset: 2px;
}

.dd-choice input:checked + span {
    background: var(--fc-primary-50);
    color: var(--fc-forest);
}

.dd-icon-choice .dd-mark {
    width: 40px;
    height: 40px;
    border-radius: 0.8rem;
    opacity: 0.45;
    transition: opacity 160ms ease, transform 160ms ease;
}

.dd-icon-choice input:checked + .dd-mark {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--fc-primary);
}

.settings-actions {
    margin-top: 1.15rem;
}

.monitor-row.is-editing {
    background: var(--fc-primary-50);
}

.monitor-row {
    align-items: flex-start;
}

.monitor-main {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.monitor-url {
    font-size: 0.72rem;
    color: var(--fc-gray-500);
    word-break: break-all;
    margin-top: 0.2rem;
}

.monitor-row.is-paused {
    opacity: 0.72;
}

.monitor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex-shrink: 0;
}

.alerts-form .fc-login-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fc-gray-700);
    margin-bottom: 0.35rem;
}

.alerts-add {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.alerts-add input {
    flex: 1;
    min-width: 220px;
    border-radius: 1rem;
    border: 1px solid var(--fc-gray-300);
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    min-height: 44px;
    box-shadow: var(--fc-shadow-soft);
}

.alerts-add input:focus {
    border-color: var(--fc-primary);
    outline: none;
    box-shadow: 0 0 0 1px var(--fc-primary);
}

.alert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--fc-gray-100);
}

.alert-row:last-child {
    border-bottom: none;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.stat-card {
    background: rgb(255 255 255 / 0.92);
    border: 1px solid var(--fc-gray-200);
    border-left: 4px solid var(--fc-primary);
    border-radius: var(--fc-radius-2xl);
    padding: 0.9rem 1rem;
    box-shadow: var(--fc-shadow-soft);
}

.stat-card.down {
    border-left-color: var(--fc-red-600);
}

.stat-card.warn {
    border-left-color: var(--fc-amber-600);
}

.stat-card .label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fc-gray-500);
    font-weight: 600;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--fc-gray-900);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 0.35rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}

.sec-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 1.25rem;
}

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

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.audit-table th {
    text-align: left;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-gray-500);
    font-weight: 600;
    padding: 0.7rem 0.9rem;
    background: var(--fc-gray-50);
    border-bottom: 1px solid var(--fc-gray-200);
}

.audit-table td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--fc-gray-100);
    vertical-align: top;
}

.audit-table tr:hover td {
    background: var(--fc-gray-50);
}

.audit-table .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
}

.badge-info {
    background: var(--fc-primary-100);
    color: var(--fc-green-600);
}

.badge-warning {
    background: var(--fc-amber-100);
    color: var(--fc-amber-800);
}

.badge-critical {
    background: var(--fc-red-50);
    color: var(--fc-red-600);
}

.sev-warning td:first-child {
    box-shadow: inset 3px 0 0 var(--fc-amber-600);
}

.sev-critical td:first-child {
    box-shadow: inset 3px 0 0 var(--fc-red-600);
}

@media (max-width: 1100px) {
    .sec-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fc-amber-600);
    display: inline-block;
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgb(55 159 60 / 0.55); }
    70% { box-shadow: 0 0 0 8px rgb(55 159 60 / 0); }
    100% { box-shadow: 0 0 0 0 rgb(55 159 60 / 0); }
}

@media (min-width: 720px) {
    .dd-user-meta {
        display: block;
    }
}

@media (max-width: 900px) {
    .dd-top-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand right"
            "nav nav";
        gap: 0.55rem 0.75rem;
        padding: 0.65rem 1rem;
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .dd-brand {
        grid-area: brand;
        min-width: 0;
    }

    .dd-nav {
        grid-area: nav;
        width: 100%;
        margin: 0;
        background: var(--fc-gray-100);
        border-radius: 0.85rem;
        padding: 0.2rem;
        justify-content: stretch;
        gap: 0;
    }

    .dd-nav a {
        flex: 1;
        justify-content: center;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    .dd-top-right {
        grid-area: right;
        gap: 0.35rem;
    }

    .dd-live {
        display: none;
    }

    .dd-split {
        grid-template-columns: 1fr;
    }

    .dd-row {
        grid-template-columns: 44px minmax(0, 1fr) auto 28px;
    }

    .dd-spark {
        display: none;
    }

    .dd-feed {
        max-height: none;
    }

    .dd-list,
    .dd-feed {
        overflow: visible;
    }

    .dd-feed-list {
        overflow: visible;
        min-height: 0;
    }

    .dd-detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dd-card-head {
        flex-wrap: wrap;
    }

    .dd-list-head,
    .dd-feed-head {
        flex-wrap: wrap;
        gap: 0.55rem;
    }

    .dd-filters {
        flex-wrap: wrap;
    }

    .sec-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .alerts-add {
        flex-direction: column;
    }

    .alerts-add input {
        min-width: 0;
        width: 100%;
    }

    .alerts-add .btn,
    .dd-list-head .btn {
        width: 100%;
    }

    .alert-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .dd-fields-row,
    .privacy-search-row {
        grid-template-columns: 1fr;
    }

    .privacy-action-grid {
        grid-template-columns: 1fr;
    }

    .privacy-search-action .btn {
        width: 100%;
    }

    .monitor-actions {
        width: 100%;
    }

    .monitor-actions .btn {
        flex: 1;
    }
}

@media (max-width: 560px) {
    .privacy-flow,
    .privacy-summary {
        grid-template-columns: 1fr;
    }

    .privacy-hold-banner,
    .privacy-retention-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .privacy-hold-banner .btn,
    .privacy-retention-actions .btn {
        width: 100%;
    }

    .privacy-records-body {
        padding: 0.85rem 0.9rem 1rem;
    }

    .dd-top {
        padding-top: env(safe-area-inset-top);
    }

    .dd-hero-inner {
        padding: 1.35rem max(1rem, env(safe-area-inset-left)) 1.5rem max(1rem, env(safe-area-inset-right));
    }

    .dd-hero h1 {
        font-size: 1.85rem;
    }

    .dd-hero p {
        font-size: 0.95rem;
    }

    .dd-wrap {
        padding: 0.9rem max(0.85rem, env(safe-area-inset-left)) calc(1.75rem + env(safe-area-inset-bottom)) max(0.85rem, env(safe-area-inset-right));
    }

    .dd-chart-card,
    .dd-list,
    .dd-feed {
        border-radius: 1.1rem;
    }

    .dd-chart-card {
        padding: 0.9rem 0.85rem 0.7rem;
    }

    .dd-chart-svg {
        height: 148px;
    }

    .dd-chart-tip {
        font-size: 0.7rem;
        max-width: calc(100% - 1rem);
        white-space: normal;
    }

    .dd-row {
        grid-template-columns: 40px minmax(0, 1fr) 28px;
        gap: 0.65rem;
        padding: 0.85rem 0.9rem;
        min-height: 64px;
    }

    .dd-status-label {
        display: none;
    }

    .dd-chevron {
        grid-column: auto;
        grid-row: auto;
    }

    .dd-mark {
        width: 40px;
        height: 40px;
        border-radius: 0.8rem;
    }

    .dd-detail-inner {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .dd-detail-grid {
        grid-template-columns: 1fr;
    }

    .dd-kv-wide {
        grid-column: span 1;
    }

    .dd-perf-svg {
        height: 96px;
    }

    .dd-perf-head {
        flex-wrap: wrap;
        gap: 0.2rem 0.6rem;
    }

    .dd-list-head,
    .dd-feed-head {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 0.9rem 0.65rem;
    }

    .dd-filters {
        width: 100%;
    }

    .dd-filters button,
    .dd-filters a {
        flex: 1;
        justify-content: center;
    }

    .dd-logout {
        padding: 0.35rem 0.45rem;
        font-size: 0.75rem;
        min-height: 40px;
    }

    .dd-brand img {
        width: 34px;
        height: 34px;
    }

    .dd-brand strong {
        font-size: 0.95rem;
    }

    .dd-incident {
        padding: 0.8rem 0.9rem;
    }

    .dd-feed-pager {
        gap: 0.35rem;
        padding: 0.55rem 0.75rem;
    }

    .dd-page-btn {
        flex: 1;
        justify-content: center;
        display: inline-flex;
        min-height: 40px;
    }

    .sec-stats,
    .stat-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .stat-card .value {
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
