* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
}

body {
    color: #11263b;
    background:
        radial-gradient(circle at top left, rgba(38, 184, 178, 0.12), transparent 22%),
        linear-gradient(180deg, #f7fafc 0%, #eef3f7 100%);
}

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

.auth-body {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(340px, 0.95fr);
}

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

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    color: rgba(244, 248, 252, 0.94);
    background:
        radial-gradient(circle at top right, rgba(38, 184, 178, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(10, 26, 43, 0.98), rgba(18, 43, 69, 0.96));
}

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

.auth-hero p {
    margin: 0;
    max-width: 36rem;
    line-height: 1.7;
    color: rgba(228, 236, 245, 0.8);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-note,
.sidebar-note,
.sidebar-profile,
.nested-card {
    border-radius: 18px;
    border: 1px solid rgba(17, 38, 59, 0.08);
}

.auth-note {
    max-width: 430px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-note strong,
.sidebar-profile strong,
.brand-lockup strong {
    display: block;
}

.auth-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.auth-card-panel,
.panel-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 38, 59, 0.1);
    box-shadow: 0 24px 54px rgba(11, 30, 49, 0.1);
}

.auth-card-panel {
    width: min(500px, 100%);
    padding: 28px;
    border-radius: 24px;
}

.auth-card-head h2,
.section-heading h2,
.page-header h1 {
    margin: 0;
}

.auth-card-head p,
.page-header p,
.section-heading p,
.cell-subcopy,
.support-copy,
.sidebar-note,
.sidebar-profile span,
.sidebar-profile small,
.empty-state span {
    color: #5d7289;
    line-height: 1.65;
}

.stacked-form,
.filter-row {
    display: grid;
    gap: 16px;
}

.stacked-form label,
.filter-row label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(17, 38, 59, 0.14);
    background: #f4f8fb;
    color: #11263b;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: rgba(38, 184, 178, 0.5);
    box-shadow: 0 0 0 4px rgba(38, 184, 178, 0.12);
    background: #ffffff;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.check-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: #26b8b2;
}

.button-primary,
.button-link,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.button-primary,
.button-link {
    background: #11263b;
    color: #ffffff;
}

.button-secondary {
    background: rgba(17, 38, 59, 0.08);
    color: #18314b;
}

.button-danger {
    background: rgba(231, 74, 59, 0.1);
    color: #d73526;
    border: 1px solid rgba(231, 74, 59, 0.22);
}

.support-copy {
    margin-top: 18px;
}

.support-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.support-summary-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 38, 59, 0.1);
    box-shadow: 0 18px 42px rgba(11, 30, 49, 0.08);
}

.support-summary-card span,
.support-summary-card small {
    display: block;
    color: #5d7289;
}

.support-summary-card span {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.support-summary-blue {
    border-color: rgba(38, 184, 178, 0.24);
}

.support-summary-amber {
    border-color: rgba(180, 126, 26, 0.24);
}

.support-summary-red {
    border-color: rgba(231, 74, 59, 0.24);
}

.support-summary-purple {
    border-color: rgba(110, 84, 235, 0.22);
}

.support-summary-green {
    border-color: rgba(49, 201, 128, 0.22);
}

.support-toolbar {
    display: grid;
    gap: 16px;
}

.support-tabs,
.support-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.support-tabs a,
.support-quick-filters a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(17, 38, 59, 0.06);
    color: #18314b;
    font-weight: 800;
}

.support-tabs a.active,
.support-tabs a:hover,
.support-quick-filters a.active,
.support-quick-filters a:hover {
    background: #11263b;
    color: #ffffff;
}

.support-tabs strong,
.support-quick-filters strong {
    min-width: 26px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 12px;
}

.support-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.support-filter-grid label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
}

.support-filter-grid .filter-wide {
    grid-column: span 2;
}

.support-filter-switches,
.support-filter-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

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

.support-ticket-title {
    margin-top: 4px;
    font-weight: 800;
}

.support-pill,
.support-signal {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.support-pill-neutral,
.support-signal {
    background: rgba(17, 38, 59, 0.08);
    color: #18314b;
}

.support-pill-danger {
    background: rgba(231, 74, 59, 0.12);
    color: #d73526;
}

.support-pill-warn {
    background: rgba(180, 126, 26, 0.14);
    color: #795617;
}

.support-pill-calm,
.support-pill-success {
    background: rgba(49, 201, 128, 0.16);
    color: #107244;
}

.support-pill-info {
    background: rgba(38, 184, 178, 0.14);
    color: #0e6b67;
}

.support-signal-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.support-signal.warning {
    background: rgba(180, 126, 26, 0.14);
    color: #795617;
}

.support-activity-item,
.support-category-row {
    padding: 14px 0;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
}

.support-activity-item:first-of-type,
.support-category-row:first-of-type {
    border-top: 0;
}

.support-activity-item strong,
.support-activity-item span,
.support-activity-item small,
.support-category-row span,
.support-category-row strong {
    display: block;
}

.support-activity-item span {
    margin-top: 4px;
    font-weight: 800;
}

.support-activity-item small {
    margin-top: 4px;
    color: #5d7289;
}

.support-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-category-row strong {
    min-width: 30px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(38, 184, 178, 0.14);
    color: #0e6b67;
}

.control-body {
    padding: 22px;
}

.control-shell {
    min-height: calc(100vh - 44px);
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 24px 54px rgba(11, 30, 49, 0.12);
    backdrop-filter: blur(16px);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px 22px;
    color: rgba(244, 248, 252, 0.94);
    background:
        radial-gradient(circle at top right, rgba(38, 184, 178, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(10, 26, 43, 0.98), rgba(18, 43, 69, 0.96));
}

.brand-lockup span,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-size: 28px;
    line-height: 1;
}

.brand-lockup span {
    margin-top: 4px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(222, 234, 244, 0.74);
}

.brand-lockup small {
    margin-top: 10px;
    color: rgba(222, 234, 244, 0.68);
}

.sidebar-note,
.sidebar-profile {
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.sidebar-profile img {
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-profile-card {
    display: grid;
    gap: 10px;
}

.sidebar-profile-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-profile-card img,
.sidebar-avatar-fallback {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 50%;
}

.sidebar-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 900;
}

.sidebar-profile-copy {
    min-width: 0;
}

.sidebar-profile-copy strong,
.sidebar-profile-copy small {
    display: block;
}

.sidebar-profile-copy strong {
    color: #ffffff;
    font-weight: 900;
}

.sidebar-profile-copy small {
    margin-top: 2px;
    color: rgba(222, 234, 244, 0.86);
}

.sidebar-profile-card form {
    margin: 0;
}

.sidebar-logout-link {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(244, 248, 252, 0.94);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.sidebar-logout-link:hover {
    background: rgba(255, 255, 255, 0.14);
}

.nav-group {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(244, 248, 252, 0.94);
    font-size: 14px;
    font-weight: 600;
}

.nav-link span,
.nav-link strong,
.nav-link small {
    display: block;
}

.nav-link strong {
    color: rgba(244, 248, 252, 0.96);
    font-size: 14px;
    line-height: 1.2;
}

.nav-link small {
    margin-top: 2px;
    color: rgba(222, 234, 244, 0.7);
    font-size: 11px;
    line-height: 1.25;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(38, 184, 178, 0.16);
}

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

.nav-section-title {
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 6px;
    color: rgba(244, 248, 252, 0.94);
    font-size: 15px;
    font-weight: 800;
}

.support-subnav {
    display: grid;
    gap: 7px;
    padding-left: 10px;
}

.support-subnav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 13px;
    color: rgba(244, 248, 252, 0.94);
    font-size: 14px;
    font-weight: 600;
}

.support-subnav a.active,
.support-subnav a:hover {
    background: rgba(38, 184, 178, 0.16);
}

.support-subnav strong {
    min-width: 28px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-spacer {
    flex: 1 1 auto;
}

.sidebar-logout {
    width: 100%;
}

.control-main {
    padding: 24px;
    display: grid;
    gap: 18px;
}

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

.page-header p {
    margin: 8px 0 0;
}

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

.meta-chip,
.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.meta-chip {
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(17, 38, 59, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.flash-banner {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(38, 184, 178, 0.12);
    color: #18314b;
}

.flash-error {
    background: rgba(180, 61, 61, 0.1);
    color: #8f2d2d;
}

.flash-banner ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

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

.privacy-banner,
.warning-card {
    border: 1px solid rgba(180, 126, 26, 0.22);
    background: rgba(255, 244, 222, 0.86);
    color: #5f4315;
}

.privacy-banner {
    line-height: 1.7;
}

.security-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, rgba(38, 184, 178, 0.12), rgba(255, 255, 255, 0.96));
}

.security-hero h2,
.security-hero p {
    margin: 0;
}

.security-hero h2 {
    margin-top: 6px;
}

.security-hero p {
    margin-top: 8px;
    color: #5d7289;
    line-height: 1.6;
}

.security-status-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.security-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.security-two-factor-card,
.security-side-stack {
    display: grid;
    gap: 18px;
}

.security-setup-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.security-qr-card,
.security-start-box,
.security-secret-box {
    border: 1px solid rgba(17, 38, 59, 0.1);
    border-radius: 18px;
    background: #f7fafc;
}

.security-qr-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    text-align: center;
}

.security-qr-svg {
    width: min(100%, 245px);
    height: auto;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(17, 38, 59, 0.08);
}

.security-qr-card p,
.security-setup-copy p,
.security-start-box p,
.security-app-card p,
.security-log-card p {
    margin: 0;
    color: #5d7289;
    line-height: 1.6;
}

.security-setup-copy h3 {
    margin: 0 0 10px;
}

.security-step-list,
.security-rule-list,
.security-app-grid ul {
    margin: 0;
    padding-left: 20px;
    color: #5d7289;
    line-height: 1.7;
}

.security-secret-box {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    padding: 14px;
}

.security-secret-box span {
    color: #5d7289;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.security-secret-box code {
    overflow-wrap: anywhere;
    font-family: Consolas, "Courier New", monospace;
    font-size: 1rem;
    font-weight: 800;
    color: #11263b;
}

.security-start-box {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding: 16px;
}

.security-enabled-box {
    background: rgba(49, 201, 128, 0.1);
}

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

.security-app-grid strong {
    display: block;
    margin-bottom: 8px;
}

.security-rule-list li + li,
.security-app-grid li + li {
    margin-top: 6px;
}

.security-log-card {
    margin-top: 0;
}

.security-log-card .table-wrap {
    max-height: 420px;
    overflow: auto;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip-on {
    background: rgba(38, 184, 178, 0.14);
    color: #0e6b67;
}

.chip-warn {
    background: rgba(180, 126, 26, 0.14);
    color: #795617;
}

.code-block {
    overflow-x: auto;
    margin: 12px 0 0;
    padding: 14px;
    border-radius: 14px;
    background: #0f2538;
    color: #eef8fb;
    white-space: pre-wrap;
}

.preline {
    white-space: pre-line;
}

.timeline-item {
    margin-top: 12px;
}

.kpi-grid,
.content-grid,
.card-grid,
.form-grid,
.toggle-grid,
.permission-grid {
    display: grid;
    gap: 16px;
}

.kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 38, 59, 0.1);
}

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

.kpi-card-link {
    display: block;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.kpi-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 60px rgba(11, 30, 49, 0.14);
}

.kpi-label {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5d7289;
}

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

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

.nested-card {
    padding: 18px;
    background: #f7fafc;
}

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

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

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

.permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 8px;
}

.permission-group-stack {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.permission-group-card,
.scope-summary,
.metric-tile {
    border-radius: 18px;
    border: 1px solid rgba(17, 38, 59, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.permission-group-card {
    padding: 14px;
}

.permission-group-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.permission-group-heading h3 {
    margin: 0;
    font-size: 1rem;
}

.permission-group-heading span {
    color: #5d7289;
    font-size: 13px;
}

.permission-option {
    align-items: flex-start;
}

.permission-option strong {
    display: block;
}

.permission-badges,
.scope-summary .chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.scope-summary {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 14px;
}

.danger-copy {
    color: #ad362e;
    font-weight: 700;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-tile {
    padding: 14px;
}

.metric-tile span {
    display: block;
    color: #5d7289;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metric-tile strong {
    display: block;
    margin-top: 6px;
    font-size: 1.7rem;
}

.storage-meter {
    display: grid;
    gap: 10px;
}

.storage-meter p {
    margin: 0;
}

.storage-meter-bar {
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(17, 38, 59, 0.08);
}

.storage-meter-bar span {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #26b8b2, #18314b);
}

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

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

.table th,
.table td {
    padding: 14px 12px;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
    text-align: left;
    vertical-align: top;
}

.table thead th {
    border-top: 0;
    color: #5d7289;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cell-subcopy {
    margin-top: 4px;
    font-size: 13px;
}

.user-card .inset-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    background: #f7fafc;
    border: 1px dashed rgba(17, 38, 59, 0.18);
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
}

.filter-row {
    grid-template-columns: 180px 180px minmax(0, 1fr) auto;
    align-items: end;
}

.mobile-filter-row {
    grid-template-columns: repeat(6, minmax(150px, 1fr)) auto auto;
}

.compact-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-form select {
    min-width: 150px;
}

.filter-grow {
    min-width: 220px;
}

.pagination-row {
    margin-top: 16px;
}

.text-link {
    color: #18314b;
    font-weight: 700;
}

.profile-tabs {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 4px 0 8px;
}

.profile-tabs a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 3px solid transparent;
    color: #18314b;
    font-weight: 800;
}

.profile-tabs a.active,
.profile-tabs a:hover {
    border-color: #26b8b2;
    color: #0e6b67;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 22px;
    margin-bottom: 22px;
}

.profile-grid-main {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
}

.profile-grid-secondary {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.profile-grid-secondary #preferences {
    padding: 24px;
}

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

.profile-card {
    padding: 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(17, 38, 59, 0.1);
    box-shadow: 0 24px 54px rgba(11, 30, 49, 0.1);
}

.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;
}

.profile-card-head p,
.profile-photo-panel p,
.profile-form small,
.profile-toggle-row small,
.profile-security-list p {
    margin: 6px 0 0;
    color: #5d7289;
    line-height: 1.55;
}

.profile-card-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 900;
}

.tone-blue {
    background: rgba(38, 184, 178, 0.14);
    color: #0e6b67;
}

.tone-green {
    background: rgba(49, 201, 128, 0.16);
    color: #107244;
}

.tone-amber {
    background: rgba(246, 180, 74, 0.18);
    color: #9b6410;
}

.tone-purple {
    background: rgba(110, 84, 235, 0.12);
    color: #5134c6;
}

.profile-information-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 240px);
    gap: 20px;
    align-items: start;
}

.profile-password-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
}

.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;
    font-weight: 800;
}

.profile-form label span,
.profile-preferences-form label > span {
    color: #18314b;
}

.profile-form label span strong {
    color: #d73526;
}

.profile-form input,
.profile-form select,
.profile-preferences-form select,
.password-field input {
    width: 100%;
}

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

.profile-action-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

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

.profile-photo-panel {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid rgba(17, 38, 59, 0.1);
    text-align: center;
}

.profile-avatar-large {
    width: 112px;
    height: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #dff8f5, #e9f1ff);
    color: #0e6b67;
    font-size: 34px;
    font-weight: 900;
    overflow: hidden;
}

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

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

.profile-drop-zone {
    min-height: 96px;
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 16px;
    border: 1px dashed rgba(38, 184, 178, 0.55);
    border-radius: 16px;
    background: #f7fafc;
    cursor: pointer;
}

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

.profile-drop-zone.is-dragging {
    background: rgba(38, 184, 178, 0.12);
}

.profile-drop-zone span {
    color: #5d7289;
    font-weight: 600;
}

.profile-remove-photo {
    min-height: 42px;
}

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

.profile-summary-list div {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid rgba(17, 38, 59, 0.1);
}

.profile-summary-list div:first-child {
    border-top: 0;
}

.profile-summary-list dt {
    color: #5d7289;
    font-weight: 800;
}

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

.profile-summary-list dd small {
    display: block;
    margin-top: 4px;
    color: #5d7289;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.profile-badge-success {
    background: rgba(49, 201, 128, 0.16);
    color: #107244;
}

.profile-badge-danger {
    background: rgba(231, 74, 59, 0.12);
    color: #d73526;
}

.profile-badge-info {
    background: rgba(110, 84, 235, 0.12);
    color: #5134c6;
}

.profile-badge-neutral {
    background: rgba(17, 38, 59, 0.08);
    color: #18314b;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.password-field input {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-right: 78px;
}

.password-field button {
    grid-column: 2;
    grid-row: 1;
    min-height: 34px;
    margin-right: 8px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #0e6b67;
    cursor: pointer;
    font-weight: 900;
}

.profile-requirements {
    padding: 20px;
    border-radius: 18px;
    background: rgba(38, 184, 178, 0.08);
    border: 1px solid rgba(38, 184, 178, 0.2);
}

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

.profile-preferences-form {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 20px;
}

.profile-preferences-form > label:not(.profile-toggle-row) {
    grid-column: span 3;
}

.profile-grid-secondary #preferences .profile-card-head {
    margin-bottom: 16px;
}

.profile-grid-secondary #preferences .profile-preferences-form {
    gap: 12px;
}

.profile-toggle-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    grid-column: span 2;
    min-height: 94px;
    padding: 16px;
    border: 1px solid rgba(17, 38, 59, 0.1);
    border-radius: 16px;
    background: #f7fafc;
}

.profile-preferences-form .profile-save-button {
    grid-column: 1 / -1;
}

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

.profile-toggle-row input[type="checkbox"] {
    width: 48px;
    min-width: 48px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 999px;
    background: rgba(17, 38, 59, 0.16);
    appearance: none;
    cursor: pointer;
    position: relative;
}

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

.profile-toggle-row input[type="checkbox"]:checked {
    background: #26b8b2;
}

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

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

.profile-security-list div {
    min-height: 140px;
    padding: 18px;
    border-radius: 18px;
    background: #f7fafc;
    border: 1px solid rgba(17, 38, 59, 0.1);
}

.profile-security-list strong {
    display: block;
    margin-bottom: 10px;
}

.profile-activity-card .table-wrap {
    max-height: 360px;
    overflow: auto;
}

.profile-modal-active {
    overflow: hidden;
}

.profile-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    place-items: center;
    padding: 24px;
}

.profile-modal.is-open {
    display: grid;
}

.profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 39, 0.58);
    backdrop-filter: blur(5px);
}

.profile-modal-dialog {
    position: relative;
    width: min(900px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(17, 38, 59, 0.12);
    box-shadow: 0 30px 80px rgba(8, 24, 39, 0.35);
}

.profile-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.profile-modal-head .profile-card-head {
    margin-bottom: 0;
}

.profile-modal-close {
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: rgba(17, 38, 59, 0.08);
    color: #18314b;
    cursor: pointer;
    font-weight: 800;
}

.profile-password-modal-layout {
    margin-top: 18px;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.panel-head,
.site-header-actions,
.environment-action-row,
.action-stack,
.environment-switcher {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-head,
.environment-action-row {
    align-items: flex-start;
    justify-content: space-between;
}

.panel-head {
    margin-bottom: 18px;
}

.panel-head h2,
.deployment-credential-section h3 {
    margin: 0;
}

.panel-head p,
.subtle {
    margin: 6px 0 0;
    color: #5d7289;
    line-height: 1.65;
}

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

.environment-action-row {
    margin: 14px 0 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(17, 38, 59, 0.04);
    border: 1px solid rgba(17, 38, 59, 0.08);
}

.environment-switcher {
    align-items: end;
    margin-bottom: 18px;
}

.environment-switcher label {
    min-width: 260px;
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.deployment-credential-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
}

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

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

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

.detail-list div {
    display: grid;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
}

.detail-list div:first-child {
    border-top: 0;
}

.detail-list dt {
    color: #5d7289;
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
}

.action-stack {
    margin-top: 18px;
    flex-direction: column;
}

.action-stack form,
.action-stack button {
    width: 100%;
}

.secret-warning {
    margin-bottom: 18px;
}

.secret-block {
    overflow-x: auto;
    margin: 10px 0;
    padding: 12px;
    border-radius: 12px;
    background: #0f2538;
    color: #eef8fb;
    font-family: Consolas, "Courier New", monospace;
    word-break: break-all;
}

.release-info-banner {
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(38, 184, 178, 0.1);
    color: #0e6b67;
    line-height: 1.6;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(17, 38, 59, 0.08);
    color: #18314b;
    font-size: 13px;
    font-weight: 900;
}

.gate-open {
    background: rgba(49, 201, 128, 0.16);
    color: #107244;
}

.gate-locked {
    background: rgba(180, 126, 26, 0.16);
    color: #795617;
}

.release-target-form {
    margin: 18px 0;
}

.release-target-form label,
.foundation-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

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

.gate-check-list li {
    display: grid;
    grid-template-columns: 58px minmax(160px, 0.5fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: rgba(180, 126, 26, 0.08);
    border: 1px solid rgba(180, 126, 26, 0.14);
}

.gate-check-list li.passed {
    background: rgba(49, 201, 128, 0.08);
    border-color: rgba(49, 201, 128, 0.16);
}

.gate-check-list li span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(180, 126, 26, 0.18);
    color: #795617;
    font-size: 11px;
    font-weight: 900;
}

.gate-check-list li.passed span {
    background: rgba(49, 201, 128, 0.18);
    color: #107244;
}

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

.gate-check-list li em {
    color: #5d7289;
    font-style: normal;
}

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

.foundation-form {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(17, 38, 59, 0.04);
    border: 1px solid rgba(17, 38, 59, 0.08);
}

.emergency-override-form {
    border-color: rgba(231, 74, 59, 0.18);
    background: rgba(231, 74, 59, 0.06);
}

.test-site-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

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

.test-site-section-divider {
    margin: 24px 0 16px;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 38, 59, 0.08);
}

.test-site-section-divider h3,
.test-site-section-divider p {
    margin: 0;
}

.test-site-section-divider p {
    margin-top: 6px;
    color: #5d7289;
    line-height: 1.6;
}

.connection-string-block {
    overflow-x: auto;
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    background: #0f2538;
    color: #eef8fb;
    white-space: pre-wrap;
}

.connection-string-block code {
    font-family: Consolas, "Courier New", monospace;
}

.setup-step-list {
    margin: 0 0 18px;
    padding-left: 22px;
    color: #5d7289;
    line-height: 1.7;
}

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

.release-builder-grid .panel-card:first-child {
    min-width: 0;
}

.release-source-details {
    margin-bottom: 18px;
}

.release-source-banner {
    border-color: rgba(38, 184, 178, 0.2);
    background: rgba(235, 252, 250, 0.88);
}

.release-command-list {
    display: grid;
    gap: 10px;
}

.release-command-list code {
    display: block;
    padding: 12px;
    border-radius: 12px;
    background: #0f2538;
    color: #eef8fb;
    white-space: pre-wrap;
}

.release-action-form {
    margin-bottom: 10px;
}

.release-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.release-row-actions form {
    display: inline;
}

.release-row-actions button.text-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

@media (max-width: 1180px) {
    .kpi-grid,
    .content-grid,
    .card-grid,
    .form-grid,
    .toggle-grid,
    .permission-grid,
    .filter-row,
    .mobile-filter-row,
    .profile-grid,
    .profile-information-layout,
    .profile-password-layout,
    .profile-security-list,
    .support-summary-grid,
    .support-filter-grid,
    .support-workspace-grid,
    .panel-grid,
    .foundation-form-grid,
    .test-site-layout,
    .security-layout,
    .security-setup-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .gate-check-list li {
        grid-template-columns: 1fr;
    }

    .support-filter-grid .filter-wide {
        grid-column: auto;
    }

    .profile-photo-panel {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid rgba(17, 38, 59, 0.1);
        padding-top: 22px;
    }

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

    .profile-preferences-form > label:not(.profile-toggle-row),
    .profile-toggle-row {
        grid-column: span 3;
    }
}

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

@media (max-width: 720px) {
    .auth-hero,
    .auth-card,
    .control-main,
    .sidebar {
        padding: 20px;
    }

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

    .profile-preferences-form > label:not(.profile-toggle-row),
    .profile-toggle-row {
        grid-column: 1 / -1;
    }

    .security-hero,
    .security-status-strip {
        justify-content: flex-start;
    }

    .security-hero {
        flex-direction: column;
    }

    .security-app-grid {
        grid-template-columns: 1fr;
    }

    .control-body {
        padding: 12px;
    }
}
