:root {
    --bg: #f6eceb;
    --bg-deep: #eac6c6;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-solid: #ffffff;
    --surface-soft: #fff7f6;
    --text: #1f1716;
    --muted: #6a514f;
    --primary: #be3a34;
    --primary-dark: #8f2824;
    --primary-soft: #f4d6d5;
    --accent: #235f4c;
    --accent-soft: #e7f1ed;
    --border: rgba(190, 58, 52, 0.18);
    --border-strong: rgba(159, 47, 43, 0.3);
    --shadow: 0 24px 60px rgba(63, 20, 18, 0.12);
    --shadow-soft: 0 14px 34px rgba(63, 20, 18, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

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

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at 8% 0%, rgba(190, 58, 52, 0.14), transparent 30rem),
        radial-gradient(circle at 92% 8%, rgba(234, 198, 198, 0.72), transparent 34rem),
        linear-gradient(180deg, #fff9f8 0%, var(--bg) 42%, #f3dfdd 100%);
    color: var(--text);
    font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.72)),
        url("../img/jano-pattern.svg");
    background-size: 520px;
    opacity: 0.38;
    pointer-events: none;
}

a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    text-underline-offset: 0.18em;
}

a:hover,
a:focus {
    color: var(--primary);
    text-decoration: underline;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 58px);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 252, 251, 0.9);
    box-shadow: 0 12px 30px rgba(63, 20, 18, 0.08);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 13px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand:hover,
.brand:focus {
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 12px 22px rgba(190, 58, 52, 0.24);
}

.brand-logo {
    display: block;
    width: auto;
    max-width: min(260px, 42vw);
    height: 42px;
    object-fit: contain;
}

.brand-name {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.site-nav a,
.link-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.site-nav a:hover,
.site-nav a:focus,
.link-button:hover,
.link-button:focus {
    background: var(--primary-soft);
    color: var(--primary-dark);
    text-decoration: none;
}

.inline-form {
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.site-main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px) 0 clamp(30px, 5vw, 58px);
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
    gap: clamp(24px, 4vw, 52px);
    min-height: 520px;
    overflow: hidden;
    align-items: stretch;
    padding: clamp(28px, 5vw, 62px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.24), transparent 24rem),
        linear-gradient(145deg, #7d231f 0%, var(--primary) 48%, #d17871 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/jano-pattern.svg");
    background-size: 420px;
    opacity: 0.15;
    pointer-events: none;
}

.hero-content,
.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
}

.hero-visual {
    min-height: 360px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(63, 20, 18, 0.1), rgba(63, 20, 18, 0.38)),
        url("../img/fons.jpeg") center / cover;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 22px 45px rgba(63, 20, 18, 0.22);
}

.hero-visual::after {
    content: "JANO";
    position: absolute;
    right: 24px;
    bottom: 20px;
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-dark);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-tags span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    padding: 6px 12px;
    font-size: 0.86rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.home-hero-visual {
    display: grid;
    align-content: end;
    gap: 14px;
    padding: 18px;
}

.home-hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.2), transparent 12rem),
        linear-gradient(180deg, transparent 28%, rgba(63, 20, 18, 0.48) 100%);
}

.hero-floating-card {
    position: relative;
    z-index: 1;
    width: min(100%, 280px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    padding: 16px 18px;
    box-shadow: 0 18px 34px rgba(63, 20, 18, 0.18);
    backdrop-filter: blur(10px);
}

.hero-floating-card-main {
    justify-self: start;
}

.hero-floating-card-soft {
    justify-self: end;
    background: rgba(255, 250, 249, 0.76);
}

.floating-label {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-floating-card strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.18;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ffe1dc;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(2.15rem, 5vw, 4.75rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

h2 {
    margin: 0 0 8px;
    font-size: 1.16rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h3 {
    margin: 0 0 8px;
}

.lead {
    max-width: 650px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 19px;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.button:hover,
.button:focus {
    text-decoration: none;
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 14px 24px rgba(190, 58, 52, 0.22);
}

.hero .button.primary {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 14px 26px rgba(63, 20, 18, 0.18);
}

.button.primary:hover,
.button.primary:focus {
    background: linear-gradient(145deg, var(--primary-dark), #681a17);
    color: #fff;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--border-strong);
    color: var(--primary-dark);
}

.hero .button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.56);
    color: #fff;
}

.button.secondary:hover,
.button.secondary:focus {
    background: var(--primary-soft);
}

.button.full {
    width: 100%;
}

.toolbar,
.form-actions,
.status-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin: 24px 0;
}

.toolbar form,
.status-actions form {
    margin: 0;
}

.filter-panel,
.admin-form {
    display: grid;
    gap: 14px;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 214, 213, 0.58), transparent 16rem),
        var(--surface);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.filter-panel {
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(140px, 1fr)) auto auto;
    align-items: end;
}

.incidents-filter {
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(140px, 1fr));
}

.filter-panel input,
.filter-panel select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.stacked-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(106, 81, 79, 0.22);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.filter-panel input:focus,
.filter-panel select:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.stacked-form input:focus {
    border-color: rgba(190, 58, 52, 0.58);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(190, 58, 52, 0.12);
}

.admin-form label,
.stacked-form label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-weight: 800;
}

.admin-form textarea {
    resize: vertical;
}

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

.compact-form {
    max-width: 720px;
}

.checkbox-list,
.radio-list {
    display: grid;
    gap: 10px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.62);
    padding: 16px;
}

.checkbox-list legend,
.radio-list legend {
    padding: 0 6px;
    font-weight: 900;
}

.checkbox-list label,
.check-line,
.radio-list label {
    display: flex;
    gap: 9px;
    align-items: center;
    font-weight: 600;
}

.checkbox-list input,
.check-line input,
.radio-list input {
    width: auto;
    min-height: auto;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(190, 58, 52, 0.12);
    text-align: left;
    vertical-align: top;
}

th {
    background: linear-gradient(180deg, #fff7f6 0%, #f7e8e7 100%);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

tbody tr {
    transition: background 0.14s ease;
}

tbody tr:hover {
    background: #fffafa;
}

tr:last-child td {
    border-bottom: 0;
}

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

.actions-cell a + a {
    margin-left: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    border: 1px solid rgba(35, 95, 76, 0.16);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #1d5745;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 900;
}

.muted {
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.detail-grid article {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 9px 14px;
    margin: 0;
}

dt {
    color: var(--muted);
    font-weight: 900;
}

dd {
    margin: 0;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
}

.one-column {
    grid-template-columns: 1fr;
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.comment-box {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.comment-box:first-of-type {
    padding-top: 0;
}

.internal-comment {
    border: 1px solid #e6c38d;
    border-radius: var(--radius-sm);
    margin: 10px 0;
    padding: 12px;
    background: #fff8ec;
}

.service-band,
.dashboard-grid,
.settings-list,
.home-access-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.service-band article,
.metric-card,
.settings-list article,
.home-access-panel article,
.auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 214, 213, 0.7), transparent 12rem),
        var(--surface);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.service-band article::before,
.metric-card::before,
.settings-list article::before,
.home-access-panel article::before {
    content: "";
    display: block;
    width: 48px;
    height: 5px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), rgba(190, 58, 52, 0.2));
}

.home-access-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.home-access-panel article {
    min-height: 210px;
    padding: 28px;
}

.home-access-panel article:first-child {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 247, 0.72)),
        url("../img/logos.png") center bottom 24px / min(82%, 520px) auto no-repeat;
}

.home-access-panel article:first-child::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 92px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 250, 249, 0.94));
    pointer-events: none;
}

.home-access-panel h2,
.home-access-panel p,
.home-access-panel a {
    position: relative;
    z-index: 1;
}

.home-access-number {
    position: absolute;
    right: 22px;
    top: 18px;
    color: rgba(190, 58, 52, 0.13);
    font-size: clamp(3.4rem, 7vw, 5.8rem);
    font-weight: 900;
    line-height: 1;
}

.home-access-panel a {
    display: inline-flex;
    margin-top: 10px;
    align-items: center;
}

.home-access-panel a::after {
    content: "";
    width: 24px;
    height: 1px;
    margin-left: 10px;
    background: currentColor;
    transition: width 0.16s ease;
}

.home-access-panel a:hover::after,
.home-access-panel a:focus::after {
    width: 36px;
}

.hero-access-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.hero-access-cards article {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 22px;
    box-shadow: 0 18px 34px rgba(63, 20, 18, 0.16);
    backdrop-filter: blur(10px);
}

.hero-access-cards article::before {
    content: "";
    display: block;
    width: 44px;
    height: 5px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), rgba(190, 58, 52, 0.2));
}

.hero-access-cards .home-access-number {
    color: rgba(190, 58, 52, 0.15);
    font-size: clamp(3rem, 5vw, 4.7rem);
}

.hero-access-cards h2,
.hero-access-cards p,
.hero-access-cards a {
    position: relative;
    z-index: 1;
}

.hero-access-cards p {
    margin: 0 0 10px;
    color: var(--muted);
}

.hero-access-cards a {
    display: inline-flex;
    align-items: center;
    color: var(--primary-dark);
}

.hero-access-cards a::after {
    content: "";
    width: 24px;
    height: 1px;
    margin-left: 10px;
    background: currentColor;
    transition: width 0.16s ease;
}

.hero-access-cards a:hover::after,
.hero-access-cards a:focus::after {
    width: 36px;
}

.institutional-logos {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    padding: clamp(10px, 2vw, 16px);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.institutional-logos img {
    display: block;
    width: min(100%, 560px);
    height: auto;
    margin: 0 auto;
}

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

.service-icon {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--primary-dark);
    color: #fff;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

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

.dashboard-hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    gap: clamp(20px, 4vw, 44px);
    overflow: hidden;
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.22), transparent 24rem),
        linear-gradient(145deg, #681a17 0%, var(--primary-dark) 42%, var(--primary) 100%);
    padding: clamp(26px, 4vw, 46px);
    color: #fff;
    box-shadow: var(--shadow);
}

.dashboard-hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 84px),
        radial-gradient(circle, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.5px);
    background-size: 84px 84px, 36px 36px;
    opacity: 0.28;
    pointer-events: none;
}

.dashboard-hero-copy,
.dashboard-hero-side {
    position: relative;
    z-index: 1;
}

.dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-hero-copy .eyebrow {
    color: #ffe1dc;
}

.dashboard-welcome {
    max-width: 640px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.dashboard-pill-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.dashboard-pill-row span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.dashboard-hero-side {
    min-height: 270px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(63, 20, 18, 0.05), rgba(63, 20, 18, 0.38)),
        url("../img/fons.jpeg") center / cover;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 22px 45px rgba(63, 20, 18, 0.2);
}

.dashboard-hero-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 22%, rgba(63, 20, 18, 0.48) 100%);
}

.dashboard-hero-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(78%, 260px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    padding: 16px;
    box-shadow: 0 18px 34px rgba(63, 20, 18, 0.18);
    backdrop-filter: blur(10px);
}

.dashboard-hero-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-hero-card strong {
    display: block;
    font-size: 1.12rem;
    line-height: 1.16;
}

.dashboard-section-heading {
    margin-top: 34px;
    max-width: 780px;
}

.dashboard-section-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.dashboard-action-card {
    position: relative;
    overflow: hidden;
    min-height: 235px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 214, 213, 0.7), transparent 12rem),
        rgba(255, 255, 255, 0.92);
    padding: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 48px rgba(63, 20, 18, 0.12);
}

.dashboard-action-card.featured {
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.22), transparent 12rem),
        linear-gradient(145deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.dashboard-action-card.featured p,
.dashboard-action-card.featured a {
    color: rgba(255, 255, 255, 0.88);
}

.dashboard-card-icon {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    box-shadow: inset 0 0 0 1px var(--border);
}

.dashboard-action-card.featured .dashboard-card-icon {
    background: rgba(255, 255, 255, 0.9);
}

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

.dashboard-action-card a {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
}

.dashboard-action-card a::after {
    content: "";
    width: 24px;
    height: 1px;
    margin-left: 10px;
    background: currentColor;
    transition: width 0.16s ease;
}

.dashboard-action-card a:hover::after,
.dashboard-action-card a:focus::after {
    width: 36px;
}

.dashboard-service-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.dashboard-service-strip article {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    padding: 20px;
    box-shadow: 0 12px 26px rgba(63, 20, 18, 0.06);
}

.dashboard-service-strip span {
    display: inline-flex;
    margin-bottom: 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 900;
}

.dashboard-service-strip p {
    color: var(--muted);
}

.metric-value {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    padding: 5px 11px;
    font-size: 0.88rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px var(--border);
}

.page-heading {
    max-width: 800px;
    border-left: 6px solid var(--primary);
    padding-left: 18px;
}

.page-heading p:not(.eyebrow),
.service-band p,
.metric-card p,
.settings-list p,
.auth-card p,
.status-page p {
    color: var(--muted);
}

.auth-shell {
    position: relative;
    display: grid;
    min-height: 66vh;
    overflow: hidden;
    place-items: center;
    gap: 18px;
    border-radius: var(--radius-lg);
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.26), transparent 12rem),
        radial-gradient(circle at 88% 18%, rgba(244, 214, 213, 0.34), transparent 18rem),
        radial-gradient(circle at 44% 118%, rgba(104, 26, 23, 0.48), transparent 22rem),
        linear-gradient(145deg, #681a17 0%, var(--primary-dark) 34%, var(--primary) 68%, #d17871 100%);
    box-shadow: var(--shadow-soft);
}

.auth-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 80px),
        radial-gradient(circle, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.5px);
    background-size: 80px 80px, 34px 34px;
    opacity: 0.34;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 76%);
    pointer-events: none;
}

.auth-card {
    width: min(430px, 100%);
    z-index: 1;
    background:
        radial-gradient(circle at 100% 0%, rgba(244, 214, 213, 0.72), transparent 12rem),
        rgba(255, 255, 255, 0.93);
    box-shadow: 0 24px 60px rgba(63, 20, 18, 0.2);
    backdrop-filter: blur(14px);
}

.auth-card h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.wide-auth {
    grid-template-columns: minmax(0, 470px) minmax(0, 390px);
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 42px);
}

.admin-access h2 {
    margin-top: 0;
}

.stacked-form {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.stacked-form button {
    margin-top: 10px;
}

.separator {
    height: 1px;
    margin: 22px 0;
    background: var(--border);
}

.alert {
    margin-top: 16px;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-weight: 700;
}

.alert.error {
    border: 1px solid #f2b6a6;
    background: #fff1ed;
    color: #8c301b;
}

.alert.success {
    border: 1px solid #a8d9c7;
    background: #edf9f4;
    color: #17624f;
}

.status-page {
    margin: 10vh auto;
    max-width: 560px;
    text-align: center;
}

.site-footer {
    padding: 24px clamp(18px, 4vw, 58px) 34px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.js-ready .hero,
.js-ready .page-heading,
.js-ready .dashboard-hero-panel,
.js-ready .dashboard-action-card,
.js-ready .dashboard-service-strip article,
.js-ready .auth-card,
.js-ready .metric-card,
.js-ready .service-band article,
.js-ready .home-access-panel article,
.js-ready .table-wrap,
.js-ready .filter-panel,
.js-ready .admin-form {
    animation: rise-in 0.5s ease both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .hero,
    .wide-auth {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 260px;
    }

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

    .home-services,
    .home-access-panel,
    .hero-access-cards,
    .dashboard-hero-panel,
    .dashboard-quick-grid,
    .dashboard-service-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-main {
        width: min(100% - 24px, 1180px);
        padding: 26px 0;
    }

    .brand-name {
        display: none;
    }

    .site-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .site-nav a,
    .link-button {
        white-space: nowrap;
    }

    .hero {
        min-height: 0;
        padding: 28px 20px;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 3.1rem);
    }

    .actions,
    .button {
        width: 100%;
    }

    .service-band,
    .dashboard-grid,
    .dashboard-quick-grid,
    .dashboard-service-strip,
    .settings-list,
    .home-access-panel,
    .hero-access-cards,
    .detail-grid,
    .form-grid,
    .filter-panel,
    .admin-actions-grid,
    .wide-auth {
        grid-template-columns: 1fr;
    }

    dl {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 720px;
    }
}

/* Phase 2: incidents Kanban and 360 detail */
.view-switcher {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kanban-heading {
    max-width: 980px;
}

.kanban-toolbar {
    justify-content: space-between;
}

.kanban-filter {
    grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(150px, 1fr)) auto auto;
}

.kanban-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.kanban-summary span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #ffffff;
    color: #475467;
    padding: 4px 10px;
    font-size: 0.84rem;
    font-weight: 800;
}

.kanban-feedback {
    position: sticky;
    top: 88px;
    z-index: 16;
    display: none;
    width: fit-content;
    max-width: min(100%, 520px);
    margin: 0 0 12px auto;
    border-radius: 8px;
    padding: 10px 12px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.12);
}

.kanban-feedback.is-visible {
    display: block;
    animation: rise-in 0.18s ease both;
}

.kanban-feedback.success {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.kanban-feedback.error {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.kanban-board {
    display: grid;
    grid-auto-columns: minmax(300px, 340px);
    grid-auto-flow: column;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.kanban-column {
    display: flex;
    min-height: 560px;
    max-height: calc(100vh - 230px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fafc;
    scroll-snap-align: start;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.kanban-column.is-drop-target {
    border-color: #8a1724;
    background: #fff7f7;
    box-shadow: 0 12px 30px rgba(138, 23, 36, 0.12);
}

.kanban-column-header {
    flex: 0 0 auto;
    border-bottom: 1px solid #e4e7ec;
    background: #ffffff;
    padding: 12px;
}

.kanban-column-header div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kanban-column-header strong {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 0.86rem;
}

.kanban-column-body {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 180px;
    overflow-y: auto;
    padding: 12px;
}

.kanban-card {
    position: relative;
    display: grid;
    gap: 12px;
    border: 1px solid #e4e7ec;
    border-left: 4px solid #667085;
    border-radius: 8px;
    background: #ffffff;
    padding: 13px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.kanban-card[draggable="true"] {
    cursor: grab;
}

.kanban-card:hover,
.kanban-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(16, 24, 40, 0.1);
}

.kanban-card.is-dragging {
    opacity: 0.56;
    cursor: grabbing;
}

.kanban-card.is-updating {
    opacity: 0.72;
}

.kanban-card.priority-alta {
    border-left-color: #dc6803;
}

.kanban-card.priority-crítica,
.kanban-card.priority-critica {
    border-left-color: #b42318;
}

.kanban-card.priority-baixa {
    border-left-color: #079455;
}

.kanban-card-top,
.kanban-card-footer,
.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kanban-card-top {
    justify-content: space-between;
}

.kanban-card h2 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.28;
    letter-spacing: 0;
}

.kanban-card h2 a {
    color: #101828;
}

.kanban-card-tags span,
.kanban-card-footer span {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.kanban-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin: 0;
}

.kanban-card-meta div {
    display: grid;
    gap: 2px;
}

.kanban-card-meta dt {
    color: #667085;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kanban-card-meta dd {
    overflow: hidden;
    color: #344054;
    font-size: 0.84rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kanban-card-footer {
    border-top: 1px solid #eef2f6;
    padding-top: 10px;
}

.kanban-empty[hidden] {
    display: none;
}

.incident-360-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    padding: clamp(18px, 3vw, 26px);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.incident-360-hero h1 {
    max-width: 980px;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.incident-360-badges,
.incident-360-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.incident-360-badges {
    margin-top: 14px;
}

.incident-360-hero-actions {
    justify-content: flex-end;
}

.incident-360-hero-actions form {
    margin: 0;
}

.incident-360-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.5fr) minmax(280px, 0.82fr);
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

.incident-360-left,
.incident-360-main,
.incident-360-right {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.incident-360-left,
.incident-360-right {
    position: sticky;
    top: 96px;
}

.incident-panel {
    min-width: 0;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.incident-panel-header {
    margin-bottom: 14px;
}

.incident-panel-header .eyebrow {
    margin-bottom: 5px;
    color: #8a1724;
    letter-spacing: 0.08em;
}

.incident-panel-header h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.incident-key-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
}

.incident-key-list div {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 10px;
}

.incident-key-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.incident-key-list dt {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.incident-key-list dd {
    color: #101828;
    font-weight: 800;
}

.sla-meter {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f6;
}

.sla-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #667085;
}

.sla-meter.tone-danger span {
    background: #b42318;
}

.sla-meter.tone-warning span {
    background: #dc6803;
}

.sla-meter.tone-success span {
    background: #079455;
}

.sla-meter.tone-info span {
    background: #1570ef;
}

.incident-description {
    color: #344054;
    font-size: 1rem;
}

.comment-thread {
    display: grid;
    gap: 12px;
}

.comment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.incident-inline-form {
    margin-top: 16px;
    box-shadow: none;
}

.attachment-grid {
    display: grid;
    gap: 10px;
}

.attachment-card {
    display: grid;
    gap: 4px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 12px;
    color: #101828;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.attachment-card:hover,
.attachment-card:focus {
    border-color: #d0d5dd;
    background: #ffffff;
    color: #101828;
    text-decoration: none;
    transform: translateY(-1px);
}

.attachment-card span {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 750;
}

.incident-timeline {
    position: relative;
    display: grid;
    gap: 14px;
}

.incident-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 10px;
    width: 2px;
    background: #e4e7ec;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
}

.timeline-dot {
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
    border: 4px solid #ffffff;
    border-radius: 999px;
    background: #8a1724;
    box-shadow: 0 0 0 1px #e4e7ec;
}

.timeline-item.tone-info .timeline-dot {
    background: #1570ef;
}

.timeline-item.tone-warning .timeline-dot {
    background: #dc6803;
}

.timeline-item.tone-success .timeline-dot {
    background: #079455;
}

.timeline-item.tone-neutral .timeline-dot {
    background: #667085;
}

.timeline-content {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.timeline-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.timeline-title strong {
    color: #101828;
}

.timeline-title span,
.timeline-content p {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 750;
}

.timeline-content p {
    margin: 4px 0 0;
}

.timeline-change {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    border-radius: 8px;
    background: #f9fafb;
    padding: 8px;
    color: #344054;
    font-size: 0.86rem;
}

.stacked-action-form {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
}

.stacked-action-form:last-child {
    margin-bottom: 0;
}

.stacked-action-form label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 800;
}

.stacked-action-form select,
.stacked-action-form input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 10px;
}

.ai-ready-panel {
    background:
        linear-gradient(145deg, #ffffff, #f8fafc);
}

.ai-copilot-panel {
    display: grid;
    gap: 14px;
    background:
        linear-gradient(145deg, #ffffff, #f8fafc);
}

.compact-alert {
    margin-top: 0;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.ai-knowledge-meter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ai-knowledge-meter div {
    display: grid;
    gap: 4px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.ai-knowledge-meter strong {
    color: #8a1724;
    font-size: 1.45rem;
    line-height: 1;
}

.ai-knowledge-meter span {
    color: #667085;
    font-size: 0.78rem;
    font-weight: 800;
}

.ai-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.ai-action-grid .button {
    justify-content: flex-start;
    min-height: 38px;
    padding: 9px 11px;
    text-align: left;
}

.ai-extra-prompt {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 800;
}

.ai-extra-prompt textarea {
    width: 100%;
    min-height: 88px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
    resize: vertical;
}

.ai-copilot-output {
    display: grid;
    gap: 12px;
}

.ai-loading-state {
    display: grid;
    gap: 8px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.ai-loading-state span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f6, #fff1f2, #eef2f6);
    background-size: 220% 100%;
    animation: ai-shimmer 1.2s linear infinite;
}

.ai-loading-state span:nth-child(2) {
    width: 78%;
}

.ai-loading-state span:nth-child(3) {
    width: 58%;
}

.ai-loading-state strong {
    margin-top: 4px;
    color: #667085;
    font-size: 0.88rem;
}

@keyframes ai-shimmer {
    from {
        background-position: 220% 0;
    }
    to {
        background-position: -220% 0;
    }
}

.ai-answer-card,
.ai-result-block,
.ai-result-meta,
.ai-suggested-priority {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.ai-answer-card h3,
.ai-result-block h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.ai-answer-card p {
    margin: 0;
    color: #344054;
}

.ai-suggested-priority {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    background: #fffaeb;
}

.ai-suggested-priority span {
    color: #b54708;
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ai-suggested-priority strong {
    color: #7a2e0e;
}

.ai-source-list {
    display: grid;
    gap: 10px;
}

.ai-source-card {
    display: grid;
    gap: 5px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 10px;
}

.ai-source-card strong {
    color: #101828;
}

.ai-source-card span,
.ai-source-card small,
.ai-source-card p {
    color: #667085;
    font-size: 0.84rem;
}

.ai-source-card p {
    margin: 4px 0;
}

.ai-similar-link {
    display: grid;
    gap: 4px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 10px;
}

.ai-similar-link + .ai-similar-link {
    margin-top: 8px;
}

.ai-similar-link:hover,
.ai-similar-link:focus {
    background: #ffffff;
    text-decoration: none;
}

.ai-similar-link span {
    color: #667085;
    font-size: 0.84rem;
}

.ai-result-block ul {
    margin: 0;
    padding-left: 18px;
    color: #344054;
}

.ai-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f9fafb;
}

.ai-result-meta span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: #475467;
    padding: 3px 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.ai-copilot-tools {
    display: grid;
    gap: 8px;
}

.wizard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background:
        linear-gradient(135deg, #ffffff 0%, #fff7f6 52%, #eef7f3 100%);
    box-shadow: 0 18px 42px rgba(63, 20, 18, 0.08);
    padding: clamp(18px, 3vw, 28px);
}

.wizard-hero h1 {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 3.2rem);
    letter-spacing: 0;
}

.wizard-hero p {
    max-width: 760px;
    margin: 8px 0 0;
    color: #667085;
}

.wizard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.incident-wizard {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.wizard-sidebar {
    position: sticky;
    top: 76px;
    display: grid;
    gap: 10px;
}

.wizard-progress {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: #eef2f6;
}

.wizard-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8a1724, #235f4c);
    transition: width 0.22s ease;
}

.wizard-steps {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wizard-steps button {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    color: #475467;
    padding: 7px 9px;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.wizard-steps button:hover,
.wizard-steps button:focus {
    transform: translateY(-1px);
    border-color: #d9a6a4;
    box-shadow: 0 10px 22px rgba(63, 20, 18, 0.08);
}

.wizard-steps button span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 0.76rem;
}

.wizard-steps button.is-active {
    border-color: #8a1724;
    color: #8a1724;
}

.wizard-steps button.is-active span {
    background: #8a1724;
    color: #ffffff;
}

.wizard-steps button.is-complete span {
    background: #235f4c;
    color: #ffffff;
}

.wizard-ai-card,
.wizard-main,
.wizard-step-panel {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(63, 20, 18, 0.07);
}

.wizard-ai-card {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.wizard-ai-card h2,
.wizard-panel-heading h2 {
    margin: 0;
    letter-spacing: 0;
}

.wizard-main {
    overflow: hidden;
}

.wizard-step-panel {
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    padding: clamp(16px, 2vw, 24px);
}

.js-ready .wizard-step-panel:not(.is-active) {
    display: none;
}

.wizard-panel-heading {
    margin-bottom: 14px;
}

.wizard-panel-heading p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: #667085;
    font-size: 0.94rem;
}

.incident-wizard input,
.incident-wizard select,
.incident-wizard textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(106, 81, 79, 0.22);
    border-radius: 8px;
    background: #ffffff;
    color: #101828;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.incident-wizard textarea {
    resize: vertical;
}

.incident-wizard input:focus,
.incident-wizard select:focus,
.incident-wizard textarea:focus {
    border-color: rgba(190, 58, 52, 0.58);
    box-shadow: 0 0 0 4px rgba(190, 58, 52, 0.12);
}

.incident-wizard .form-grid label,
.wizard-field {
    display: grid;
    gap: 7px;
    color: #344054;
    font-weight: 800;
}

.wizard-field + .wizard-field,
.wizard-choice-grid + .wizard-field {
    margin-top: 16px;
}

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

.wizard-choice-card {
    display: grid;
    min-height: 96px;
    align-content: start;
    gap: 7px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.wizard-choice-card:hover,
.wizard-choice-card:focus-within {
    transform: translateY(-2px);
    border-color: #d9a6a4;
    box-shadow: 0 14px 28px rgba(63, 20, 18, 0.08);
}

.wizard-choice-card input {
    width: 16px;
    height: 16px;
    accent-color: #8a1724;
}

.wizard-choice-card span {
    color: #101828;
    font-size: 0.98rem;
    font-weight: 950;
}

.wizard-choice-card small {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 700;
}

.wizard-choice-card:has(input:checked) {
    border-color: #8a1724;
    background: #fff7f6;
}

.wizard-dropzone {
    position: relative;
    display: grid;
    min-height: 180px;
    place-items: center;
    gap: 8px;
    border: 1px dashed #c7d7d1;
    border-radius: 8px;
    background: #f8fbfa;
    padding: 28px;
    color: #344054;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.wizard-dropzone:hover,
.wizard-dropzone:focus-within,
.wizard-dropzone.is-dragover {
    transform: translateY(-1px);
    border-color: #235f4c;
    background: #eef7f3;
}

.wizard-dropzone input {
    width: 1px;
    height: 1px;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.wizard-dropzone span {
    font-size: 1.08rem;
    font-weight: 950;
}

.wizard-dropzone small {
    color: #667085;
    font-weight: 750;
}

.wizard-file-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.wizard-file-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.wizard-file-item img,
.wizard-file-icon {
    display: grid;
    width: 56px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
    object-fit: cover;
    font-size: 0.72rem;
    font-weight: 950;
}

.wizard-file-item strong {
    display: block;
    overflow: hidden;
    color: #101828;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wizard-file-item span,
.wizard-file-item small {
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

.wizard-review-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.wizard-review-grid article,
.wizard-review-block,
.wizard-ai-result,
.wizard-ai-suggestion-grid article {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 12px;
}

.wizard-review-grid span,
.wizard-review-block span,
.wizard-ai-suggestion-grid span {
    display: block;
    margin-bottom: 4px;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 950;
    text-transform: uppercase;
}

.wizard-review-grid strong,
.wizard-review-block strong {
    color: #101828;
}

.wizard-review-block {
    margin-top: 12px;
}

.wizard-review-block p {
    margin: 0;
    color: #344054;
    white-space: pre-wrap;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    background: #ffffff;
}

.wizard-ai-output {
    display: grid;
    gap: 10px;
}

.wizard-ai-result {
    display: grid;
    gap: 12px;
    background: #ffffff;
}

.wizard-ai-result h3 {
    margin: 4px 0 0;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.wizard-ai-result p {
    margin: 0;
    color: #344054;
}

.wizard-ai-suggestion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.wizard-ai-suggestion-grid article {
    display: grid;
    gap: 8px;
    background: #fffbfa;
}

.wizard-ai-suggestion-grid strong {
    color: #8a1724;
}

.inline-mini {
    min-height: 28px;
    margin-left: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
}

.has-error {
    outline: 2px solid rgba(190, 58, 52, 0.26);
    outline-offset: 3px;
}

.ai-placeholder-lines {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.ai-placeholder-lines span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f6, #fff1f2, #eef2f6);
}

.ai-placeholder-lines span:nth-child(2) {
    width: 82%;
}

.ai-placeholder-lines span:nth-child(3) {
    width: 64%;
}

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

.similar-list a {
    display: grid;
    gap: 4px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 12px;
    color: #101828;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.similar-list a:hover,
.similar-list a:focus {
    border-color: #d0d5dd;
    background: #ffffff;
    color: #101828;
    text-decoration: none;
    transform: translateY(-1px);
}

.similar-list span {
    color: #667085;
    font-size: 0.84rem;
    font-weight: 750;
}

@media (max-width: 1180px) {
    .kanban-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .incident-360-layout {
        grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
    }

    .incident-360-right {
        position: static;
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .kanban-board {
        grid-auto-columns: minmax(280px, 86vw);
    }

    .kanban-column {
        max-height: none;
    }

    .incident-360-layout,
    .incident-360-right {
        grid-template-columns: 1fr;
    }

    .incident-360-left,
    .incident-360-right {
        position: static;
    }
}

@media (max-width: 760px) {
    .kanban-filter {
        grid-template-columns: 1fr;
    }

    .kanban-toolbar,
    .incident-360-hero,
    .incident-360-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .view-switcher,
    .view-switcher .button,
    .incident-360-hero-actions .button,
    .incident-360-hero-actions form,
    .incident-360-hero-actions button {
        width: 100%;
    }

    .timeline-title,
    .comment-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

.knowledge-import-panel {
    display: grid;
    gap: 18px;
    margin: 28px 0;
}

.knowledge-import-panel h2 {
    margin: 4px 0 6px;
    font-size: clamp(1.35rem, 2vw, 2rem);
}

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

.knowledge-source-card {
    display: grid;
    gap: 16px;
    align-content: space-between;
    min-height: 230px;
    padding: 20px;
    border: 1px solid rgba(190, 58, 52, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at 0% 0%, rgba(244, 214, 213, 0.72), transparent 13rem),
        linear-gradient(145deg, rgba(255,255,255,0.96), rgba(255,247,246,0.86));
    box-shadow: var(--shadow-soft);
}

.knowledge-source-card h3 {
    margin: 12px 0 8px;
    font-size: 1.06rem;
}

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

.knowledge-source-card form {
    margin: 0;
}

/* Phase 1: JANO Command Center shell and dashboard */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

body.has-app-shell {
    min-height: 100vh;
    background: #f4f6f8;
    color: #182230;
}

body.has-app-shell::before {
    display: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.18s ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: 74px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: 244px;
    height: 100vh;
    border-right: 1px solid #e4e7ec;
    background: #ffffff;
    padding: 12px;
    transition: width 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body.sidebar-collapsed .app-sidebar {
    width: 74px;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
}

.app-sidebar-brand .brand {
    min-width: 0;
}

.app-sidebar-brand .brand-logo {
    max-width: 150px;
    height: 32px;
}

.sidebar-collapse-button,
.mobile-menu-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    color: #344054;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus,
.mobile-menu-button:hover,
.mobile-menu-button:focus {
    border-color: #b4232f;
    background: #fff5f5;
    transform: translateY(-1px);
}

.sidebar-collapse-button span,
.mobile-menu-button span {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-collapse-button span::before,
.sidebar-collapse-button span::after,
.mobile-menu-button span::before,
.mobile-menu-button span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-collapse-button span::before,
.mobile-menu-button span::before {
    top: -6px;
}

.sidebar-collapse-button span::after,
.mobile-menu-button span::after {
    top: 6px;
}

.app-sidebar-nav {
    display: grid;
    gap: 5px;
    overflow-y: auto;
    padding: 14px 0;
}

.app-sidebar-nav a {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 5px 8px;
    color: #475467;
    font-size: 0.88rem;
    font-weight: 800;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.app-sidebar-nav a:hover,
.app-sidebar-nav a:focus {
    background: #f9fafb;
    color: #8a1724;
    text-decoration: none;
    transform: translateX(2px);
}

.app-sidebar-nav a.is-active {
    background: #fff1f2;
    color: #8a1724;
}

.nav-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0;
}

.app-sidebar-nav a.is-active .nav-icon {
    border-color: #8a1724;
    background: #8a1724;
    color: #ffffff;
}

.nav-label,
.user-meta,
.sidebar-logout {
    transition: opacity 0.12s ease, width 0.12s ease;
}

body.sidebar-collapsed .app-sidebar-brand .brand {
    width: 42px;
    overflow: hidden;
}

body.sidebar-collapsed .app-sidebar-brand .brand-logo {
    max-width: none;
}

body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .user-meta,
body.sidebar-collapsed .sidebar-logout {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .app-sidebar-footer {
    align-items: center;
}

.app-sidebar-footer {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eef2f6;
}

.user-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #8a1724;
    color: #ffffff;
    font-weight: 900;
}

.user-meta {
    display: grid;
    min-width: 0;
}

.user-meta strong,
.user-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta small {
    color: #667085;
    font-weight: 700;
}

.app-workspace {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    border-bottom: 1px solid rgba(228, 231, 236, 0.9);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px clamp(14px, 2.2vw, 24px);
    backdrop-filter: blur(14px);
}

.mobile-menu-button {
    display: none;
}

.app-topbar-title {
    min-width: 0;
    flex: 0 1 280px;
}

.app-topbar-title .eyebrow {
    margin-bottom: 3px;
    color: #8a1724;
    letter-spacing: 0.08em;
}

.app-topbar-title h1 {
    margin: 0;
    font-size: clamp(1.05rem, 1.25vw, 1.35rem);
    line-height: 1.15;
    letter-spacing: 0;
}

.app-topbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.global-search-preview {
    position: relative;
    width: min(30vw, 360px);
    min-width: 220px;
    margin: 0;
}

.global-search-preview input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #f9fafb;
    color: #182230;
    padding: 8px 70px 8px 11px;
    font-size: 0.94rem;
    opacity: 1;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.global-search-preview input:focus {
    border-color: rgba(138, 23, 36, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(138, 23, 36, 0.1);
}

.search-shortcut {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border: 1px solid #e4e7ec;
    border-radius: 7px;
    background: #ffffff;
    color: #667085;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 900;
    pointer-events: none;
}

.global-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    overflow: hidden;
    width: min(640px, 92vw);
    max-height: min(72vh, 620px);
    overflow-y: auto;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 58px rgba(16, 24, 40, 0.18);
}

.global-search-empty,
.global-search-loading {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.global-search-empty strong {
    color: #101828;
}

.global-search-empty span {
    color: #667085;
    font-size: 0.9rem;
}

.global-search-loading span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f6, #fff1f2, #eef2f6);
    background-size: 220% 100%;
    animation: ai-shimmer 1.2s linear infinite;
}

.global-search-loading span:nth-child(2) {
    width: 76%;
}

.global-search-loading span:nth-child(3) {
    width: 54%;
}

.global-search-group {
    display: grid;
    gap: 4px;
    padding: 10px;
}

.global-search-group + .global-search-group {
    border-top: 1px solid #eef2f6;
}

.global-search-group h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    color: #667085;
    padding: 6px 8px;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.global-search-group h3 span {
    color: #98a2b3;
}

.global-search-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 10px 8px;
    transition: background 0.16s ease, transform 0.16s ease;
}

.global-search-item:hover,
.global-search-item:focus {
    transform: translateY(-1px);
    background: #f9fafb;
    text-decoration: none;
}

.global-search-type {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    background: #fff1f2;
    color: #8a1724;
    font-size: 0.76rem;
    font-weight: 950;
}

.global-search-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.global-search-copy strong,
.global-search-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-copy strong {
    color: #101828;
    font-size: 0.92rem;
}

.global-search-copy small {
    color: #667085;
    font-size: 0.82rem;
    font-weight: 750;
}

.global-search-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.global-search-status em {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.global-search-all {
    width: 100%;
    border: 0;
    border-top: 1px solid #eef2f6;
    background: #f9fafb;
    color: #8a1724;
    padding: 12px;
    font-weight: 950;
    cursor: pointer;
}

.global-search-all:hover,
.global-search-all:focus {
    background: #fff1f2;
}

.search-page-hero,
.search-page-form,
.search-results-summary,
.search-result-group,
.search-type-filter,
.search-empty {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(63, 20, 18, 0.07);
}

.search-page-hero {
    margin-bottom: 16px;
    padding: clamp(18px, 3vw, 28px);
}

.search-page-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    letter-spacing: 0;
}

.search-page-hero p {
    max-width: 780px;
    margin: 8px 0 0;
    color: #667085;
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
}

.search-page-form input,
.search-page-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 11px;
}

.search-results-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.search-results-summary strong {
    color: #8a1724;
}

.search-results-summary span {
    color: #667085;
}

.search-results-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.search-type-filter {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 6px;
    padding: 10px;
}

.search-type-filter a {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    color: #344054;
    padding: 8px 10px;
    font-weight: 900;
}

.search-type-filter a:hover,
.search-type-filter a:focus,
.search-type-filter a.is-active {
    background: #fff1f2;
    color: #8a1724;
    text-decoration: none;
}

.search-type-filter span {
    display: inline-flex;
    min-width: 26px;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    padding: 2px 7px;
    font-size: 0.76rem;
}

.search-result-groups {
    display: grid;
    gap: 16px;
}

.search-result-group {
    overflow: hidden;
}

.search-group-heading {
    border-bottom: 1px solid #eef2f6;
    padding: 14px;
}

.search-group-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0;
}

.search-result-list {
    display: grid;
}

.search-result-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #eef2f6;
    padding: 14px;
    transition: background 0.16s ease;
}

.search-result-card:last-child {
    border-bottom: 0;
}

.search-result-card:hover,
.search-result-card:focus {
    background: #f9fafb;
    text-decoration: none;
}

.search-result-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: #eef7f3;
    color: #235f4c;
    font-size: 0.82rem;
    font-weight: 950;
}

.search-result-body {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.search-result-body strong,
.search-result-body small,
.search-result-body span,
.search-result-body em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-body strong {
    color: #101828;
}

.search-result-body small,
.search-result-body span,
.search-result-body em {
    color: #667085;
    font-size: 0.86rem;
    font-style: normal;
}

.search-result-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.topbar-button {
    min-height: 38px;
    white-space: nowrap;
}

.app-main {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 32px;
}

.app-footer {
    padding: 8px 24px 26px;
}

.has-app-shell .button {
    min-height: 38px;
    border-radius: 8px;
    padding: 8px 13px;
    font-size: 0.92rem;
    box-shadow: none;
}

.has-app-shell .button.primary {
    background: #8a1724;
}

.has-app-shell .button.primary:hover,
.has-app-shell .button.primary:focus {
    background: #6f1220;
}

.has-app-shell .button.secondary {
    border-color: #d0d5dd;
    background: #ffffff;
    color: #344054;
}

.has-app-shell .button.secondary:hover,
.has-app-shell .button.secondary:focus {
    background: #f9fafb;
    color: #8a1724;
}

.has-app-shell .table-wrap,
.has-app-shell .filter-panel,
.has-app-shell .admin-form,
.has-app-shell .metric-card,
.has-app-shell .settings-list article,
.has-app-shell .detail-grid article,
.has-app-shell .dashboard-action-card,
.has-app-shell .dashboard-service-strip article {
    border-color: #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.has-app-shell .filter-panel,
.has-app-shell .admin-form {
    background: #ffffff;
}

.has-app-shell th {
    background: #f8fafc;
    color: #475467;
}

.has-app-shell td,
.has-app-shell th {
    border-bottom-color: #eef2f6;
}

.has-app-shell tbody tr:hover {
    background: #fafafa;
}

.has-app-shell .badge,
.badge.tone-neutral,
.badge.tone-info,
.badge.tone-success,
.badge.tone-warning,
.badge.tone-danger {
    border-radius: 999px;
    border-color: #d0d5dd;
    background: #f8fafc;
    color: #344054;
    letter-spacing: 0;
}

.badge.tone-info {
    border-color: #b9e6fe;
    background: #f0f9ff;
    color: #026aa2;
}

.badge.tone-success {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.badge.tone-warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #b54708;
}

.badge.tone-danger {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.empty-state {
    display: grid;
    gap: 4px;
    border: 1px dashed #d0d5dd;
    border-radius: 8px;
    background: #f9fafb;
    padding: 18px;
    color: #667085;
}

.empty-state strong {
    color: #344054;
}

.empty-state.compact {
    padding: 14px;
}

.has-app-shell a:focus-visible,
.has-app-shell button:focus-visible,
.has-app-shell input:focus-visible,
.has-app-shell select:focus-visible,
.has-app-shell textarea:focus-visible {
    outline: 3px solid rgba(138, 23, 36, 0.18);
    outline-offset: 2px;
}

.has-app-shell .alert {
    border-radius: 8px;
    border: 1px solid #e4e7ec;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.has-app-shell .alert.success {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.has-app-shell .alert.error {
    border-color: #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.has-app-shell .table-wrap {
    overflow: hidden;
}

.has-app-shell .table-wrap table {
    background: #ffffff;
}

.has-app-shell .table-wrap tbody tr {
    transition: background 0.16s ease, transform 0.16s ease;
}

.has-app-shell .table-wrap tbody tr:hover {
    background: #f9fafb;
}

.has-app-shell .table-wrap td a {
    color: #8a1724;
    font-weight: 900;
}

.has-app-shell .filter-panel,
.has-app-shell .admin-form {
    gap: 16px;
}

.has-app-shell .filter-panel input,
.has-app-shell .filter-panel select,
.has-app-shell .admin-form input,
.has-app-shell .admin-form select,
.has-app-shell .admin-form textarea {
    border-color: #d0d5dd;
    border-radius: 8px;
    background: #ffffff;
}

.has-app-shell .filter-panel input:focus,
.has-app-shell .filter-panel select:focus,
.has-app-shell .admin-form input:focus,
.has-app-shell .admin-form select:focus,
.has-app-shell .admin-form textarea:focus {
    border-color: rgba(138, 23, 36, 0.55);
    box-shadow: 0 0 0 4px rgba(138, 23, 36, 0.1);
}

.cc-panel,
.incident-panel,
.kanban-card,
.wizard-ai-card,
.wizard-main,
.knowledge-source-card,
.settings-list article,
.detail-grid article,
.dashboard-action-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.cc-panel:hover,
.incident-panel:hover,
.wizard-ai-card:hover,
.wizard-main:hover,
.knowledge-source-card:hover,
.settings-list article:hover,
.detail-grid article:hover,
.dashboard-action-card:hover {
    border-color: #d0d5dd;
    box-shadow: 0 16px 36px rgba(16, 24, 40, 0.08);
}

.has-app-shell .empty-state {
    border-color: #d0d5dd;
    background:
        linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.cc-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: clamp(20px, 3vw, 28px);
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.cc-hero h2 {
    margin: 0;
    color: #101828;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
    letter-spacing: 0;
}

.cc-hero p:not(.eyebrow) {
    max-width: 820px;
    margin: 14px 0 0;
    color: #667085;
    font-size: 1rem;
}

.cc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.cc-kpi-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    border: 1px solid #e4e7ec;
    border-left: 4px solid #8a1724;
    border-radius: 8px;
    background: #ffffff;
    color: #101828;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

a.cc-kpi-card:hover,
a.cc-kpi-card:focus {
    color: #101828;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(16, 24, 40, 0.1);
}

.cc-kpi-card strong {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: 0;
}

.cc-kpi-label,
.cc-kpi-card small {
    color: #667085;
    font-weight: 800;
}

.cc-kpi-label {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cc-kpi-card.tone-danger {
    border-left-color: #b42318;
}

.cc-kpi-card.tone-warning {
    border-left-color: #dc6803;
}

.cc-kpi-card.tone-success {
    border-left-color: #079455;
}

.cc-kpi-card.tone-info {
    border-left-color: #1570ef;
}

.cc-kpi-card.tone-neutral {
    border-left-color: #667085;
}

.cc-dashboard-grid,
.cc-ops-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

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

.cc-ops-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.08fr) minmax(320px, 0.84fr);
}

.cc-panel {
    min-width: 0;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
}

.cc-panel-wide {
    grid-column: span 2;
}

.cc-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.cc-panel-header .eyebrow {
    margin-bottom: 5px;
    color: #8a1724;
    letter-spacing: 0.08em;
}

.cc-panel-header h3 {
    margin: 0;
    color: #101828;
    font-size: 1rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.cc-panel-stat {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border-radius: 999px;
    background: #f9fafb;
    color: #344054;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.cc-bar-chart {
    display: grid;
    gap: 11px;
}

.cc-bar-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.9fr) minmax(120px, 1.45fr) 42px;
    gap: 12px;
    align-items: center;
}

.cc-bar-label {
    overflow: hidden;
    color: #475467;
    font-size: 0.88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-bar-track {
    display: block;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2f6;
}

.cc-bar-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8a1724, #d1495b);
}

.cc-bar-row strong {
    color: #101828;
    font-size: 0.9rem;
    text-align: right;
}

.cc-line-chart {
    display: grid;
    gap: 10px;
}

.cc-line-chart svg {
    width: 100%;
    height: 220px;
    overflow: visible;
    border-radius: 8px;
    background:
        linear-gradient(#eef2f6 1px, transparent 1px),
        linear-gradient(90deg, #eef2f6 1px, transparent 1px);
    background-size: 100% 25%, 25% 100%;
}

.cc-line-area {
    fill: rgba(138, 23, 36, 0.1);
}

.cc-line-stroke {
    fill: none;
    stroke: #8a1724;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cc-line-axis {
    display: flex;
    justify-content: space-between;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 800;
}

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

.cc-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    color: #101828;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.cc-list-item:hover,
.cc-list-item:focus {
    border-color: #d0d5dd;
    background: #f9fafb;
    color: #101828;
    text-decoration: none;
    transform: translateY(-1px);
}

.cc-list-main {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.cc-list-main strong,
.cc-list-main small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-list-main strong {
    color: #101828;
    font-size: 0.94rem;
}

.cc-list-main small {
    color: #667085;
    font-weight: 700;
}

.cc-list-meta {
    display: grid;
    flex: 0 0 auto;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

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

.cc-knowledge-grid div {
    display: grid;
    gap: 4px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f9fafb;
    padding: 14px;
}

.cc-knowledge-grid span {
    color: #8a1724;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.cc-knowledge-grid strong {
    color: #475467;
    font-size: 0.82rem;
}

.cc-knowledge-latest {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    border-top: 1px solid #eef2f6;
    padding-top: 14px;
}

.cc-knowledge-latest p {
    margin: 0;
}

.cc-future-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cc-future-strip span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    border: 1px dashed #d0d5dd;
    border-radius: 999px;
    background: #ffffff;
    color: #667085;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 800;
}

.js-ready .app-sidebar,
.js-ready .app-topbar,
.js-ready .cc-hero,
.js-ready .cc-kpi-card,
.js-ready .cc-panel,
.js-ready .cc-future-strip,
.js-ready .wizard-hero,
.js-ready .wizard-step-panel {
    animation: rise-in 0.38s ease both;
}

@media (max-width: 1180px) {
    .cc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cc-dashboard-grid,
    .cc-ops-grid {
        grid-template-columns: 1fr;
    }

    .cc-panel-wide {
        grid-column: auto;
    }
}

@media (max-width: 980px) {
    .app-shell,
    body.sidebar-collapsed .app-shell {
        display: block;
    }

    .app-sidebar,
    body.sidebar-collapsed .app-sidebar {
        position: fixed;
        left: 0;
        width: min(86vw, 310px);
        max-width: 310px;
        transform: translateX(-105%);
        box-shadow: 0 20px 40px rgba(16, 24, 40, 0.18);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(16, 24, 40, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.16s ease;
    }

    body.sidebar-open .app-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .sidebar-collapse-button {
        display: none;
    }

    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .user-meta,
    body.sidebar-collapsed .sidebar-logout {
        width: auto;
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-collapsed .app-sidebar-brand .brand {
        width: auto;
    }

    .app-topbar {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .app-topbar-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .global-search-preview {
        width: 100%;
        min-width: min(100%, 260px);
    }

    .global-search-panel {
        left: 0;
        right: auto;
        width: min(100%, 92vw);
    }

    .incident-wizard {
        grid-template-columns: 1fr;
    }

    .wizard-sidebar {
        position: static;
    }

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

    .wizard-steps button {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

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

    .search-results-layout {
        grid-template-columns: 1fr;
    }

    .search-type-filter {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-main {
        width: min(100% - 24px, 1440px);
        padding-top: 16px;
    }

    .app-topbar-actions,
    .cc-hero,
    .cc-hero-actions,
    .wizard-hero,
    .wizard-hero-actions,
    .cc-list-item {
        align-items: stretch;
        flex-direction: column;
    }

    .cc-kpi-grid,
    .cc-knowledge-grid,
    .wizard-review-grid,
    .wizard-ai-suggestion-grid {
        grid-template-columns: 1fr;
    }

    .search-page-form {
        grid-template-columns: 1fr;
    }

    .search-type-filter {
        grid-template-columns: 1fr;
    }

    .search-result-card,
    .global-search-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .search-result-badges,
    .global-search-status {
        grid-column: 2;
        justify-content: flex-start;
    }

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

    .wizard-step-panel {
        padding: 16px;
    }

    .wizard-navigation {
        flex-direction: column-reverse;
    }

    .wizard-navigation .button,
    .wizard-hero-actions .button {
        width: 100%;
    }

    .cc-bar-row {
        grid-template-columns: 1fr 44px;
    }

    .cc-bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .cc-list-meta {
        justify-items: start;
        text-align: left;
    }

    .topbar-button,
    .cc-hero-actions .button {
        width: 100%;
    }
}
