:root {
    --bg: #eef4ff;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-strong: #f3f7ff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #dbe7fb;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: #e8f0ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --brand-cyan: #26d6d3;
    --brand-blue: #77a7d8;
    --brand-navy: #071f3d;
    --brand-navy-deep: #05162d;
    --navy-950: #0b1730;
    --navy-900: #0f1f3d;
    --navy-800: #16284c;
    --shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body.control-body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.09), transparent 28%),
        linear-gradient(180deg, #f7fbff 0%, #eef4ff 100%);
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 32%),
        linear-gradient(180deg, #f7f0e8 0%, #eee4d7 100%);
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.control-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
}

.auth-hero,
.auth-card {
    padding: 44px;
}

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

.auth-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 4.4rem);
    line-height: 0.96;
}

.auth-hero p {
    margin: 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.05rem;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card-head {
    margin-bottom: 18px;
}

.auth-card-head h2 {
    margin: 0 0 6px;
    font-size: 1.9rem;
}

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

.auth-form,
.auth-note {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
}

.auth-note {
    max-width: 420px;
    padding: 18px 20px;
}

.auth-note strong {
    display: block;
    margin-bottom: 8px;
}

.auth-note p {
    font-size: 0.96rem;
}

.auth-submit {
    width: 100%;
}

.control-sidebar {
    padding: 28px;
    background:
        radial-gradient(circle at 18% 6%, rgba(38, 214, 211, 0.16), transparent 20%),
        linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%);
    color: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.labtrace-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.labtrace-brand-mark {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 72% 75%, rgba(38, 214, 211, 0.2), transparent 18%),
        #0b284b;
    box-shadow:
        inset 0 0 0 1px rgba(119, 167, 216, 0.1),
        0 18px 38px rgba(1, 12, 28, 0.34);
}

.labtrace-brand-mark svg {
    width: 42px;
    height: 42px;
}

.labtrace-mark-l {
    color: #ffffff;
}

.labtrace-mark-t {
    color: var(--brand-cyan);
}

.labtrace-brand-copy,
.labtrace-wordmark,
.labtrace-tagline,
.control-console-title {
    display: block;
}

.labtrace-wordmark {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 2rem;
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.labtrace-wordmark-lab {
    color: #ffffff;
}

.labtrace-wordmark-trace {
    color: var(--brand-cyan);
}

.labtrace-wordmark-uk {
    color: var(--brand-blue);
}

.labtrace-tagline {
    margin-top: 7px;
    color: #ffffff;
    font-size: 0.86rem;
    line-height: 1.35;
    letter-spacing: 0.34em;
    font-weight: 800;
}

.control-console-title {
    margin-top: 2px;
    font-size: 1.28rem;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: -0.02em;
}

.brand-block p,
.sidebar-note p {
    color: rgba(232, 240, 255, 0.72);
    line-height: 1.5;
    margin-bottom: 0;
}

.labtrace-brand-auth {
    align-items: center;
    margin-bottom: 10px;
}

.labtrace-brand-auth .labtrace-brand-mark {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    border-radius: 22px;
}

.labtrace-brand-auth .labtrace-wordmark {
    font-size: clamp(2.4rem, 5vw, 4rem);
}

.labtrace-brand-auth .labtrace-tagline {
    font-size: clamp(0.9rem, 1.5vw, 1.12rem);
}

.control-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(241, 245, 255, 0.88);
}

.control-nav a.active,
.control-nav a:hover {
    background: rgba(77, 132, 255, 0.16);
    color: #ffffff;
}

.control-nav-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-nav-parent {
    font-weight: 700;
}

.control-subnav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 14px;
}

.control-subnav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 12px;
}

.control-subnav strong {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.8rem;
}

.control-nav-disabled {
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(241, 245, 255, 0.48);
}

.sidebar-note {
    margin-top: auto;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 700;
}

.sidebar-user-card strong,
.sidebar-user-card span {
    display: block;
}

.sidebar-user-card span {
    color: rgba(232, 240, 255, 0.72);
    font-size: 0.9rem;
}

.control-main {
    padding: 28px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 6px 0 10px;
    font-size: 2.35rem;
}

.page-header p {
    margin: 0;
    max-width: 860px;
    color: var(--muted);
    line-height: 1.55;
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.page-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    font-size: 0.9rem;
}

.flash-banner {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #e8f5f1;
    border: 1px solid #b6ddd3;
}

.flash-error {
    background: #fbebea;
    border-color: #e8bfbb;
}

.flash-error ul {
    margin: 10px 0 0 20px;
}

.secret-block {
    margin: 10px 0;
    padding: 14px;
    border-radius: 14px;
    background: #f8f4ec;
    border: 1px dashed var(--line);
    font-family: Consolas, "Courier New", monospace;
    overflow-wrap: anywhere;
}

.stats-grid,
.panel-grid,
.module-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 22px;
}

.panel-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
}

.panel-grid-wide {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
}

.module-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 18px;
}

.stat-card,
.panel-card,
.module-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
}

.stat-card span,
.subtle,
.detail-list dt,
.table td,
.table th,
label span {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin: 8px 0;
}

.panel-card {
    padding: 22px;
}

.module-card {
    padding: 18px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.panel-head h2,
.module-card h3 {
    margin: 0;
}

.button-link,
.button-primary,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
}

.button-link,
.button-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.18);
}

.button-link:hover,
.button-primary:hover {
    background: var(--accent-strong);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--line);
}

.button-danger {
    background: #fff1ef;
    border-color: #efc0bb;
    color: var(--danger);
}

.sidebar-logout {
    width: 100%;
    margin-top: -10px;
}

.text-link {
    color: var(--accent-strong);
}

.simple-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

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

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

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

.table-actions {
    white-space: nowrap;
}

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

.filter-row-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
}

label input,
label select,
label textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    background: #ffffff;
}

.full-span {
    grid-column: 1 / -1;
}

.action-row,
.action-stack,
.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.action-stack {
    flex-direction: column;
    align-items: stretch;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

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

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-list dt {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.detail-list dd {
    margin: 0;
    font-weight: 600;
}

.detail-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.ticket-description {
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    line-height: 1.7;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 22px 0;
}

.timeline-item,
.inset-card {
    border: 1px solid var(--line);
    background: #fffdfa;
    border-radius: 18px;
    box-shadow: none;
}

.timeline-item {
    padding: 16px 18px;
}

.timeline-item p {
    margin: 10px 0 0;
    line-height: 1.65;
}

.timeline-item-internal {
    background: #fff7df;
}

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

.timeline-meta span {
    color: var(--muted);
    font-size: 0.92rem;
}

.split-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.compact-list-item:last-child {
    border-bottom: 0;
}

.compact-list-item strong {
    display: block;
}

.compact-list-item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attachment-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.attachment-row:last-child {
    border-bottom: 0;
}

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

.button-compact {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.diagnostic-block {
    margin: 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #1f2430;
    color: #f3f4f6;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.55;
}

.support-page-shell,
.support-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-topbar,
.support-detail-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.support-global-search {
    position: relative;
    flex: 1 1 460px;
    max-width: 640px;
}

.support-icon-shell {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--muted);
}

.support-global-search input,
.support-filter-stack input,
.support-filter-stack select,
.support-side-form select,
.support-side-form input,
.support-reply-card textarea,
.support-upload-card input[type="file"] {
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.support-global-search input {
    width: 100%;
    padding: 14px 18px 14px 46px;
}

.support-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.support-icon-button {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    place-items: center;
    color: var(--navy-800);
}

.support-icon-badge {
    position: absolute;
    top: -4px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
}

.support-ghost-button[disabled] {
    opacity: 0.8;
    cursor: not-allowed;
}

.support-primary-button {
    min-width: 124px;
}

.support-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.75fr);
    gap: 20px;
    align-items: start;
}

.support-main-column,
.support-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-filter-card {
    padding: 20px;
}

.support-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.support-filter-row,
.support-more-grid {
    display: grid;
    grid-template-columns: 2fr repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.support-field span,
.support-sort-label span {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 700;
}

.support-field-search {
    grid-column: span 2;
}

.support-more-filters {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(243, 247, 255, 0.92);
    padding: 14px 16px 16px;
}

.support-more-filters summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--navy-800);
    margin-bottom: 14px;
}

.support-filter-actions,
.support-table-toolbar,
.support-table-actions,
.support-bulk-bar,
.support-detail-hero-row,
.support-ticket-heading-row,
.support-ticket-meta-row,
.support-detail-hero-actions,
.support-message-head,
.support-inline-attachments,
.support-line-legend,
.support-donut-block,
.support-donut-legend,
.support-summary-stack,
.support-summary-row,
.support-category-head,
.support-quick-filter,
.support-contact-card,
.support-related-card {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.support-filter-actions {
    justify-content: space-between;
}

.support-clear-link,
.support-inline-link {
    color: var(--accent-strong);
    font-weight: 700;
}

.support-tab-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.support-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.6);
    color: var(--muted);
    font-weight: 700;
}

.support-tab strong {
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    text-align: center;
}

.support-tab.active {
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(37, 99, 235, 0.16);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.08);
}

.support-table-card,
.support-summary-card,
.support-chart-card,
.support-detail-hero,
.support-reply-card,
.support-upload-card {
    border-color: rgba(219, 231, 251, 0.92);
}

.support-bulk-bar {
    color: var(--muted);
}

.support-sort-form {
    display: flex;
    align-items: center;
}

.support-sort-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.support-sort-label select {
    min-width: 220px;
}

.support-data-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.support-data-table tr:last-child td {
    border-bottom: 0;
}

.support-data-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

.ticket-row-breaching {
    box-shadow: inset 4px 0 0 var(--danger);
}

.support-ticket-link {
    font-weight: 800;
    color: var(--accent-strong);
}

.support-subject-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.support-subject-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 0.88rem;
}

.support-new-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-weight: 700;
}

.support-new-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.support-badge,
.support-avatar-chip,
.support-muted-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.support-assignee-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.support-avatar-chip {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-strong);
    overflow: hidden;
}

.support-avatar-chip img,
.support-message-avatar img,
.support-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.support-muted-chip {
    background: #f1f5f9;
    color: #475569;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.priority-high {
    background: rgba(245, 158, 11, 0.16);
    color: #d97706;
}

.priority-medium {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.priority-low {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.status-open {
    background: rgba(254, 226, 226, 0.9);
    color: #dc2626;
}

.status-progress {
    background: rgba(219, 234, 254, 0.92);
    color: #2563eb;
}

.status-pending,
.status-warning {
    background: rgba(237, 233, 254, 0.92);
    color: #7c3aed;
}

.status-resolved {
    background: rgba(209, 250, 229, 0.92);
    color: #059669;
}

.status-closed {
    background: rgba(226, 232, 240, 0.92);
    color: #475569;
}

.sla-breaching {
    background: rgba(254, 226, 226, 0.96);
    color: #dc2626;
}

.sla-at_risk {
    background: rgba(254, 243, 199, 0.96);
    color: #d97706;
}

.sla-within {
    background: rgba(220, 252, 231, 0.96);
    color: #059669;
}

.sla-none {
    background: rgba(226, 232, 240, 0.96);
    color: #64748b;
}

.support-sla-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-sla-cell small {
    color: var(--muted);
}

.support-row-action {
    color: var(--accent-strong);
    font-weight: 700;
}

.support-empty-state {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 0;
    color: var(--muted);
}

.support-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 18px;
}

.support-line-chart {
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(243, 247, 255, 0.92) 0%, rgba(255, 255, 255, 0.92) 100%);
    border: 1px solid var(--line);
    padding: 18px;
}

.support-line-chart svg {
    width: 100%;
    height: 220px;
    overflow: visible;
}

.support-line-chart polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.line-created {
    stroke: #2563eb;
}

.line-resolved {
    stroke: #10b981;
}

.line-closed {
    stroke: #94a3b8;
}

.support-line-legend i {
    display: inline-block;
    width: 22px;
    height: 3px;
    margin-right: 8px;
    border-radius: 999px;
}

.support-lower-grid,
.support-related-grid,
.support-reply-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.support-reply-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.support-activity-list,
.support-category-list,
.support-quick-filter-list,
.support-conversation-list,
.support-related-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.support-activity-item,
.support-related-card,
.support-message-card,
.support-upload-card {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.support-activity-tone {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.tone-info,
.tone-default {
    background: #2563eb;
}

.tone-reply {
    background: #10b981;
}

.tone-note {
    background: #f59e0b;
}

.support-category-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.support-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.support-progress-bar.priority-urgent span {
    background: linear-gradient(90deg, #ef4444 0%, #fb7185 100%);
}

.support-progress-bar.priority-high span {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.support-progress-bar.priority-low span {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.support-donut-chart {
    width: 154px;
    height: 154px;
    padding: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.support-donut-core {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.support-donut-core strong {
    font-size: 2rem;
}

.support-donut-core span {
    color: var(--muted);
    font-size: 0.88rem;
}

.support-legend-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    color: var(--muted);
}

.support-summary-stack {
    flex-direction: column;
    align-items: stretch;
}

.support-summary-row {
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--panel-strong);
}

.support-summary-row.danger strong {
    color: #dc2626;
}

.support-summary-row.warning strong {
    color: #d97706;
}

.support-summary-row.success strong {
    color: #059669;
}

.support-quick-filter {
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
}

.support-quick-filter.active {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(232, 240, 255, 0.9);
}

.support-breadcrumbs {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    flex-wrap: wrap;
}

.support-breadcrumbs strong,
.support-breadcrumbs a:hover {
    color: var(--accent-strong);
}

.support-detail-grid {
    align-items: start;
}

.support-detail-hero h3 {
    margin: 12px 0 0;
    font-size: 2rem;
}

.support-ticket-heading-row h2 {
    margin: 0;
    font-size: 2.4rem;
}

.support-ticket-meta-row {
    margin-top: 12px;
    color: var(--muted);
}

.support-detail-tabs {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.support-detail-tabs a {
    font-weight: 700;
    color: var(--muted);
}

.support-detail-tabs a.active,
.support-detail-tabs a:hover {
    color: var(--accent-strong);
}

.support-detail-tabs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 7px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 0.8rem;
}

.support-message-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 16px;
}

.support-message-card-primary {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.support-message-card-note {
    background: #fff8e8;
}

.support-message-avatar,
.support-contact-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-strong);
    font-weight: 800;
    overflow: hidden;
}

.support-message-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-message-head {
    color: var(--muted);
}

.support-message-head strong {
    color: var(--accent-strong);
}

.support-message-body p {
    margin: 0;
    line-height: 1.75;
}

.support-attachment-chip {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.support-reply-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.support-reply-card-note {
    background: rgba(255, 248, 232, 0.9);
}

.support-reply-card-head h3 {
    margin: 0 0 4px;
}

.support-upload-card {
    margin-top: 18px;
}

.support-side-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.support-sla-highlight {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(243, 247, 255, 0.92);
    border: 1px solid var(--line);
}

.support-detail-list div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
}

.support-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.support-context-stat {
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(236, 253, 245, 0.82));
    border: 1px solid rgba(191, 219, 254, 0.75);
}

.support-context-stat span,
.support-admin-directory-head span,
.support-admin-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.support-context-stat strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.25rem;
}

.support-context-list {
    margin-bottom: 16px;
}

.support-admin-directory {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support-admin-directory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-admin-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.support-admin-card-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.support-admin-card-main strong,
.support-admin-card-main span,
.support-admin-card-main a {
    display: block;
}

.support-admin-card-main a {
    color: var(--accent-strong);
    word-break: break-word;
}

.support-admin-avatar {
    flex: 0 0 auto;
}

.support-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.support-admin-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: var(--ink-soft);
}

.support-raw-diagnostic {
    margin-top: 16px;
}

.support-raw-diagnostic summary {
    cursor: pointer;
    color: var(--accent-strong);
    font-weight: 800;
}

.support-raw-diagnostic .diagnostic-block {
    margin-top: 12px;
}

.support-contact-card a {
    color: var(--accent-strong);
}

.sidebar-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 2px;
}

.sidebar-section-label {
    color: rgba(232, 240, 255, 0.58);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-shortcuts a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(241, 245, 255, 0.88);
}

.sidebar-shortcuts a:hover {
    background: rgba(77, 132, 255, 0.12);
    color: #ffffff;
}

.sidebar-shortcuts strong {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    text-align: center;
    font-size: 0.8rem;
}

.sidebar-version {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(232, 240, 255, 0.72);
}

.sidebar-version span,
.sidebar-version strong {
    display: block;
}

.sidebar-version strong {
    margin-top: 4px;
    color: #ffffff;
}

.dashboard-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 760px;
}

.dashboard-search {
    display: flex;
    min-width: min(330px, 100%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.dashboard-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 16px;
    color: var(--ink);
    font: inherit;
}

.dashboard-search button {
    border: 0;
    background: transparent;
    padding: 0 16px;
    color: var(--accent-strong);
    font-weight: 700;
    cursor: pointer;
}

.dashboard-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-weight: 700;
}

.dashboard-alert-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
}

.dashboard-export:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.dashboard-kpi-grid,
.dashboard-analytics-grid,
.dashboard-lower-grid,
.dashboard-health-grid {
    display: grid;
    gap: 18px;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    margin-bottom: 22px;
}

.dashboard-kpi-card,
.dashboard-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.dashboard-kpi-card {
    position: relative;
    display: flex;
    min-height: 168px;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 22px;
    color: var(--ink);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.1);
}

.kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 800;
}

.tone-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.tone-green {
    background: #d1fae5;
    color: #047857;
}

.tone-amber {
    background: #ffedd5;
    color: #c2410c;
}

.tone-indigo,
.tone-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.tone-red {
    background: #fee2e2;
    color: #dc2626;
}

.kpi-label {
    min-height: 38px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-kpi-card strong {
    display: block;
    margin-top: auto;
    font-size: 1.85rem;
    letter-spacing: -0.04em;
}

.dashboard-kpi-card small {
    color: var(--muted);
    font-weight: 700;
}

.dashboard-kpi-card .kpi-good {
    color: #059669;
}

.dashboard-kpi-card .kpi-risk {
    color: #dc2626;
}

.kpi-meter {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.kpi-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981, #2563eb);
}

.dashboard-analytics-grid {
    grid-template-columns: minmax(360px, 1.15fr) minmax(310px, 0.85fr) minmax(420px, 1.1fr);
    margin-bottom: 18px;
}

.dashboard-lower-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    margin-bottom: 18px;
}

.dashboard-card {
    padding: 22px;
    border-radius: 22px;
}

.dashboard-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-card-head h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

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

.dashboard-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-line-chart svg {
    display: block;
    width: 100%;
    height: 250px;
}

.dashboard-line-chart line {
    stroke: #dbe7fb;
    stroke-width: 1;
}

.dashboard-line-chart polygon {
    fill: rgba(16, 185, 129, 0.13);
}

.dashboard-line-chart polyline {
    fill: none;
    stroke: #10b981;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.dashboard-line-chart circle {
    fill: #10b981;
    stroke: #ffffff;
    stroke-width: 2;
}

.chart-months {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.dashboard-donut-layout {
    display: grid;
    grid-template-columns: minmax(160px, 0.9fr) minmax(150px, 1fr);
    gap: 22px;
    align-items: center;
}

.dashboard-donut {
    width: min(210px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.dashboard-donut::after {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px var(--line);
}

.dashboard-donut span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    text-align: center;
}

.dashboard-donut strong {
    font-size: 1.9rem;
}

.dashboard-donut small {
    color: var(--muted);
}

.dashboard-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-donut-legend div {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    align-items: center;
    color: var(--muted);
}

.dashboard-donut-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dashboard-donut-legend strong {
    color: var(--ink);
    font-size: 0.9rem;
}

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

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dashboard-table th,
.dashboard-table td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    color: #1f2a44;
    text-align: left;
    vertical-align: middle;
}

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

.dashboard-link-label {
    color: var(--accent-strong);
    font-weight: 700;
}

.status-pill-active,
.status-pill-trial {
    background: #d1fae5;
    border-color: #bbf7d0;
    color: #047857;
}

.status-pill-suspended {
    background: #ffedd5;
    border-color: #fed7aa;
    color: #c2410c;
}

.status-pill-archived,
.status-pill-inactive {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.dashboard-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-ticket-row {
    display: grid;
    grid-template-columns: 86px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.dashboard-ticket-row:last-child {
    border-bottom: 0;
}

.dashboard-ticket-row strong,
.dashboard-ticket-row small,
.dashboard-ticket-row em {
    display: block;
}

.dashboard-ticket-row small {
    margin-top: 4px;
    color: var(--muted);
}

.dashboard-ticket-row em {
    color: var(--muted);
    font-style: normal;
    text-align: right;
}

.priority-pill {
    display: inline-flex;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.priority-urgent {
    background: #fee2e2;
    color: #dc2626;
}

.priority-high {
    background: #ffedd5;
    color: #ea580c;
}

.priority-normal,
.priority-medium {
    background: #dbeafe;
    color: #1d4ed8;
}

.priority-low {
    background: #d1fae5;
    color: #047857;
}

.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #f8fbff;
}

.dashboard-empty-state span {
    color: var(--muted);
}

.dashboard-health-card {
    margin-bottom: 20px;
}

.dashboard-health-grid {
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
}

.health-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-right: 1px solid var(--line);
}

.health-item:last-child {
    border-right: 0;
}

.health-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #dbeafe;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.72);
}

.health-item strong,
.health-item em,
.health-item small {
    display: block;
}

.health-item em {
    width: fit-content;
    margin: 8px 0 6px;
    padding: 5px 9px;
    border-radius: 999px;
    font-style: normal;
    font-weight: 800;
    font-size: 0.78rem;
}

.health-item small {
    color: var(--muted);
    line-height: 1.45;
}

.health-success .health-icon,
.health-success em {
    background: #d1fae5;
    color: #047857;
}

.health-warning .health-icon,
.health-warning em {
    background: #ffedd5;
    color: #c2410c;
}

.health-info .health-icon,
.health-info em {
    background: #dbeafe;
    color: #1d4ed8;
}

.health-neutral .health-icon,
.health-neutral em {
    background: #f1f5f9;
    color: #475569;
}

.profile-tabs {
    display: flex;
    gap: 18px;
    align-items: center;
    overflow-x: auto;
    margin: 4px 0 24px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--line);
}

.profile-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-bottom: 3px solid transparent;
    color: #3b4d70;
    font-weight: 800;
    white-space: nowrap;
}

.profile-tabs a.active,
.profile-tabs a:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 22px;
    margin-bottom: 22px;
}

.profile-grid-main {
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.65fr);
}

.profile-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.profile-card-head h2,
.profile-photo-panel h3,
.profile-requirements h3 {
    margin: 0 0 6px;
}

.profile-card-head p,
.profile-photo-panel p,
.profile-form small,
.profile-toggle-row small,
.profile-security-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.profile-card-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 0.78rem;
    font-weight: 900;
}

.profile-information-layout,
.profile-password-layout {
    display: grid;
    gap: 24px;
}

.profile-information-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
}

.profile-password-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.44fr);
    align-items: start;
}

.profile-form,
.profile-preferences-form {
    display: grid;
    gap: 18px;
}

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

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

.profile-form label,
.profile-preferences-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.profile-form label span,
.profile-preferences-form label > span {
    font-weight: 800;
    color: #273956;
}

.profile-form label span strong {
    color: var(--danger);
}

.profile-form input,
.profile-form select,
.profile-preferences-form select,
.password-field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font: inherit;
    padding: 12px 14px;
}

.profile-save-button {
    width: fit-content;
}

.profile-form .profile-save-button {
    align-self: end;
}

.profile-photo-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-left: 24px;
    border-left: 1px solid var(--line);
    text-align: center;
}

.profile-avatar-large {
    width: 132px;
    height: 132px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.18);
}

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

.profile-photo-form {
    width: 100%;
    display: grid;
    gap: 12px;
}

.profile-drop-zone {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 112px;
    padding: 18px;
    border: 1px dashed #8ab4ff;
    border-radius: 18px;
    background: #f8fbff;
    color: var(--accent-strong);
    cursor: pointer;
}

.profile-drop-zone input {
    display: none;
}

.profile-drop-zone.is-dragging {
    background: #e8f0ff;
    border-color: var(--accent);
}

.profile-drop-zone span {
    color: var(--muted);
}

.profile-remove-photo {
    width: 100%;
}

.profile-summary-card {
    align-self: start;
}

.profile-summary-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.profile-summary-list div {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.profile-summary-list div:last-child {
    border-bottom: 0;
}

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

.profile-summary-list dd {
    margin: 0;
}

.profile-summary-list dd small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.profile-badge-success {
    background: #d1fae5;
    color: #047857;
}

.profile-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.profile-badge-info {
    background: #ede9fe;
    color: #6d28d9;
}

.profile-badge-neutral {
    background: #f1f5f9;
    color: #475569;
}

.password-field {
    display: grid;
    grid-template-columns: 1fr auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.password-field input {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.password-field button {
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    font-weight: 800;
    padding: 0 14px;
    cursor: pointer;
}

.profile-requirements {
    padding: 20px;
    border: 1px solid #ccebdd;
    border-radius: 18px;
    background: linear-gradient(180deg, #effdf7 0%, #f7fffb 100%);
}

.profile-requirements ul {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding-left: 18px;
    color: #1f6f50;
}

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

.profile-toggle-row {
    display: grid !important;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.profile-toggle-row span strong,
.profile-toggle-row span small {
    display: block;
}

.profile-toggle-row input[type="checkbox"] {
    width: 48px;
    height: 26px;
    appearance: none;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    transition: background 160ms ease;
}

.profile-toggle-row input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 160ms ease;
}

.profile-toggle-row input[type="checkbox"]:checked {
    background: var(--accent);
}

.profile-toggle-row input[type="checkbox"]:checked::after {
    transform: translateX(22px);
}

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

.profile-security-list div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fbff;
}

.profile-security-list strong {
    color: #273956;
}

.customer-directory-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.28fr);
    gap: 22px;
    align-items: start;
}

.customer-directory-main,
.customer-directory-sidebar {
    display: grid;
    gap: 18px;
}

.customer-filter-card,
.customer-table-card,
.customer-side-card,
.customer-detail-card,
.customer-detail-hero {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.customer-filter-card,
.customer-table-card,
.customer-side-card,
.customer-detail-card {
    padding: 22px;
}

.customer-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(3, minmax(150px, 0.6fr)) auto;
    gap: 14px;
    align-items: end;
}

.customer-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.customer-filter-grid label span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.customer-filter-grid input,
.customer-filter-grid select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
}

.customer-filter-actions,
.customer-row-actions,
.customer-detail-actions,
.customer-settings-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.customer-directory-table td {
    vertical-align: middle;
}

.customer-directory-table tr.is-selected {
    background: #f1f7ff;
}

.customer-name-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.customer-name-link strong,
.customer-name-link small,
.customer-directory-table td small {
    display: block;
}

.customer-name-link strong {
    color: var(--accent-strong);
}

.customer-name-link small,
.customer-directory-table td small {
    margin-top: 3px;
    color: var(--muted);
}

.customer-initials {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 900;
}

.customer-initials-large {
    width: 58px;
    height: 58px;
    font-size: 1rem;
}

.customer-storage-cell {
    display: grid;
    gap: 7px;
    min-width: 150px;
}

.customer-storage-cell i {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.customer-storage-cell b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981, #2563eb);
}

.customer-more-menu {
    position: relative;
}

.customer-more-menu summary {
    display: inline-flex;
    align-items: center;
    min-height: 39px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

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

.customer-more-menu[open] > div {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 4;
    display: grid;
    min-width: 170px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.customer-directory-table .customer-more-menu[open] > div {
    top: auto;
    bottom: calc(100% + 8px);
    z-index: 40;
}

.customer-more-menu a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #273956;
    font-weight: 700;
}

.customer-more-menu a:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.customer-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    color: var(--muted);
}

.customer-summary-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.customer-summary-metrics div {
    display: grid;
    gap: 4px;
    padding: 12px 8px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.customer-summary-metrics div:last-child {
    border-right: 0;
}

.customer-summary-metrics span,
.customer-alert-list dt,
.customer-storage-overview dt {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.customer-summary-metrics strong {
    font-size: 1.4rem;
}

.customer-good-text {
    color: #059669 !important;
}

.customer-risk-text {
    color: #dc2626 !important;
}

.customer-storage-overview {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    align-items: center;
}

.customer-donut-small {
    width: 140px;
    flex: 0 0 140px;
}

.customer-storage-overview-compact {
    grid-template-columns: 112px 1fr;
    gap: 16px;
    align-items: center;
}

.customer-storage-overview-compact .customer-donut-small {
    width: 112px;
    flex-basis: 112px;
}

.customer-storage-overview .dashboard-donut {
    display: grid;
    place-items: center;
}

.customer-storage-overview .dashboard-donut::after {
    inset: 23%;
}

.customer-storage-overview .dashboard-donut span {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    display: flex;
    width: 86px;
    min-width: 86px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    line-height: 1.05;
    text-align: center;
    pointer-events: none;
}

.customer-storage-overview .dashboard-donut strong {
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.customer-storage-overview .dashboard-donut small {
    font-size: 0.7rem;
    white-space: normal;
}

.customer-storage-overview-compact .dashboard-donut span {
    width: 66px;
    min-width: 66px;
}

.customer-storage-overview-compact .dashboard-donut strong {
    font-size: 0.92rem;
}

.customer-storage-overview-compact .dashboard-donut small {
    font-size: 0.62rem;
}

.customer-storage-overview dl,
.customer-alert-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.customer-storage-overview div,
.customer-alert-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.customer-storage-overview dd,
.customer-alert-list dd {
    margin: 0;
    font-weight: 800;
}

.customer-storage-overview-compact dl {
    gap: 10px;
    min-width: 0;
}

.customer-storage-overview-compact div {
    align-items: baseline;
}

.customer-storage-overview-compact dd {
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.customer-storage-overview-compact .storage-source-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.customer-storage-overview-compact .storage-source-row dd {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.customer-address-row dd span {
    display: block;
}

.customer-quick-filters {
    display: grid;
    gap: 8px;
}

.customer-quick-filters a {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    color: #273956;
    font-weight: 800;
}

.customer-quick-filters a:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.customer-detail-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.customer-detail-hero h2 {
    margin: 0 0 4px;
}

.customer-detail-hero p {
    margin: 0;
    color: var(--muted);
}

.customer-detail-hero p span {
    margin: 0 8px;
}

.customer-detail-tabs {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.customer-detail-tabs a {
    padding: 10px 12px;
    border-bottom: 3px solid transparent;
    color: #3b4d70;
    font-weight: 800;
    white-space: nowrap;
}

.customer-detail-tabs a.active,
.customer-detail-tabs a:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.customer-detail-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
    gap: 18px;
    margin-bottom: 18px;
}

.customer-detail-card h3 {
    margin: 0 0 16px;
}

.customer-detail-list {
    display: grid;
    gap: 11px;
    margin: 0 0 16px;
}

.customer-detail-list div {
    display: grid;
    grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr);
    gap: 14px;
}

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

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

.customer-quick-actions-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.customer-quick-actions-card a,
.customer-quick-actions-card button {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: #f8fbff;
    color: var(--accent-strong);
    text-align: left;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.customer-quick-actions-card button {
    color: var(--danger);
}

.customer-contact-grid,
.customer-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.customer-contact-card,
.customer-module-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbff;
}

.customer-contact-card small,
.customer-module-card small {
    color: var(--muted);
}

.customer-audit-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.customer-audit-list div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.customer-audit-list span {
    color: var(--muted);
    font-size: 0.9rem;
}

.customer-back-row {
    margin-bottom: 18px;
}

@media (max-width: 980px) {
    .control-shell,
    .panel-grid,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .panel-grid-wide,
    .split-actions {
        grid-template-columns: 1fr;
    }

    .support-layout-grid,
    .support-lower-grid,
    .support-related-grid,
    .support-reply-grid,
    .dashboard-analytics-grid,
    .dashboard-lower-grid,
    .profile-grid,
    .profile-grid-main,
    .profile-information-layout,
    .profile-password-layout,
    .customer-directory-layout,
    .customer-filter-grid,
    .customer-detail-grid,
    .customer-detail-two-column {
        grid-template-columns: 1fr;
    }

    .support-filter-row,
    .support-more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .control-sidebar {
        padding-bottom: 16px;
    }

    .profile-photo-panel {
        padding-left: 0;
        padding-top: 22px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .auth-hero,
    .auth-card {
        padding: 24px;
    }
}

@media (max-width: 720px) {
    .control-main {
        padding: 18px;
    }

    .page-header,
    .panel-head,
    .form-grid,
    .filter-row {
        grid-template-columns: 1fr;
        display: grid;
    }

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

    .attachment-row {
        flex-direction: column;
    }

    .page-meta {
        justify-content: flex-start;
    }

    .support-filter-row,
    .support-more-grid,
    .support-table-footer,
    .support-topbar,
    .support-detail-toolbar,
    .support-detail-hero-row,
    .support-donut-block,
    .support-detail-list div,
    .support-message-card {
        grid-template-columns: 1fr;
        display: grid;
    }

    .support-global-search {
        max-width: none;
    }

    .support-ticket-meta-row,
    .support-detail-hero-actions,
    .support-topbar-actions,
    .dashboard-top-actions {
        justify-content: flex-start;
    }

    .dashboard-ticket-row,
    .dashboard-donut-layout,
    .profile-form,
    .profile-security-list,
    .profile-summary-list div,
    .customer-storage-overview,
    .customer-contact-grid,
    .customer-module-grid,
    .customer-detail-list div {
        grid-template-columns: 1fr;
    }

    .dashboard-ticket-row em {
        text-align: left;
    }
}

/* Customer site detail and staging release builder */
.site-title-inline {
    margin-right: 10px;
}

.site-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--muted);
}

.site-meta-line strong,
.site-meta-line span {
    color: var(--muted);
}

.site-header-actions,
.site-card-actions,
.release-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-header-actions {
    justify-content: flex-end;
}

.customer-more-menu button {
    background: transparent;
    border: 0;
    color: var(--navy);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0.55rem 0.75rem;
    text-align: left;
    width: 100%;
}

.customer-more-menu button:hover {
    background: rgba(37, 99, 235, 0.08);
}

.control-modal {
    background: transparent;
    border: 0;
    max-width: min(560px, calc(100vw - 2rem));
    padding: 0;
}

.control-modal::backdrop {
    background: rgba(2, 12, 32, 0.48);
    backdrop-filter: blur(8px);
}

.control-modal-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(10, 28, 64, 0.24);
    display: grid;
    gap: 1rem;
    min-width: min(520px, calc(100vw - 2rem));
    padding: 1.25rem;
}

.control-modal-head {
    display: grid;
    gap: 0.35rem;
}

.control-modal-head h2,
.control-modal-head p {
    margin: 0;
}

.control-modal-head p {
    color: var(--muted);
}

.control-modal-card label {
    color: var(--muted);
    display: grid;
    gap: 0.4rem;
    font-weight: 800;
}

.control-modal-card input,
.control-modal-card select,
.control-modal-card textarea {
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--navy);
    font: inherit;
    padding: 0.8rem 0.9rem;
}

.control-modal-card textarea {
    resize: vertical;
}

.control-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.release-build-button {
    gap: 9px;
    background: linear-gradient(135deg, #0f8bd8 0%, #1d4ed8 55%, #173b9a 100%);
}

.release-build-button svg {
    width: 18px;
    height: 18px;
}

.button-secondary.is-disabled,
button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.site-tabs {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    margin: -8px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.site-tabs a {
    padding: 10px 4px;
    border-bottom: 3px solid transparent;
    color: #3b4d70;
    font-weight: 800;
    white-space: nowrap;
}

.site-tabs a.active,
.site-tabs a:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.release-source-banner,
.release-info-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid #b8d4ff;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.release-source-banner p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.release-banner-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
}

.release-banner-icon svg {
    width: 26px;
    height: 26px;
}

.release-source-banner .button-primary {
    margin-left: auto;
    white-space: nowrap;
}

.release-target-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
}

.release-target-card h2 {
    margin: 0 0 6px;
}

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

.release-target-form {
    min-width: 280px;
}

.site-detail-grid,
.release-builder-grid {
    display: grid;
    gap: 20px;
}

.site-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.site-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.site-card-head h2 {
    margin: 0;
    font-size: 1.18rem;
}

.site-info-list {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.site-info-list div {
    display: grid;
    grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}

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

.site-info-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.environment-card-prod,
.environment-card-test,
.prod-gate-card,
.environment-summary-card {
    grid-column: span 1;
}

.environment-summary-card {
    grid-column: span 2;
}

.quick-actions-card {
    align-content: start;
}

.environment-actions,
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.environment-actions .button-secondary,
.quick-actions-grid .button-secondary {
    width: 100%;
}

.environment-action-form {
    margin: 0;
}

.environment-action-form .button-secondary {
    width: 100%;
}

.gate-open {
    background: #d1fae5;
    color: #047857;
}

.gate-locked {
    background: #fee2e2;
    color: #b91c1c;
}

.gate-check-list,
.readiness-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.gate-check-list li,
.readiness-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: #334155;
}

.gate-check-list li {
    grid-template-columns: auto minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.gate-check-list li strong,
.gate-check-list li em {
    display: block;
}

.gate-check-list li em {
    color: var(--muted);
    font-style: normal;
}

.gate-check-list li span,
.readiness-list li span {
    min-width: 44px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 900;
}

.gate-check-list li.passed span,
.readiness-list li.passed span {
    background: #d1fae5;
    color: #047857;
}

.readiness-list li.check-pass span {
    background: #d1fae5;
    color: #047857;
}

.readiness-list li.check-warning span {
    background: #fef3c7;
    color: #b45309;
}

.readiness-list li.check-fail span {
    background: #fee2e2;
    color: #b91c1c;
}

.release-blocked-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff1f2;
    color: #b91c1c;
    font-weight: 800;
    line-height: 1.45;
}

.site-activity-list {
    display: grid;
    gap: 12px;
}

.site-activity-list div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.site-activity-list span {
    color: var(--muted);
    font-size: 0.92rem;
}

.site-notes-card {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.site-notes-card h2 {
    margin: 0 0 8px;
}

.site-notes-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.release-source-pill {
    margin-left: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.78rem;
}

.release-builder-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.release-environment-metrics,
.release-build-strip,
.latest-build-grid {
    display: grid;
    gap: 16px;
}

.release-environment-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.release-environment-metrics div,
.release-build-strip div,
.latest-build-grid div {
    display: grid;
    gap: 6px;
}

.release-environment-metrics span,
.release-build-strip span,
.latest-build-grid span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.release-environment-metrics strong,
.release-build-strip strong,
.latest-build-grid strong {
    overflow-wrap: anywhere;
}

.release-build-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px -22px -22px;
    padding: 18px 22px;
    border-top: 1px solid var(--line);
    background: #f8fbff;
    border-radius: 0 0 22px 22px;
}

.build-release-card {
    grid-column: 1;
}

.release-history-card {
    grid-column: 2;
}

.latest-build-card {
    grid-column: 1 / -1;
}

.release-form {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
}

.release-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.release-form label span {
    color: var(--muted);
    font-weight: 800;
}

.release-form input,
.release-form select,
.release-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
}

.release-form small {
    color: var(--muted);
    line-height: 1.45;
}

.release-form-actions {
    grid-column: 1 / -1;
}

.release-auto-detected {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #ccebdd;
    border-radius: 16px;
    background: #f0fdf4;
    color: #166534;
}

.foundation-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.foundation-form textarea,
.foundation-form input,
.foundation-form select,
.release-target-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px 13px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
}

.emergency-override-form {
    border-top-color: #fecaca;
}

.mode-tracking-form {
    margin-top: 18px;
}

.release-auto-detected strong,
.release-auto-detected span {
    display: block;
}

.readiness-list li {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.readiness-list em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.latest-build-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

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

.button-as-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.release-status-draft {
    background: #eef2ff;
    color: #3730a3;
}

.release-status-available {
    background: #d1fae5;
    color: #047857;
}

.release-status-archived {
    background: #f1f5f9;
    color: #475569;
}

.release-status-failed {
    background: #fee2e2;
    color: #b91c1c;
}

.release-build-log {
    max-height: 260px;
    margin: 14px 0 18px;
    padding: 14px;
    overflow: auto;
    border: 1px solid #d4e2f7;
    border-radius: 16px;
    background: #0b1730;
    color: #e8f0ff;
    font-size: 0.86rem;
    line-height: 1.55;
}

.release-info-banner {
    margin: 0;
    color: var(--accent-strong);
    font-weight: 800;
}

.form-check {
    flex-direction: row;
    align-items: center;
    align-self: end;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.form-check input {
    width: auto;
}

.environment-switcher {
    max-width: 360px;
    margin-bottom: 18px;
}

.test-site-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.test-site-side {
    display: grid;
    gap: 22px;
}

.test-site-section-divider {
    margin: 28px 0 18px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.test-site-section-divider h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.test-site-section-divider p {
    margin: 0;
    color: var(--muted);
}

.connection-string-block {
    margin: 18px 0;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 245, 0.86));
    color: var(--ink);
    white-space: pre-wrap;
    overflow-x: auto;
}

.connection-string-block code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
    line-height: 1.7;
}

.setup-step-list {
    margin: 0 0 20px;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.7;
}

.setup-step-list li + li {
    margin-top: 8px;
}

.deployment-credential-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.deployment-credential-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.deployment-credential-section h3 {
    margin: 0 0 14px;
}

.support-roles-page {
    display: grid;
    gap: 22px;
}

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

.section-heading h2 {
    margin: 4px 0;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

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

.role-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    display: grid;
    gap: 14px;
}

.role-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.role-card label,
.role-card .check-row {
    display: grid;
    gap: 6px;
}

.role-card input[type="text"],
.role-card select,
.role-card textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px 13px;
    font: inherit;
}

.role-toggles,
.permission-checks {
    display: grid;
    gap: 8px;
}

.permission-checks {
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
}

.status-pill.status-green {
    background: #dcfce7;
    color: #047857;
}

.status-pill.status-muted {
    background: #eef2f7;
    color: #64748b;
}

@media (max-width: 1180px) {
    .site-detail-grid,
    .release-builder-grid,
    .test-site-layout {
        grid-template-columns: 1fr;
    }

    .environment-summary-card,
    .build-release-card,
    .release-history-card,
    .latest-build-card {
        grid-column: auto;
    }

    .latest-build-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header-actions,
    .release-source-banner,
    .site-notes-card,
    .site-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .release-source-banner .button-primary {
        margin-left: 0;
    }

    .site-info-list div,
    .environment-actions,
    .quick-actions-grid,
    .release-environment-metrics,
    .release-build-strip,
    .release-form,
    .latest-build-grid,
    .readiness-list li {
        grid-template-columns: 1fr;
    }

    .readiness-list em {
        text-align: left;
    }
}
