:root {
    --ink: #0b1827;
    --ink-soft: #344655;
    --muted: #6e7c89;
    --line: #e3e8ec;
    --surface: #ffffff;
    --surface-soft: #f5f7f8;
    --navy: #0a2033;
    --navy-deep: #061726;
    --blue: #2463eb;
    --blue-soft: #eaf1ff;
    --amber: #f4a51c;
    --amber-soft: #fff4dc;
    --green: #17855e;
    --green-soft: #e5f7ef;
    --red: #c9463d;
    --red-soft: #fff0ed;
    --shadow: 0 24px 70px rgba(7, 25, 42, .12);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--surface-soft);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--surface-soft);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

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

.brand {
    display: flex;
    align-items: center;
    color: var(--ink);
    letter-spacing: -.04em;
}

.brand__pin {
    display: grid;
    width: 35px;
    height: 35px;
    margin-right: 10px;
    place-items: center;
    border-radius: 50% 50% 50% 10%;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 8px 20px rgba(36, 99, 235, .24);
    transform: rotate(-45deg);
}

.brand__pin span {
    font-size: 15px;
    font-weight: 650;
    transform: rotate(45deg);
}

.brand__name {
    font-size: 21px;
    font-weight: 630;
}

.brand__uk {
    align-self: flex-end;
    margin: 0 0 5px 2px;
    color: #7c8995;
    font-size: 10px;
    font-weight: 520;
    letter-spacing: 0;
}

.brand--inverse {
    color: #fff;
}

.brand--inverse .brand__pin {
    color: var(--navy);
    background: var(--amber);
}

.brand--inverse .brand__uk {
    color: #89a0b4;
}

.eyebrow {
    margin: 0;
    color: var(--blue);
    font-size: 11px;
    font-weight: 620;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: #7ec5ff;
}

.pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 0 4px rgba(244, 165, 28, .12);
}

.primary-button,
.new-permit-button {
    display: flex;
    min-height: 50px;
    padding: 0 18px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 12px 26px rgba(36, 99, 235, .22);
    font-size: 13px;
    font-weight: 560;
    transition: transform 160ms ease, background 160ms ease;
}

.primary-button:hover,
.new-permit-button:hover {
    background: #174fcb;
    transform: translateY(-1px);
}

.flash {
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.55;
}

.flash--error {
    border-color: #f4c5bf;
    color: #96352e;
    background: var(--red-soft);
}

.flash--success {
    border-color: #bce4d1;
    color: #126846;
    background: var(--green-soft);
}

/* Secure login */

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.06fr) minmax(440px, .94fr);
    background: #fff;
}

.login-story,
.install-brand {
    position: relative;
    display: flex;
    min-height: 100vh;
    padding: 44px clamp(42px, 5vw, 84px);
    overflow: hidden;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 80% 25%, rgba(36, 99, 235, .35), transparent 32%),
        radial-gradient(circle at 20% 90%, rgba(244, 165, 28, .1), transparent 26%),
        linear-gradient(145deg, #0d2c45 0%, #071b2c 45%, #061522 100%);
}

.login-story::before,
.install-brand::before {
    position: absolute;
    top: -7%;
    right: -15%;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
    box-shadow:
        0 0 0 80px rgba(255, 255, 255, .018),
        0 0 0 160px rgba(255, 255, 255, .012);
    content: "";
    pointer-events: none;
}

.login-story__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-story__security {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b6c6d3;
    font-size: 12px;
}

.login-story__content {
    position: relative;
    z-index: 1;
    max-width: 660px;
    margin: auto 0 0;
    padding: 80px 0 215px;
}

.login-story h1 {
    max-width: 650px;
    margin: 22px 0 21px;
    font-size: clamp(48px, 4.6vw, 76px);
    font-weight: 480;
    letter-spacing: -.055em;
    line-height: .98;
}

.login-story__lead {
    max-width: 560px;
    margin: 0;
    color: #b9c8d4;
    font-size: clamp(17px, 1.35vw, 21px);
    font-weight: 360;
    line-height: 1.55;
}

.login-story__proof {
    display: grid;
    max-width: 620px;
    margin-top: 42px;
    grid-template-columns: repeat(3, 1fr);
}

.login-story__proof div {
    padding: 4px 26px 4px 0;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.login-story__proof div + div {
    padding-left: 26px;
}

.login-story__proof div:last-child {
    border-right: 0;
}

.login-story__proof span {
    color: #7290a8;
    font-size: 10px;
    letter-spacing: .16em;
}

.login-story__proof p {
    margin: 7px 0 4px;
    font-size: 14px;
    font-weight: 530;
}

.login-story__proof small {
    color: #8ea4b5;
    font-size: 11px;
}

.login-story__permit {
    position: absolute;
    z-index: 2;
    right: clamp(28px, 6vw, 100px);
    bottom: 82px;
    width: min(460px, 62%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 15px;
    background: rgba(10, 35, 55, .76);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
    backdrop-filter: blur(14px);
}

.permit-visual__header,
.permit-visual__line {
    display: flex;
    padding: 10px 16px;
    justify-content: space-between;
    color: #7591a6;
    font-size: 9px;
    letter-spacing: .15em;
}

.permit-visual__header {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.permit-visual__line {
    border-top: 1px solid rgba(255, 255, 255, .08);
    letter-spacing: 0;
}

.permit-visual__body {
    display: flex;
    padding: 16px;
    align-items: center;
    gap: 13px;
}

.permit-visual__icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border: 1px solid rgba(244, 165, 28, .25);
    border-radius: 10px;
    color: var(--amber);
    background: rgba(244, 165, 28, .09);
    font-size: 11px;
    font-weight: 620;
}

.permit-visual__body p {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 550;
}

.permit-visual__body small {
    color: #8298aa;
    font-size: 11px;
}

.live-badge {
    margin-left: auto;
    padding: 5px 9px;
    border-radius: 20px;
    color: #67d7aa;
    background: rgba(44, 174, 123, .12);
    font-size: 10px;
    font-weight: 550;
}

.login-story__footer {
    position: absolute;
    z-index: 1;
    bottom: 40px;
    left: clamp(42px, 5vw, 84px);
    margin: 0;
    color: #71899c;
    font-size: 11px;
}

.login-panel {
    display: flex;
    min-height: 100vh;
    padding: 48px clamp(34px, 6vw, 100px) 30px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(circle at 80% 10%, rgba(36, 99, 235, .045), transparent 24%),
        #fff;
}

.login-panel__mobile-brand {
    display: none;
}

.login-card {
    width: min(100%, 430px);
}

.login-card__intro {
    margin-bottom: 32px;
}

.login-card__intro h2,
.install-heading h2 {
    margin: 10px 0;
    color: var(--ink);
    font-size: 32px;
    font-weight: 520;
    letter-spacing: -.042em;
}

.login-card__intro > p:last-child,
.install-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.login-card form > label,
.label-row label,
.simple-auth-card form > label {
    display: block;
    margin: 0 0 8px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 530;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-row a,
.login-card__support a,
.text-link {
    color: var(--blue);
    font-size: 11px;
    font-weight: 550;
}

.field {
    display: flex;
    min-height: 52px;
    margin-bottom: 22px;
    padding: 0 15px;
    align-items: center;
    gap: 10px;
    border: 1px solid #d9e0e5;
    border-radius: 10px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(36, 99, 235, .08);
}

.field > span {
    color: #94a0aa;
    font-size: 13px;
    font-weight: 550;
}

.field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 14px;
}

.field__action {
    padding: 4px;
    border: 0;
    color: var(--blue);
    background: transparent;
    font-size: 11px;
    font-weight: 550;
}

.remember {
    display: flex !important;
    margin: -3px 0 24px !important;
    align-items: center;
    gap: 9px;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 420 !important;
}

.remember input {
    width: 15px;
    height: 15px;
    accent-color: var(--blue);
}

.login-card .primary-button {
    width: 100%;
}

.login-card__support {
    display: flex;
    margin: 26px 0;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}

.security-note {
    display: flex;
    padding: 15px;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5eaee;
    border-radius: 10px;
    background: var(--surface-soft);
}

.security-note__shield {
    display: grid;
    width: 30px;
    height: 34px;
    flex: 0 0 30px;
    place-items: center;
    clip-path: polygon(50% 0, 92% 17%, 87% 70%, 50% 100%, 13% 70%, 8% 17%);
    color: var(--green);
    background: var(--green-soft);
    font-size: 12px;
    font-weight: 650;
}

.security-note p {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 3px;
}

.security-note strong {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 560;
}

.security-note p span {
    color: #84909a;
    font-size: 9px;
}

.login-panel__legal {
    margin: auto 0 0;
    padding-top: 36px;
    color: #9ba4ac;
    font-size: 9px;
}

.login-panel__legal span {
    padding: 0 8px;
    color: #d0d5d9;
}

/* Installer */

.install-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(350px, .68fr) minmax(620px, 1.32fr);
    background: #fff;
}

.install-brand {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 700px;
    justify-content: center;
}

.install-brand .brand {
    position: absolute;
    top: 42px;
    left: clamp(42px, 5vw, 84px);
}

.install-brand .eyebrow {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.install-brand h1 {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 0 24px;
    font-size: clamp(42px, 4vw, 65px);
    font-weight: 470;
    letter-spacing: -.055em;
    line-height: 1;
}

.install-brand > p:not(.eyebrow) {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0;
    color: #b9c8d4;
    font-size: 17px;
    line-height: 1.65;
}

.install-brand ul {
    position: relative;
    z-index: 1;
    display: grid;
    margin: 45px 0 0;
    padding: 0;
    gap: 15px;
    list-style: none;
}

.install-brand li {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #c6d3dd;
    font-size: 12px;
}

.install-brand li span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(126, 197, 255, .2);
    border-radius: 8px;
    color: #7ec5ff;
    background: rgba(126, 197, 255, .06);
    font-size: 9px;
}

.install-panel {
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 100vh;
    padding: 65px clamp(35px, 7vw, 110px);
    justify-content: center;
    flex-direction: column;
    background: #fff;
}

.install-heading {
    margin-bottom: 35px;
}

.install-form fieldset {
    margin: 0 0 28px;
    padding: 0;
    border: 0;
}

.install-form legend {
    display: flex;
    width: 100%;
    margin-bottom: 17px;
    padding-bottom: 12px;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    font-weight: 580;
}

.install-form legend span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 6px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 9px;
}

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

.form-grid--three {
    grid-template-columns: 1fr .45fr 1fr;
}

.install-form label {
    display: flex;
    margin-bottom: 14px;
    flex-direction: column;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 530;
}

.install-form label small {
    color: #8a96a0;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.5;
}

.install-form input:not([type="checkbox"]) {
    width: 100%;
    min-height: 45px;
    padding: 0 13px;
    border: 1px solid #d9e0e5;
    border-radius: 8px;
    outline: 0;
    color: var(--ink);
    background: #fff;
    font-size: 12px;
}

.install-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(36, 99, 235, .07);
}

.setup-check {
    display: flex !important;
    margin: 0 0 25px !important;
    padding: 14px;
    align-items: flex-start;
    flex-direction: row !important;
    gap: 11px !important;
    border: 1px solid #dce5f8;
    border-radius: 9px;
    background: #f7faff;
}

.setup-check input {
    margin-top: 2px;
    accent-color: var(--blue);
}

.setup-check > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setup-check strong {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 570;
}

.install-form > .primary-button {
    width: 100%;
}

.install-complete {
    max-width: 520px;
}

.install-complete > span {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 25px;
    place-items: center;
    border-radius: 15px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 22px;
}

.install-complete h2 {
    margin: 10px 0;
    font-size: 38px;
    font-weight: 520;
    letter-spacing: -.045em;
}

.install-complete > p:not(.eyebrow) {
    margin: 0 0 30px;
    color: var(--muted);
    line-height: 1.7;
}

.install-complete .primary-button {
    margin-bottom: 20px;
}

.install-complete > small {
    color: var(--muted);
    font-size: 10px;
}

/* Dashboard */

.sidebar {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: 252px;
    padding: 27px 18px 20px;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #fff;
}

.sidebar__brand {
    display: flex;
    padding: 0 7px 23px;
    align-items: center;
    justify-content: space-between;
}

.sidebar__close {
    display: none;
}

.project-switcher {
    display: grid;
    width: 100%;
    padding: 11px;
    align-items: center;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    text-align: left;
    background: #fafbfc;
}

.project-switcher__mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--navy);
    font-size: 10px;
    font-weight: 620;
}

.project-switcher > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.project-switcher small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 470;
}

.project-switcher strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 11px;
    font-weight: 580;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar nav {
    margin-top: 28px;
}

.sidebar nav > p {
    margin: 0 10px 9px;
    color: #9aa4ad;
    font-size: 8px;
    font-weight: 620;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sidebar nav a,
.sidebar__bottom > a {
    display: flex;
    width: 100%;
    min-height: 41px;
    margin: 2px 0;
    padding: 0 10px;
    align-items: center;
    gap: 11px;
    border-radius: 8px;
    color: #5f6f7c;
    font-size: 11px;
    font-weight: 470;
}

.sidebar nav a > span,
.sidebar__bottom > a > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border: 1px solid #dfe5ea;
    border-radius: 6px;
    color: #7d8994;
    font-size: 7px;
    font-weight: 650;
}

.sidebar nav a:hover,
.sidebar nav a.is-active,
.sidebar__bottom > a:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.sidebar nav a.is-active > span {
    border-color: rgba(36, 99, 235, .15);
    color: var(--blue);
    background: #fff;
}

.nav-count {
    display: grid;
    width: 20px;
    height: 20px;
    margin-left: auto;
    place-items: center;
    border-radius: 50%;
    color: #a96900;
    background: var(--amber-soft);
    font-size: 8px;
    font-weight: 650;
}

.sidebar__bottom {
    margin-top: auto;
}

.site-status {
    display: flex;
    margin-top: 14px;
    padding: 13px 11px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid #e5eae7;
    border-radius: 9px;
    background: #f9fbfa;
}

.pulse-dot--green {
    width: 6px;
    height: 6px;
    margin-top: 5px;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(23, 133, 94, .09);
}

.site-status p {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 3px;
}

.site-status strong {
    color: #3c5047;
    font-size: 9px;
    font-weight: 580;
}

.site-status small {
    color: #8a9790;
    font-size: 8px;
}

.dashboard {
    min-height: 100vh;
    margin-left: 252px;
}

.topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    height: 71px;
    padding: 0 34px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(12px);
}

.mobile-menu {
    display: none;
}

.global-search {
    display: flex;
    width: min(470px, 42vw);
    height: 39px;
    padding: 0 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fafbfc;
}

.global-search > span {
    color: #91a0ac;
    font-size: 18px;
}

.global-search input[type="search"] {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 10px;
}

.global-search kbd {
    padding: 3px 6px;
    border: 1px solid #dce2e7;
    border-radius: 5px;
    color: #9aa5ae;
    background: #fff;
    font-family: inherit;
    font-size: 8px;
    white-space: nowrap;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-button {
    position: relative;
    padding: 9px 0;
    color: var(--muted);
    font-size: 10px;
}

.notification-button span {
    position: absolute;
    top: 1px;
    right: -9px;
    display: grid;
    width: 15px;
    height: 15px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--red);
    font-size: 7px;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    display: flex;
    padding: 0 0 0 18px;
    align-items: center;
    gap: 9px;
    border-left: 1px solid var(--line);
    text-align: left;
    list-style: none;
    cursor: pointer;
}

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

.user-menu__avatar {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(145deg, #113550, #0a2033);
    font-size: 9px;
    font-weight: 620;
}

.user-menu summary > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-menu strong {
    color: var(--ink);
    font-size: 10px;
    font-weight: 580;
}

.user-menu small {
    color: var(--muted);
    font-size: 8px;
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 190px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    box-shadow: var(--shadow);
}

.user-menu__panel a,
.user-menu__panel button {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    color: var(--ink-soft);
    text-align: left;
    background: transparent;
    font-size: 10px;
}

.user-menu__panel a:hover,
.user-menu__panel button:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.dashboard__content {
    width: min(100%, 1560px);
    margin: 0 auto;
    padding: 34px 34px 60px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 8px 0 7px;
    font-size: clamp(27px, 2.2vw, 38px);
    font-weight: 510;
    letter-spacing: -.045em;
}

.page-heading > div > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.new-permit-button {
    width: auto;
    min-height: 43px;
    padding: 0 17px;
    justify-content: center;
    gap: 9px;
    font-size: 10px;
}

.new-permit-button span {
    font-size: 16px;
    font-weight: 350;
}

.metric-grid {
    display: grid;
    margin-top: 28px;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.metric-grid article {
    min-width: 0;
    padding: 18px 19px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(10, 32, 51, .025);
}

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 670;
}

.metric-icon--blue {
    color: var(--blue);
    background: var(--blue-soft);
}

.metric-icon--amber {
    color: #a36c04;
    background: var(--amber-soft);
}

.metric-icon--red {
    color: var(--red);
    background: var(--red-soft);
}

.metric-icon--green {
    color: var(--green);
    background: var(--green-soft);
}

.trend,
.attention {
    color: var(--green);
    font-size: 8px;
    font-weight: 560;
}

.attention {
    color: #9b6702;
}

.attention--red {
    color: var(--red);
}

.metric-grid article > strong,
.compliance-card__value > strong {
    display: block;
    margin-top: 17px;
    font-size: 25px;
    font-weight: 540;
    letter-spacing: -.04em;
}

.metric-grid article > p {
    margin: 4px 0;
    color: #344655;
    font-size: 10px;
    font-weight: 540;
}

.metric-grid article > small {
    color: #8a96a0;
    font-size: 8px;
}

.compliance-card__value {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.compliance-ring {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--green) 0 var(--score), #e8eeeb var(--score) 100%);
}

.compliance-ring span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
}

.dashboard-grid {
    display: grid;
    margin-top: 14px;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, .65fr);
    gap: 14px;
}

.panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(10, 32, 51, .025);
}

.panel__heading {
    display: flex;
    min-height: 69px;
    padding: 17px 19px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8edf0;
}

.panel__heading h2 {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 590;
    letter-spacing: -.02em;
}

.panel__heading p {
    margin: 0;
    color: #8a96a0;
    font-size: 8px;
}

.panel__heading > a {
    color: var(--blue);
    font-size: 8px;
    font-weight: 560;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    padding: 10px 14px;
    color: #98a2aa;
    text-align: left;
    background: #fafbfc;
    font-size: 7px;
    font-weight: 620;
    letter-spacing: .08em;
    text-transform: uppercase;
}

td {
    padding: 13px 14px;
    border-top: 1px solid #edf0f2;
    color: #455665;
    font-size: 8px;
}

tbody tr:hover {
    background: #fbfcfd;
}

td:first-child:not(.empty-state) {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

td strong {
    color: var(--ink);
    font-size: 9px;
    font-weight: 570;
}

td small {
    color: #8e99a2;
    font-size: 7px;
}

.status {
    display: inline-flex;
    padding: 5px 8px;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    font-size: 7px;
    font-weight: 560;
}

.status i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.status--green {
    color: var(--green);
    background: var(--green-soft);
}

.status--amber {
    color: #9c6804;
    background: var(--amber-soft);
}

.status--red {
    color: var(--red);
    background: var(--red-soft);
}

.status--grey {
    color: #6c7a85;
    background: #eef1f3;
}

.status--blue {
    color: var(--blue);
    background: var(--blue-soft);
}

.empty-state {
    padding: 35px;
    color: var(--muted);
    text-align: center;
    font-size: 10px;
}

.attention-count {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    color: var(--red);
    background: var(--red-soft);
    font-size: 8px;
    font-weight: 650;
}

.attention-list a {
    display: grid;
    width: 100%;
    padding: 14px 17px;
    align-items: center;
    grid-template-columns: 29px 1fr auto;
    gap: 10px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    background: #fff;
}

.attention-list a:hover {
    background: #fbfcfd;
}

.attention-list__severity {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 7px;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}

.attention-list__severity--red {
    color: var(--red);
    background: var(--red-soft);
}

.attention-list__severity--amber {
    color: #a66f05;
    background: var(--amber-soft);
}

.attention-list__severity--blue {
    color: var(--blue);
    background: var(--blue-soft);
}

.attention-list a > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attention-list strong {
    color: var(--ink-soft);
    font-size: 8px;
    font-weight: 570;
}

.attention-list small {
    color: #8b97a0;
    font-size: 7px;
}

.attention-clear {
    display: flex;
    padding: 28px 18px;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    color: var(--muted);
    text-align: center;
}

.attention-clear > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--green);
    background: var(--green-soft);
}

.attention-clear small {
    max-width: 220px;
    line-height: 1.5;
}

.safety-note {
    display: flex;
    margin: 15px;
    padding: 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid #dceee6;
    border-radius: 8px;
    background: #f4faf7;
}

.safety-note > span {
    padding: 5px;
    border-radius: 5px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 6px;
    font-weight: 700;
}

.safety-note p {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 3px;
}

.safety-note strong {
    color: #375c4d;
    font-size: 8px;
    font-weight: 570;
}

.safety-note small {
    color: #82958c;
    font-size: 7px;
}

.quick-start {
    margin-top: 14px;
}

.permit-type-grid {
    display: grid;
    padding: 14px;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.permit-type-grid a {
    display: grid;
    min-width: 0;
    padding: 11px;
    align-items: center;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    border: 1px solid #e4e9ed;
    border-radius: 8px;
    text-align: left;
    background: #fff;
    transition: border-color 130ms ease, transform 130ms ease;
}

.permit-type-grid a:hover {
    border-color: #b8c9ec;
    transform: translateY(-1px);
}

.permit-type-grid a > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 7px;
    font-weight: 670;
}

.permit-type-grid p {
    display: flex;
    min-width: 0;
    margin: 0;
    flex-direction: column;
    gap: 3px;
}

.permit-type-grid strong {
    color: var(--ink-soft);
    font-size: 8px;
    font-weight: 580;
}

.permit-type-grid small {
    overflow: hidden;
    color: #8c98a2;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permit-type-grid i {
    color: #9ba6af;
    font-size: 13px;
    font-style: normal;
    font-weight: 350;
}

.module-placeholder {
    width: min(100%, 720px);
    margin: 9vh auto;
    padding: clamp(35px, 7vw, 80px);
    border: 1px solid var(--line);
    border-radius: 18px;
    text-align: center;
    background: #fff;
    box-shadow: 0 18px 60px rgba(10, 32, 51, .06);
}

.module-placeholder__mark {
    display: grid;
    width: 55px;
    height: 55px;
    margin: 30px auto 20px;
    place-items: center;
    border-radius: 15px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 13px;
    font-weight: 650;
}

.module-placeholder h1 {
    margin: 0 0 14px;
    font-size: 38px;
    font-weight: 510;
    letter-spacing: -.045em;
}

.module-placeholder > p:not(.eyebrow) {
    max-width: 560px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.module-placeholder .new-permit-button {
    display: inline-flex;
}

/* Simple auth */

.simple-auth-page {
    display: grid;
    min-height: 100vh;
    padding: 25px;
    place-items: center;
    background:
        radial-gradient(circle at 50% 0, rgba(36, 99, 235, .08), transparent 35%),
        var(--surface-soft);
}

.simple-auth-card {
    width: min(100%, 480px);
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.simple-auth-card .brand {
    margin-bottom: 44px;
}

.simple-auth-card h1 {
    margin: 10px 0;
    font-size: 32px;
    font-weight: 520;
    letter-spacing: -.045em;
}

.simple-auth-card > p:not(.eyebrow) {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.simple-auth-card .primary-button {
    width: 100%;
}

.simple-auth-card .text-link {
    display: inline-block;
    margin-top: 25px;
}

/* Readability update 1.0.1
   The original foundation used presentation-scale text. These values are
   deliberately larger for daily use on laptops, office monitors and site
   displays without turning the interface heavy or cramped. */

.sidebar {
    width: 276px;
}

.dashboard {
    margin-left: 276px;
}

.brand__name {
    font-size: 23px;
}

.project-switcher {
    min-height: 62px;
}

.project-switcher small {
    font-size: 10px;
}

.project-switcher strong {
    font-size: 13px;
}

.sidebar nav > p {
    font-size: 10px;
}

.sidebar nav a,
.sidebar__bottom > a {
    min-height: 46px;
    font-size: 13px;
}

.sidebar nav a > span,
.sidebar__bottom > a > span {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 9px;
}

.nav-count {
    width: 23px;
    height: 23px;
    font-size: 10px;
}

.site-status strong {
    font-size: 11px;
}

.site-status small {
    font-size: 10px;
}

.topbar {
    height: 78px;
}

.global-search {
    height: 44px;
}

.global-search input[type="search"],
.notification-button {
    font-size: 12px;
}

.global-search kbd {
    font-size: 10px;
}

.user-menu strong {
    font-size: 12px;
}

.user-menu small {
    font-size: 10px;
}

.page-heading h1 {
    font-size: clamp(32px, 2.4vw, 42px);
}

.page-heading > div > p:last-child {
    font-size: 14px;
}

.new-permit-button {
    min-height: 48px;
    font-size: 12px;
}

.metric-icon {
    width: 36px;
    height: 36px;
    font-size: 10px;
}

.trend,
.attention {
    font-size: 10px;
}

.metric-grid article > strong,
.compliance-card__value > strong {
    font-size: 31px;
}

.metric-grid article > p {
    margin: 7px 0 5px;
    font-size: 13px;
}

.metric-grid article > small {
    font-size: 10px;
}

.panel__heading {
    min-height: 78px;
}

.panel__heading h2 {
    font-size: 16px;
}

.panel__heading p,
.panel__heading > a {
    font-size: 11px;
}

th {
    padding: 13px 15px;
    font-size: 10px;
}

td {
    padding: 16px 15px;
    font-size: 12px;
}

td strong {
    font-size: 12px;
}

td small {
    font-size: 10px;
}

.status {
    padding: 7px 10px;
    font-size: 10px;
}

.attention-count {
    width: 27px;
    height: 27px;
    font-size: 11px;
}

.attention-list a {
    padding: 17px;
}

.attention-list__severity {
    width: 34px;
    height: 34px;
}

.attention-list strong {
    font-size: 11px;
}

.attention-list small {
    font-size: 10px;
}

.safety-note {
    padding: 15px;
}

.safety-note > span {
    font-size: 8px;
}

.safety-note strong {
    font-size: 11px;
}

.safety-note small {
    font-size: 9px;
}

.permit-type-grid a {
    min-height: 64px;
}

.permit-type-grid a > span {
    width: 38px;
    height: 38px;
    font-size: 9px;
}

.permit-type-grid strong {
    font-size: 12px;
}

.permit-type-grid small {
    font-size: 10px;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: 1fr 470px;
    }

    .login-story {
        padding-inline: 50px;
    }

    .login-story__proof {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .login-story__proof div,
    .login-story__proof div + div {
        padding: 0 0 0 16px;
        border-right: 0;
        border-left: 1px solid rgba(255, 255, 255, .12);
    }

    .login-story__proof span {
        display: none;
    }

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

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

@media (max-width: 960px) {
    .install-shell {
        grid-template-columns: 1fr;
    }

    .install-brand {
        position: relative;
        height: auto;
        min-height: 520px;
        padding-top: 130px;
    }

    .install-panel {
        max-width: none;
        min-height: 0;
    }
}

@media (max-width: 900px) {
    .login-shell {
        display: block;
    }

    .login-story {
        display: none;
    }

    .login-panel {
        padding-top: 30px;
    }

    .login-panel__mobile-brand {
        display: block;
        width: min(100%, 430px);
        margin-bottom: auto;
    }

    .login-card {
        margin: 60px 0;
    }

    .sidebar {
        width: 260px;
        box-shadow: 30px 0 80px rgba(7, 25, 42, .15);
        transform: translateX(-110%);
        transition: transform 180ms ease;
    }

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

    .sidebar__close {
        display: block;
        padding: 5px;
        border: 0;
        color: #83909a;
        background: transparent;
        font-size: 20px;
    }

    .dashboard {
        margin-left: 0;
    }

    .mobile-menu {
        display: flex;
        width: 32px;
        height: 32px;
        padding: 8px 6px;
        justify-content: space-around;
        flex-direction: column;
        border: 0;
        border-radius: 6px;
        background: var(--surface-soft);
    }

    .mobile-menu span {
        width: 100%;
        height: 1px;
        background: var(--ink);
    }

    .topbar {
        padding-inline: 20px;
        gap: 15px;
    }

    .global-search {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 680px) {
    .form-grid,
    .form-grid--three {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .install-panel {
        padding: 45px 22px;
    }

    .install-brand {
        min-height: 580px;
        padding: 130px 28px 60px;
    }

    .install-brand .brand {
        left: 28px;
    }

    .install-brand h1 {
        font-size: 42px;
    }

    .topbar__actions {
        gap: 10px;
    }

    .notification-button,
    .user-menu summary > span:not(.user-menu__avatar),
    .global-search kbd {
        display: none;
    }

    .user-menu summary {
        padding-left: 10px;
    }

    .dashboard__content {
        padding: 25px 18px 45px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .new-permit-button {
        width: 100%;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

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

    .panel__heading {
        align-items: flex-start;
        gap: 15px;
    }

    .login-panel {
        padding-inline: 22px;
    }

    .login-card {
        margin: 42px 0;
    }

    .login-card__intro h2 {
        font-size: 28px;
    }

    .simple-auth-card {
        padding: 30px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* PermitPin 2.1 subscriptions and Super Admin */

.notice--success {
    border-color: #bfe4d4;
    color: #126448;
    background: #edf9f4;
}

.button-secondary--disabled {
    opacity: .62;
    cursor: default;
}

.login-card__support--admin {
    margin-top: 10px;
}

.super-login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(430px, .92fr) minmax(560px, 1.08fr);
    background: #fff;
}

.super-login-brand {
    display: flex;
    min-height: 100vh;
    padding: 58px clamp(42px, 6vw, 105px);
    justify-content: space-between;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 78% 18%, rgba(46, 111, 241, .32), transparent 30%),
        linear-gradient(145deg, #061726 0%, #0a2033 62%, #123a5b 100%);
}

.super-login-brand h1 {
    max-width: 650px;
    margin: 18px 0;
    font-size: clamp(42px, 5vw, 72px);
    font-weight: 470;
    line-height: 1.04;
    letter-spacing: -.055em;
}

.super-login-brand > div > p:last-child {
    max-width: 580px;
    margin: 0;
    color: #b8c8d6;
    font-size: 17px;
    line-height: 1.65;
}

.super-login-brand footer {
    color: #91a7b8;
    font-size: 13px;
}

.super-login-panel {
    display: grid;
    min-height: 100vh;
    padding: 48px;
    place-items: center;
    background: #f5f7f9;
}

.super-login-card {
    width: min(100%, 520px);
    padding: clamp(34px, 5vw, 62px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(7, 25, 42, .1);
}

.super-login-card__mark {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 26px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--blue);
    font-size: 13px;
    font-weight: 650;
}

.super-login-card h2 {
    margin: 8px 0 10px;
    font-size: 34px;
    font-weight: 520;
    letter-spacing: -.04em;
}

.super-login-card > p:not(.eyebrow) {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.super-login-card .button {
    width: 100%;
    margin-top: 5px;
}

.super-login-card .text-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
}

.super-console-label {
    display: flex;
    margin: 8px 14px 22px;
    padding: 13px;
    align-items: center;
    gap: 11px;
    border: 1px solid #dce5eb;
    border-radius: 10px;
    background: #f6f9fb;
}

.super-console-label > span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--navy);
    font-size: 9px;
    font-weight: 680;
}

.super-console-label p,
.super-console-label strong,
.super-console-label small {
    display: block;
    margin: 0;
}

.super-console-label small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.super-console-label strong {
    font-size: 12px;
    font-weight: 620;
}

.super-topbar {
    justify-content: space-between;
}

.super-topbar__title span,
.super-topbar__title strong {
    display: block;
}

.super-topbar__title span {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.super-topbar__title strong {
    font-size: 14px;
    font-weight: 590;
}

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

.metrics-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metrics-grid .metric-card {
    min-width: 0;
    min-height: 145px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(7, 25, 42, .03);
}

.metric-card__icon {
    display: grid;
    width: 31px;
    height: 31px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 8px;
    color: #536575;
    background: #edf1f4;
    font-size: 8px;
    font-weight: 680;
}

.metric-card__icon--blue { color: var(--blue); background: var(--blue-soft); }
.metric-card__icon--green { color: var(--green); background: var(--green-soft); }
.metric-card__icon--amber { color: #996200; background: var(--amber-soft); }
.metric-card__icon--red { color: var(--red); background: var(--red-soft); }

.metrics-grid .metric-card p {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 12px;
}

.metrics-grid .metric-card > strong {
    display: block;
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 520;
    letter-spacing: -.035em;
}

.metrics-grid .metric-card > small {
    color: var(--muted);
    font-size: 11px;
}

.super-dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .62fr);
}

.plan-mix-list,
.attention-list {
    display: grid;
}

.plan-mix-list a,
.attention-list a {
    display: flex;
    padding: 15px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.plan-mix-list a:last-child,
.attention-list a:last-child {
    border-bottom: 0;
}

.plan-mix-list a:hover,
.attention-list a:hover {
    background: #f8fafb;
}

.plan-mix-list strong,
.plan-mix-list small,
.attention-list strong,
.attention-list small {
    display: block;
}

.plan-mix-list strong,
.attention-list strong {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 600;
}

.plan-mix-list small,
.attention-list small,
.attention-list time {
    color: var(--muted);
    font-size: 11px;
}

.plan-mix-list b {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 11px;
}

.admin-filter-bar {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(150px, .55fr)) auto auto;
    align-items: end;
    gap: 12px;
}

.admin-filter-bar .field {
    margin: 0;
}

.company-summary-strip {
    display: grid;
    margin-bottom: 20px;
    padding: 18px 22px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.company-summary-strip > div {
    min-width: 0;
    padding-right: 16px;
    border-right: 1px solid var(--line);
}

.company-summary-strip > div:last-child {
    padding-right: 0;
    border-right: 0;
}

.company-summary-strip small,
.company-summary-strip strong {
    display: block;
}

.company-summary-strip small {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.company-summary-strip strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 590;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-list {
    padding: 17px 19px;
}

.timeline-list article {
    display: grid;
    padding-bottom: 18px;
    grid-template-columns: 10px 1fr;
    gap: 10px;
}

.timeline-list article:last-child {
    padding-bottom: 0;
}

.timeline-list article > span {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 0 0 2px #bcd0fb;
}

.timeline-list strong {
    font-size: 12px;
    font-weight: 610;
}

.timeline-list p {
    margin: 4px 0;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.45;
}

.timeline-list small {
    color: var(--muted);
    font-size: 10px;
}

.onboarding-form {
    display: grid;
    gap: 0;
}

.onboarding-form .content-card__header > div {
    position: relative;
    padding-left: 44px;
}

.step-number {
    position: absolute;
    left: 0;
    top: 1px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 11px;
    font-weight: 650;
}

.plan-choice-grid {
    display: grid;
    margin-top: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.plan-choice {
    position: relative;
    cursor: pointer;
}

.plan-choice > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-choice > span {
    display: flex;
    min-height: 138px;
    padding: 18px;
    flex-direction: column;
    border: 1px solid #d7dfe5;
    border-radius: 10px;
    background: #fff;
}

.plan-choice > input:checked + span {
    border-color: var(--blue);
    background: #f5f8ff;
    box-shadow: 0 0 0 3px rgba(36, 99, 235, .09);
}

.plan-choice strong,
.plan-choice b,
.plan-choice em {
    display: block;
    font-style: normal;
}

.plan-choice strong {
    margin-bottom: 14px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 620;
}

.plan-choice b {
    margin-bottom: 10px;
    font-size: 25px;
    font-weight: 520;
    letter-spacing: -.04em;
}

.plan-choice b small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.plan-choice em {
    margin-top: auto;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.form-submit-bar {
    display: flex;
    padding: 18px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #c8d8f9;
    border-radius: 11px;
    background: #f3f7ff;
}

.form-submit-bar p,
.form-submit-bar strong,
.form-submit-bar small {
    display: block;
    margin: 0;
}

.form-submit-bar strong {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 610;
}

.form-submit-bar small {
    color: var(--muted);
    font-size: 11px;
}

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

.plan-admin-card__header {
    display: flex;
    padding: 20px 22px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--line);
}

.plan-admin-card__header > div > span {
    display: grid;
    width: 31px;
    height: 31px;
    margin-bottom: 13px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 8px;
    font-weight: 680;
}

.plan-admin-card__header h2 {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 560;
}

.plan-admin-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.plan-admin-card__header > strong {
    font-size: 22px;
    font-weight: 520;
    white-space: nowrap;
}

.plan-admin-card__header > strong small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.limit-editor {
    margin-bottom: 16px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f9fafb;
}

.limit-editor .field {
    margin-bottom: 7px;
}

.current-plan-hero {
    display: grid;
    margin-bottom: 18px;
    padding: 28px;
    grid-template-columns: minmax(260px, 1.3fr) auto minmax(420px, 1fr);
    align-items: center;
    gap: 34px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #071b2c, #0e3553);
    box-shadow: 0 18px 45px rgba(7, 25, 42, .16);
}

.current-plan-hero__label {
    display: inline-block;
    margin-bottom: 12px;
    color: #91b6d0;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.current-plan-hero h2 {
    margin: 0 0 6px;
    font-size: 31px;
    font-weight: 510;
    letter-spacing: -.04em;
}

.current-plan-hero p {
    margin: 0 0 13px;
    color: #b9cad6;
    font-size: 13px;
    line-height: 1.5;
}

.current-plan-hero > strong {
    font-size: 34px;
    font-weight: 510;
    letter-spacing: -.04em;
}

.current-plan-hero > strong small {
    color: #9db4c4;
    font-size: 11px;
    font-weight: 400;
}

.current-plan-hero dl {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.current-plan-hero dl div {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .15);
}

.current-plan-hero dt {
    margin-bottom: 6px;
    color: #91aabd;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.current-plan-hero dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.usage-card-grid {
    display: grid;
    margin-bottom: 42px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.usage-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.usage-card > div:first-child {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    gap: 11px;
}

.usage-card > div:first-child > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 8px;
    font-weight: 680;
}

.usage-card p,
.usage-card strong,
.usage-card small {
    display: block;
    margin: 0;
}

.usage-card strong {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 610;
}

.usage-card small {
    color: var(--muted);
    font-size: 11px;
}

.usage-card > b {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 11px;
    font-weight: 610;
}

.usage-progress {
    height: 7px;
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf1f4;
}

.usage-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.plans-section {
    margin-bottom: 24px;
}

.plans-section > header {
    max-width: 720px;
    margin: 0 auto 26px;
    text-align: center;
}

.plans-section > header h2 {
    margin: 8px 0 10px;
    font-size: 30px;
    font-weight: 520;
    letter-spacing: -.04em;
}

.plans-section > header > p:last-child {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

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

.plan-card {
    position: relative;
    display: flex;
    min-height: 440px;
    padding: 27px;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.plan-card--featured {
    border-color: #b9cdf8;
    box-shadow: 0 16px 40px rgba(36, 99, 235, .09);
}

.plan-card--current {
    border-color: var(--blue);
}

.plan-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 8px;
    border-radius: 99px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 9px;
    font-weight: 620;
}

.plan-card h3 {
    margin: 13px 0 12px;
    font-size: 37px;
    font-weight: 500;
    letter-spacing: -.05em;
}

.plan-card h3 small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.plan-card > p:not(.eyebrow) {
    min-height: 47px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.plan-card ul {
    display: grid;
    margin: 22px 0;
    padding: 19px 0 0;
    gap: 13px;
    border-top: 1px solid var(--line);
    list-style: none;
}

.plan-card li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 12px;
}

.plan-card li span {
    color: var(--green);
}

.plan-card > .button,
.plan-card > .button-secondary,
.plan-card > form {
    width: 100%;
    margin-top: auto;
}

.plan-card > form .button-secondary {
    width: 100%;
}

.capacity-banner {
    display: flex;
    margin-bottom: 18px;
    padding: 13px 15px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #d9e4f8;
    border-radius: 10px;
    background: #f5f8ff;
}

.capacity-banner--full {
    border-color: #f1d7a7;
    background: #fff8e9;
}

.capacity-banner > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.capacity-banner > div > span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: #fff;
    font-size: 8px;
    font-weight: 680;
}

.capacity-banner p,
.capacity-banner strong,
.capacity-banner small {
    display: block;
    margin: 0;
}

.capacity-banner strong {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 610;
}

.capacity-banner small {
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 1320px) {
    .metrics-grid--five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .current-plan-hero {
        grid-template-columns: minmax(240px, 1fr) auto;
    }

    .current-plan-hero dl {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1050px) {
    .super-login-shell {
        grid-template-columns: 1fr;
    }

    .super-login-brand {
        display: none;
    }

    .super-login-panel {
        padding: 25px;
    }

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

    .company-summary-strip > div {
        border-right: 0;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        min-height: 0;
    }
}

@media (max-width: 780px) {
    .metrics-grid--five,
    .metrics-grid,
    .plan-admin-grid,
    .plan-choice-grid,
    .usage-card-grid,
    .company-summary-strip {
        grid-template-columns: 1fr;
    }

    .admin-filter-bar {
        grid-template-columns: 1fr;
    }

    .current-plan-hero {
        padding: 23px;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .current-plan-hero dl {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .current-plan-hero dl div {
        padding: 0;
        border-left: 0;
    }

    .form-submit-bar,
    .capacity-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .form-submit-bar .button,
    .capacity-banner .button-secondary {
        width: 100%;
    }

    .super-topbar__title {
        display: none;
    }
}

/* Operational application */

.app-page {
    font-size: 15px;
}

.app-page .dashboard__content {
    max-width: 1580px;
}

.page-heading--compact {
    margin-bottom: 24px;
}

.page-heading__actions,
.toolbar,
.action-row,
.button-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-heading h1 {
    font-size: clamp(29px, 2.4vw, 40px);
}

.page-heading > div > p:not(.eyebrow) {
    font-size: 15px;
}

.button,
.button-secondary,
.button-danger,
.button-quiet {
    display: inline-flex;
    min-height: 44px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 580;
    line-height: 1.2;
}

.button {
    color: #fff;
    background: var(--blue);
    box-shadow: 0 8px 20px rgba(36, 99, 235, .16);
}

.button:hover {
    background: #174fcb;
}

.button-secondary {
    border-color: #cfd9e2;
    color: var(--ink);
    background: #fff;
}

.button-secondary:hover,
.button-quiet:hover {
    background: #f4f7fa;
}

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

.button-quiet {
    min-height: 38px;
    padding-inline: 12px;
    color: var(--blue);
    background: transparent;
}

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

.content-card {
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(7, 25, 42, .035);
}

.content-card__header {
    display: flex;
    min-height: 68px;
    padding: 18px 22px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.content-card__header h2,
.content-card__header h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 610;
    letter-spacing: -.02em;
}

.content-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.content-card__body {
    padding: 22px;
}

.content-card--narrow {
    max-width: 900px;
}

.filter-bar {
    display: grid;
    padding: 18px;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(150px, .55fr)) auto;
    align-items: end;
    gap: 13px;
}

.app-page .field {
    display: flex;
    min-width: 0;
    min-height: 0;
    margin-bottom: 17px;
    padding: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.app-page .field:last-child {
    margin-bottom: 0;
}

.app-page .field:focus-within {
    border: 0;
    box-shadow: none;
}

.app-page .field label,
.fieldset-title {
    color: #273a4a;
    font-size: 13px;
    font-weight: 590;
}

.app-page .field small,
.help-text {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.app-page .field input,
.app-page .field select,
.app-page .field textarea,
.filter-bar input,
.filter-bar select,
.inline-form input,
.inline-form select {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid #ced8e0;
    border-radius: 7px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
}

.app-page .field textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.app-page .field input:focus,
.app-page .field select:focus,
.app-page .field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #6f9cf6;
    box-shadow: 0 0 0 3px rgba(36, 99, 235, .09);
}

.app-page .field input[readonly] {
    color: var(--ink-soft);
    background: #f5f7f8;
}

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

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

.form-grid .field--full {
    grid-column: 1 / -1;
}

.checkbox-field,
.check-list label {
    display: flex;
    min-height: 42px;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.45;
}

.checkbox-field input,
.check-list input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--blue);
}

.check-list {
    display: grid;
    gap: 8px;
}

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

.data-table th,
.data-table td {
    padding: 15px 17px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th {
    color: #667784;
    background: #fafbfc;
    font-size: 12px;
    font-weight: 620;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.data-table tbody tr:hover {
    background: #fbfcfe;
}

.data-table td strong {
    display: block;
    margin-bottom: 3px;
    font-weight: 610;
}

.data-table td small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.data-table a:not(.button):not(.button-secondary):not(.status) {
    color: var(--blue);
}

.table-action {
    white-space: nowrap;
    text-align: right !important;
}

.empty-panel {
    padding: 52px 24px;
    text-align: center;
}

.empty-panel span {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    place-items: center;
    border-radius: 12px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 21px;
}

.empty-panel h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 610;
}

.empty-panel p {
    max-width: 500px;
    margin: 0 auto 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.status {
    white-space: nowrap;
    font-size: 12px;
}

.risk-badge,
.type-badge,
.priority-badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    color: #4e5f6d;
    background: #edf1f4;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.risk-badge--high,
.risk-badge--critical,
.priority-badge--critical {
    color: #9b2f29;
    background: var(--red-soft);
}

.risk-badge--medium,
.priority-badge--high {
    color: #8d5d0c;
    background: var(--amber-soft);
}

.risk-badge--low {
    color: #126846;
    background: var(--green-soft);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr);
    gap: 20px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--line);
}

.summary-grid > div {
    min-height: 85px;
    padding: 17px;
    background: #fff;
}

.summary-grid small,
.detail-list dt {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 620;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.summary-grid strong {
    font-size: 14px;
    font-weight: 590;
}

.detail-section + .detail-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.detail-section h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 610;
}

.detail-section p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}

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

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

.detail-list dt,
.detail-list dd {
    margin: 0;
}

.detail-list dd {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 0 0 21px 25px;
    color: var(--ink-soft);
    font-size: 13px;
}

.timeline li::before {
    position: absolute;
    top: 4px;
    left: 1px;
    width: 9px;
    height: 9px;
    border: 3px solid var(--blue-soft);
    border-radius: 50%;
    background: var(--blue);
    content: "";
}

.timeline li::after {
    position: absolute;
    top: 17px;
    bottom: 0;
    left: 7px;
    width: 1px;
    background: var(--line);
    content: "";
}

.timeline li:last-child::after {
    display: none;
}

.timeline strong,
.timeline small {
    display: block;
}

.timeline strong {
    margin-bottom: 3px;
    font-weight: 590;
}

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

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

.stat-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.stat-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 29px;
    font-weight: 560;
    letter-spacing: -.04em;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

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

.bar-chart__row {
    display: grid;
    grid-template-columns: minmax(130px, .65fr) minmax(220px, 2fr) 50px;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.bar-chart__track {
    height: 10px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf1f4;
}

.bar-chart__fill {
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: var(--blue);
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d7e3fc;
    border-radius: 9px;
    color: #284a85;
    background: #f1f6ff;
    font-size: 13px;
    line-height: 1.55;
}

.notice--warning {
    border-color: #f1dbad;
    color: #76500c;
    background: #fff8e9;
}

.notice--danger {
    border-color: #f0c7c2;
    color: #8f332d;
    background: var(--red-soft);
}

.action-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfd;
}

.action-panel + .action-panel {
    margin-top: 12px;
}

.action-panel h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 610;
}

.action-panel p {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.comments {
    display: grid;
    gap: 12px;
}

.comment {
    padding: 14px;
    border-radius: 8px;
    background: #f6f8fa;
}

.comment__meta {
    display: flex;
    margin-bottom: 7px;
    justify-content: space-between;
    gap: 15px;
    font-size: 12px;
}

.comment__meta strong {
    font-weight: 610;
}

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

.comment p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

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

.template-card {
    display: flex;
    min-height: 170px;
    padding: 19px;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.template-card:hover {
    border-color: #abc2f5;
    box-shadow: 0 9px 25px rgba(36, 99, 235, .08);
}

.template-card > span:first-child {
    width: fit-content;
    margin-bottom: 14px;
}

.template-card h3 {
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 610;
}

.template-card p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.template-card footer {
    display: flex;
    margin-top: auto;
    align-items: center;
    justify-content: space-between;
    color: var(--blue);
    font-size: 13px;
}

.split-list {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.4fr);
    gap: 20px;
}

.record-list {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    list-style: none;
    background: #fff;
}

.record-list a {
    display: block;
    padding: 15px 17px;
    border-bottom: 1px solid var(--line);
}

.record-list li:last-child a {
    border-bottom: 0;
}

.record-list a:hover,
.record-list a.is-active {
    background: var(--blue-soft);
}

.record-list strong,
.record-list small {
    display: block;
}

.record-list strong {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 610;
}

.record-list small {
    color: var(--muted);
    font-size: 12px;
}

.danger-zone {
    border-color: #efcfcb;
}

.danger-zone .content-card__header {
    color: #8f332d;
}

.permit-print {
    max-width: 1000px;
    margin: 30px auto;
    padding: 35px;
    background: #fff;
}

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

    .filter-bar .field:first-child {
        grid-column: 1 / -1;
    }

    .detail-grid,
    .split-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 780px) {
    .form-grid,
    .form-grid--three,
    .filter-bar,
    .summary-grid,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar .field:first-child,
    .form-grid .field--full {
        grid-column: auto;
    }

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

    .content-card__header,
    .page-heading__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .bar-chart__row {
        grid-template-columns: 100px minmax(120px, 1fr) 35px;
    }
}

@media print {
    .sidebar,
    .topbar,
    .page-heading__actions,
    .no-print {
        display: none !important;
    }

    body,
    .dashboard,
    .dashboard__content {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .content-card {
        break-inside: avoid;
        box-shadow: none;
    }
}

/* PermitPin 2.1.1 premium projects and secure imagery */

.projects-heading {
    align-items: center;
}

.projects-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
    align-items: start;
    gap: 22px;
}

.project-portfolio {
    min-width: 0;
}

.project-portfolio__header {
    display: flex;
    margin-bottom: 15px;
    padding: 2px 2px 0;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.project-portfolio__header h2 {
    margin: 0 0 5px;
    font-size: 21px;
    font-weight: 540;
    letter-spacing: -.025em;
}

.project-portfolio__header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.project-portfolio__count {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #d6e2fb;
    border-radius: 10px;
    color: var(--blue);
    background: #f3f7ff;
    font-size: 13px;
    font-weight: 620;
}

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

.premium-project-card {
    position: relative;
    min-width: 0;
    overflow: visible;
    border: 1px solid #dde5eb;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(7, 25, 42, .05);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.premium-project-card:hover {
    border-color: #bfd0f4;
    box-shadow: 0 16px 42px rgba(7, 25, 42, .09);
    transform: translateY(-2px);
}

.premium-project-card--current {
    border-color: #8eb0f7;
    box-shadow: 0 12px 34px rgba(36, 99, 235, .09);
}

.premium-project-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background: #e9eff4;
}

.premium-project-card__image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.premium-project-card__image::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 42%;
    content: "";
    pointer-events: none;
    background: linear-gradient(transparent, rgba(5, 20, 33, .42));
}

.project-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-content: center;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 48%),
        radial-gradient(circle at 75% 24%, rgba(60, 119, 238, .35), transparent 25%),
        linear-gradient(145deg, #0b263b, #174b70);
}

.project-image-placeholder::before,
.project-image-placeholder::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.project-image-placeholder::before {
    width: 180px;
    height: 180px;
    top: -92px;
    left: -55px;
}

.project-image-placeholder::after {
    width: 260px;
    height: 260px;
    right: -110px;
    bottom: -160px;
}

.project-image-placeholder span {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 9px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 610;
    letter-spacing: .04em;
}

.project-image-placeholder p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    letter-spacing: .03em;
}

.premium-project-card__badges {
    position: absolute;
    z-index: 2;
    right: 14px;
    bottom: 13px;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.project-current-badge,
.project-status-badge {
    display: inline-flex;
    min-height: 27px;
    padding: 0 9px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 99px;
    color: #fff;
    background: rgba(7, 25, 42, .58);
    backdrop-filter: blur(8px);
    font-size: 9px;
    font-weight: 590;
    letter-spacing: .02em;
}

.project-current-badge {
    margin-right: auto;
    background: rgba(36, 99, 235, .88);
}

.project-status-badge--green { background: rgba(14, 116, 83, .88); }
.project-status-badge--amber { background: rgba(157, 101, 2, .9); }
.project-status-badge--red { background: rgba(174, 48, 41, .88); }
.project-status-badge--blue { background: rgba(36, 99, 235, .88); }
.project-status-badge--grey { background: rgba(49, 64, 76, .84); }

.premium-project-card__body {
    padding: 20px;
}

.premium-project-card__title {
    display: flex;
    margin-bottom: 11px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.premium-project-card__title p {
    margin: 0 0 4px;
    color: var(--blue);
    font-size: 9px;
    font-weight: 620;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.premium-project-card__title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 540;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.premium-project-card__title > span {
    display: grid;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    place-items: center;
    border-radius: 8px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 9px;
    font-weight: 650;
}

.premium-project-card__address {
    display: flex;
    min-height: 22px;
    margin: 0 0 10px;
    align-items: flex-start;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.45;
}

.premium-project-card__address span {
    color: var(--blue);
    font-size: 15px;
}

.premium-project-card__description {
    min-height: 39px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.project-card-stats {
    display: grid;
    margin: 17px 0;
    padding: 14px 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.project-card-stats div {
    padding: 0 11px;
    border-right: 1px solid var(--line);
}

.project-card-stats div:first-child {
    padding-left: 0;
}

.project-card-stats div:last-child {
    padding-right: 0;
    border-right: 0;
}

.project-card-stats dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 9px;
}

.project-card-stats dd {
    margin: 0;
    font-size: 18px;
    font-weight: 520;
    letter-spacing: -.025em;
}

.project-programme {
    display: grid;
    margin-bottom: 17px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 9px;
}

.project-programme div:last-child {
    text-align: right;
}

.project-programme small,
.project-programme strong {
    display: block;
}

.project-programme small {
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
}

.project-programme strong {
    font-size: 11px;
    font-weight: 580;
}

.project-programme > span {
    color: #a1adb7;
    font-size: 13px;
}

.premium-project-card__actions {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.premium-project-card__actions > form,
.premium-project-card__actions > form .button,
.premium-project-card__actions > .button {
    width: 100%;
}

.project-image-manager {
    position: relative;
}

.project-image-manager > summary {
    display: inline-flex;
    min-height: 44px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfd9e2;
    border-radius: 8px;
    color: var(--ink-soft);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 570;
    list-style: none;
    white-space: nowrap;
}

.project-image-manager > summary::-webkit-details-marker {
    display: none;
}

.project-image-manager[open] > summary {
    border-color: #9eb9f4;
    color: var(--blue);
    background: #f6f9ff;
}

.project-image-manager__panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 9px);
    right: 0;
    width: min(340px, 82vw);
    padding: 16px;
    border: 1px solid #d5dfe7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(7, 25, 42, .2);
}

.project-image-manager__panel .button-secondary {
    width: 100%;
}

.project-image-upload {
    margin-bottom: 13px;
}

.project-image-upload__preview {
    position: relative;
    display: grid;
    width: 100%;
    min-height: 145px;
    margin-bottom: 10px;
    overflow: hidden;
    place-items: center;
    border: 1px dashed #c9d6df;
    border-radius: 10px;
    background: #f3f6f8;
}

.project-image-upload__preview img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
}

.project-image-upload__preview [hidden] {
    display: none !important;
}

.project-image-upload__preview > div {
    padding: 22px;
    color: var(--muted);
    text-align: center;
}

.project-image-upload__preview > div span {
    display: grid;
    width: 37px;
    height: 37px;
    margin: 0 auto 8px;
    place-items: center;
    border-radius: 9px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 8px;
    font-weight: 680;
}

.project-image-upload__preview > div p {
    margin: 0;
    font-size: 11px;
}

.project-file-button {
    display: flex;
    min-height: 42px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd7df;
    border-radius: 8px;
    color: var(--ink-soft);
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 580;
}

.project-file-button:hover {
    border-color: #9ab6f2;
    color: var(--blue);
    background: #f7f9ff;
}

.project-file-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.project-image-upload > small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.project-image-remove {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.project-image-remove button {
    width: 100%;
    padding: 7px;
    border: 0;
    color: var(--red);
    background: transparent;
    font-size: 11px;
}

.project-image-remove button:hover {
    text-decoration: underline;
}

.project-create-card {
    position: sticky;
    top: 84px;
    overflow: hidden;
}

.project-create-card .content-card__header {
    background: linear-gradient(145deg, #f8faff, #fff);
}

.project-create-card .content-card__header .eyebrow {
    margin-bottom: 7px;
    color: var(--blue);
    font-size: 9px;
}

.project-image-upload--create {
    margin: 2px 0 22px;
    padding: 13px;
    border: 1px solid #dce4ea;
    border-radius: 11px;
    background: #f8fafb;
}

.project-image-upload--create .project-image-upload__preview,
.project-image-upload--create .project-image-upload__preview img {
    height: 180px;
}

.project-image-upload--create .project-image-upload__preview {
    min-height: 180px;
}

.project-create-submit {
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 1420px) {
    .projects-page-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .project-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1050px) {
    .projects-page-grid {
        grid-template-columns: 1fr;
    }

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

    .project-create-card {
        position: static;
    }
}

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

    .premium-project-card__image {
        height: 210px;
    }

    .premium-project-card__actions {
        grid-template-columns: 1fr;
    }

    .project-image-manager > summary {
        width: 100%;
    }

    .project-image-manager__panel {
        position: static;
        width: 100%;
        margin-top: 9px;
        box-shadow: none;
    }
}

/* PermitPin 2.1.2 professional permit register */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.permit-register-page {
    --permit-radius: 6px;
    --permit-control-radius: 4px;
}

.permit-register-page .permit-square-button,
.permit-register-page .button,
.permit-register-page .button-secondary,
.permit-register-page .button-quiet {
    border-radius: var(--permit-control-radius);
    font-weight: 570;
    box-shadow: none;
}

.permit-register-heading {
    align-items: center;
}

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

.permit-register-summary article {
    display: flex;
    min-width: 0;
    min-height: 112px;
    padding: 17px;
    align-items: flex-start;
    gap: 13px;
    border: 1px solid #dfe6eb;
    border-radius: var(--permit-radius);
    background: #fff;
    box-shadow: 0 4px 14px rgba(7, 25, 42, .025);
}

.permit-summary-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: var(--permit-control-radius);
    color: #536575;
    background: #edf1f4;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .04em;
}

.permit-summary-icon--blue { color: var(--blue); background: var(--blue-soft); }
.permit-summary-icon--green { color: var(--green); background: var(--green-soft); }
.permit-summary-icon--amber { color: #8c5b05; background: var(--amber-soft); }
.permit-summary-icon--red { color: var(--red); background: var(--red-soft); }

.permit-register-summary small,
.permit-register-summary strong,
.permit-register-summary p {
    display: block;
    margin: 0;
}

.permit-register-summary small {
    margin: 1px 0 5px;
    color: var(--muted);
    font-size: 11px;
}

.permit-register-summary strong {
    margin-bottom: 4px;
    font-size: 24px;
    font-weight: 520;
    line-height: 1;
    letter-spacing: -.03em;
}

.permit-register-summary p {
    overflow: hidden;
    color: #83909a;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permit-filter-panel {
    margin-bottom: 18px;
    border: 1px solid #dce4e9;
    border-radius: var(--permit-radius);
    background: #fff;
    box-shadow: 0 5px 18px rgba(7, 25, 42, .025);
}

.permit-filter-panel > header {
    display: flex;
    min-height: 66px;
    padding: 15px 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e7ecef;
}

.permit-filter-panel > header h2 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 580;
    letter-spacing: -.015em;
}

.permit-filter-panel > header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.permit-filter-panel > header > a {
    display: inline-flex;
    min-height: 34px;
    padding: 0 10px;
    align-items: center;
    border: 1px solid #d4dde3;
    border-radius: var(--permit-control-radius);
    color: var(--ink-soft);
    background: #fff;
    font-size: 11px;
    font-weight: 560;
}

.permit-filter-panel > header > a:hover {
    border-color: #a8bce8;
    color: var(--blue);
    background: #f7f9ff;
}

.permit-filter-grid {
    display: grid;
    padding: 17px 18px;
    grid-template-columns: minmax(250px, 1.45fr) repeat(3, minmax(145px, .62fr)) auto;
    align-items: end;
    gap: 11px;
}

.permit-register-page .permit-filter-grid .field {
    margin: 0;
    gap: 6px;
}

.permit-register-page .permit-filter-grid .field label {
    color: #4f606d;
    font-size: 11px;
    font-weight: 580;
}

.permit-register-page .permit-filter-grid input,
.permit-register-page .permit-filter-grid select {
    min-height: 43px;
    border-color: #ccd6dd;
    border-radius: var(--permit-control-radius);
    color: var(--ink);
    background-color: #fff;
    font-size: 13px;
}

.permit-register-page .permit-filter-grid input:focus,
.permit-register-page .permit-filter-grid select:focus {
    border-color: #7197e8;
    box-shadow: 0 0 0 2px rgba(36, 99, 235, .08);
}

.permit-filter-submit {
    min-height: 43px !important;
    padding-inline: 17px !important;
}

.permit-register-card {
    overflow: hidden;
    border: 1px solid #dce4e9;
    border-radius: var(--permit-radius);
    background: #fff;
    box-shadow: 0 7px 24px rgba(7, 25, 42, .035);
}

.permit-register-card__header {
    display: flex;
    min-height: 70px;
    padding: 16px 19px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #dfe6eb;
    background: #fbfcfd;
}

.permit-register-card__header h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 580;
    letter-spacing: -.02em;
}

.permit-register-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.permit-register-card__header > span {
    display: inline-flex;
    min-height: 30px;
    padding: 0 9px;
    align-items: center;
    border: 1px solid #cfdaef;
    border-radius: var(--permit-control-radius);
    color: var(--blue);
    background: #f3f7ff;
    font-size: 10px;
    font-weight: 590;
    letter-spacing: .04em;
}

.permit-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.permit-register-table {
    width: 100%;
    min-width: 1150px;
    border-collapse: separate;
    border-spacing: 0;
}

.permit-register-table th,
.permit-register-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #e8edf0;
    text-align: left;
    vertical-align: middle;
}

.permit-register-table th {
    color: #657682;
    background: #fff;
    font-size: 10px;
    font-weight: 590;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.permit-register-table th:first-child,
.permit-register-table td:first-child {
    padding-left: 19px;
}

.permit-register-table td:first-child {
    display: table-cell;
    flex-direction: initial;
    gap: 0;
}

.permit-register-table th:last-child,
.permit-register-table td:last-child {
    padding-right: 19px;
}

.permit-register-table tbody tr:last-child td {
    border-bottom: 0;
}

.permit-register-table tbody tr {
    position: relative;
    background: #fff;
    transition: background 120ms ease;
}

.permit-register-table tbody tr:hover {
    background: #f9fbfd;
}

.permit-register-table tbody tr td:first-child {
    border-left: 3px solid transparent;
}

.permit-register-table tbody tr.permit-row--critical td:first-child {
    border-left-color: var(--red);
}

.permit-register-table tbody tr.permit-row--high td:first-child {
    border-left-color: #e27a30;
}

.permit-register-table tbody tr.permit-row--medium td:first-child {
    border-left-color: var(--amber);
}

.permit-register-table tbody tr.permit-row--low td:first-child {
    border-left-color: var(--green);
}

.permit-register-table td {
    color: var(--ink-soft);
    font-size: 13px;
}

.permit-register-table td strong,
.permit-register-table td small,
.permit-register-table td .permit-cell-label {
    display: block;
}

.permit-register-table td strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 570;
    line-height: 1.35;
}

.permit-register-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.permit-primary-cell {
    width: 250px;
}

.permit-primary-cell > a {
    display: block;
}

.permit-primary-cell > a:hover strong {
    color: var(--blue);
}

.permit-reference-box {
    display: inline-flex;
    min-height: 24px;
    margin-bottom: 7px;
    padding: 0 7px;
    align-items: center;
    border: 1px solid #cbd8f2;
    border-radius: var(--permit-control-radius);
    color: var(--blue);
    background: #f4f7ff;
    font-size: 9px;
    font-weight: 590;
    letter-spacing: .045em;
}

.permit-type-cell {
    display: grid;
    min-width: 195px;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.permit-type-code {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #d9e1e6;
    border-radius: var(--permit-control-radius);
    color: #536574;
    background: #f3f6f8;
    font-size: 8px;
    font-weight: 600;
}

.permit-risk-box {
    display: inline-flex;
    min-height: 22px;
    margin-top: 6px;
    padding: 0 6px;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--permit-control-radius);
    font-size: 9px;
    font-weight: 590;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.permit-risk-box--critical,
.permit-risk-box--high {
    border-color: #efcbc7;
    color: #9b2f29;
    background: var(--red-soft);
}

.permit-risk-box--medium {
    border-color: #efdbb8;
    color: #85570a;
    background: var(--amber-soft);
}

.permit-risk-box--low {
    border-color: #c4e4d5;
    color: #126846;
    background: var(--green-soft);
}

.permit-cell-label {
    margin-bottom: 5px;
    color: #84919a;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.permit-person-cell {
    display: grid;
    min-width: 160px;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.permit-person-cell > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid #d7e0e6;
    border-radius: var(--permit-control-radius);
    color: #4f6271;
    background: #f4f6f8;
    font-size: 10px;
    font-weight: 590;
}

.permit-status-box {
    display: inline-flex;
    min-height: 28px;
    padding: 0 8px;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: var(--permit-control-radius);
    font-size: 10px;
    font-weight: 570;
    white-space: nowrap;
}

.permit-status-box i {
    width: 5px;
    height: 5px;
    background: currentColor;
}

.permit-status-box--green { border-color: #bee2d2; color: var(--green); background: var(--green-soft); }
.permit-status-box--amber { border-color: #edd8ae; color: #8b5b04; background: var(--amber-soft); }
.permit-status-box--red { border-color: #efc9c5; color: var(--red); background: var(--red-soft); }
.permit-status-box--grey { border-color: #d9e0e4; color: #667783; background: #f0f3f5; }
.permit-status-box--blue { border-color: #c8d7f8; color: var(--blue); background: var(--blue-soft); }

.permit-action-cell {
    width: 78px;
    text-align: right !important;
}

.permit-open-button {
    display: inline-flex;
    min-height: 34px;
    padding: 0 9px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cbd6dd;
    border-radius: var(--permit-control-radius);
    color: var(--ink-soft);
    background: #fff;
    font-size: 10px;
    font-weight: 570;
    white-space: nowrap;
}

.permit-open-button:hover {
    border-color: #93afe9;
    color: var(--blue);
    background: #f5f8ff;
}

.permit-open-button span {
    font-size: 13px;
}

.permit-register-empty .button {
    border-radius: var(--permit-control-radius);
}

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

    .permit-filter-search {
        grid-column: 1 / -1;
    }

    .permit-filter-submit {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .permit-register-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .permit-register-summary,
    .permit-filter-grid {
        grid-template-columns: 1fr;
    }

    .permit-filter-search {
        grid-column: auto;
    }

    .permit-filter-panel > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .permit-filter-panel > header > a {
        width: 100%;
        justify-content: center;
    }

    .permit-register-card__header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* PermitPin 2.2.0 plans and interactive Permit Pins */

[hidden] {
    display: none !important;
}

.ui-icon {
    display: block;
    flex: 0 0 auto;
}

.sidebar nav a > span .ui-icon,
.sidebar__bottom > a > span .ui-icon {
    width: 15px;
    height: 15px;
}

.sidebar__close {
    place-items: center;
    color: var(--ink-soft);
    background: transparent;
}

.global-search > span {
    display: grid;
    place-items: center;
}

.notification-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notification-button > .ui-icon {
    color: #6f7e89;
}

.plans-page,
.plan-viewer-page {
    --plan-radius: 5px;
}

.plans-heading {
    align-items: center;
}

.plan-square-button {
    border-radius: var(--plan-radius);
}

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

.plan-summary-grid article {
    display: flex;
    min-height: 112px;
    padding: 18px;
    align-items: flex-start;
    gap: 13px;
    border: 1px solid #dbe3e9;
    border-radius: var(--plan-radius);
    background: #fff;
    box-shadow: 0 6px 18px rgba(10, 32, 51, .035);
}

.plan-summary-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid;
    border-radius: 4px;
}

.plan-summary-icon--blue {
    border-color: #c8d9fa;
    color: var(--blue);
    background: #f1f5ff;
}

.plan-summary-icon--red {
    border-color: #f0cbc7;
    color: #b53b33;
    background: #fff3f1;
}

.plan-summary-icon--slate {
    border-color: #d5dee5;
    color: #526777;
    background: #f2f5f7;
}

.plan-summary-grid article > div {
    min-width: 0;
}

.plan-summary-grid small {
    display: block;
    margin-bottom: 5px;
    color: #647583;
    font-size: 12px;
    font-weight: 560;
}

.plan-summary-grid strong {
    display: block;
    color: var(--ink);
    font-size: 26px;
    font-weight: 560;
    line-height: 1;
}

.plan-summary-grid p {
    margin: 7px 0 0;
    color: #84919a;
    font-size: 12px;
}

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

.plans-layout--single {
    grid-template-columns: 1fr;
}

.plan-register-card,
.plan-upload-card,
.plan-workspace-card,
.plan-pin-create,
.plan-pin-register {
    border: 1px solid #d9e2e8;
    border-radius: var(--plan-radius);
    background: #fff;
    box-shadow: 0 7px 22px rgba(10, 32, 51, .04);
}

.plan-register-card__header {
    display: flex;
    min-height: 74px;
    padding: 18px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e1e7eb;
}

.plan-register-card__header h2,
.plan-upload-card h2,
.plan-pin-create h2,
.plan-pin-register h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.018em;
}

.plan-register-card__header p,
.plan-upload-card header p,
.plan-pin-create header p,
.plan-pin-register header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.plan-register-card__header > span {
    display: inline-flex;
    padding: 7px 9px;
    align-items: center;
    gap: 6px;
    border: 1px solid #d9e2e8;
    border-radius: 4px;
    color: #60717f;
    background: #f7f9fa;
    font-size: 11px;
    white-space: nowrap;
}

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

.project-plan-card {
    overflow: hidden;
    border: 1px solid #d9e2e8;
    border-radius: var(--plan-radius);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.project-plan-card:hover {
    border-color: #afc3ea;
    box-shadow: 0 10px 26px rgba(21, 64, 124, .09);
    transform: translateY(-1px);
}

.project-plan-card--archived {
    background: #fafbfb;
}

.project-plan-card__preview {
    position: relative;
    display: grid;
    overflow: hidden;
    height: 175px;
    place-items: center;
    border-bottom: 1px solid #e1e7eb;
    color: #5b6f7e;
    background:
        linear-gradient(rgba(218, 226, 232, .42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(218, 226, 232, .42) 1px, transparent 1px),
        #f6f8f9;
    background-size: 22px 22px;
}

.project-plan-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.8) contrast(.96);
    transition: transform .25s ease;
}

.project-plan-card:hover .project-plan-card__preview img {
    transform: scale(1.018);
}

.project-plan-card--archived .project-plan-card__preview {
    opacity: .72;
}

.project-plan-card__file-icon {
    display: grid;
    width: 74px;
    height: 82px;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px solid #cfd9e0;
    border-radius: 4px;
    color: #526777;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 7px 20px rgba(10, 32, 51, .08);
}

.project-plan-card__file-icon small {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
}

.project-plan-card__pin-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    min-height: 28px;
    padding: 0 8px;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(194, 207, 216, .95);
    border-radius: 4px;
    color: #3f5362;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 5px 14px rgba(10, 32, 51, .09);
    font-size: 11px;
    font-weight: 580;
}

.project-plan-card__body {
    padding: 16px;
}

.project-plan-card__meta {
    display: flex;
    margin-bottom: 9px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.project-plan-card__meta > span:first-child {
    color: var(--blue);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.plan-state {
    display: inline-flex;
    min-height: 25px;
    padding: 0 7px;
    align-items: center;
    border: 1px solid;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 580;
    white-space: nowrap;
}

.plan-state--current {
    border-color: #bfe0d2;
    color: #146b4a;
    background: #edf9f4;
}

.plan-state--archived {
    border-color: #d6dfe5;
    color: #687984;
    background: #f2f5f6;
}

.project-plan-card h3 {
    margin: 0 0 5px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.32;
}

.project-plan-card__body > p {
    margin: 0 0 14px;
    color: #697a86;
    font-size: 12px;
}

.project-plan-card dl {
    display: grid;
    margin: 0 0 15px;
    padding: 11px 0;
    grid-template-columns: .8fr 1.2fr;
    gap: 10px;
    border-top: 1px solid #e7ebee;
    border-bottom: 1px solid #e7ebee;
}

.project-plan-card dl div {
    min-width: 0;
}

.project-plan-card dt {
    margin-bottom: 3px;
    color: #8a969f;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.project-plan-card dd {
    overflow: hidden;
    margin: 0;
    color: #425665;
    font-size: 11px;
    font-weight: 560;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-plan-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-plan-card__actions form {
    margin-left: auto;
}

.plan-open-button,
.plan-icon-button {
    display: inline-flex;
    min-height: 36px;
    padding: 0 10px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #cbd6de;
    border-radius: 4px;
    color: #314858;
    background: #fff;
    font-size: 12px;
    font-weight: 580;
}

.plan-open-button:hover,
.plan-icon-button:hover {
    border-color: #91ade4;
    color: var(--blue);
    background: #f4f7ff;
}

.plan-icon-button {
    width: 36px;
    padding: 0;
    cursor: pointer;
}

.plan-empty-state {
    display: grid;
    min-height: 380px;
    padding: 50px 24px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.plan-empty-state > span,
.plan-pin-empty > span {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 15px;
    place-items: center;
    border: 1px solid #d4dee6;
    border-radius: 5px;
    color: #5b7080;
    background: #f4f7f9;
}

.plan-empty-state h3,
.plan-pin-empty h3 {
    margin: 0 0 7px;
    font-size: 18px;
    font-weight: 600;
}

.plan-empty-state p,
.plan-pin-empty p {
    max-width: 390px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.plan-upload-card {
    position: sticky;
    top: 88px;
}

.plan-upload-card > header,
.plan-pin-create > header {
    display: flex;
    min-height: 74px;
    padding: 17px 18px;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid #e1e7eb;
}

.plan-upload-card > header > span,
.plan-pin-create > header > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid #c9d8f5;
    border-radius: 4px;
    color: var(--blue);
    background: #f1f5ff;
}

.plan-upload-card form,
.plan-pin-create form {
    padding: 18px;
}

.plan-start-permit__body {
    padding: 18px;
}

.plan-start-permit__body > p {
    margin: 0 0 14px;
    color: #687985;
    font-size: 12px;
    line-height: 1.5;
}

.plan-start-permit__body .button {
    width: 100%;
}

.plan-upload-card .field,
.plan-pin-create .field {
    margin-bottom: 14px;
}

.plan-form-row {
    display: grid;
    grid-template-columns: .7fr 1.3fr;
    gap: 10px;
}

.plan-file-drop {
    display: grid;
    min-height: 138px;
    padding: 20px;
    place-items: center;
    align-content: center;
    border: 1px dashed #aebeca;
    border-radius: 5px;
    color: #526777;
    text-align: center;
    background: #f8fafb;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.plan-file-drop:hover,
.plan-file-drop.has-file {
    border-color: #6e94df;
    color: var(--blue);
    background: #f3f7ff;
}

.plan-file-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.plan-file-drop > span {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 9px;
    place-items: center;
    border: 1px solid #cdd8e0;
    border-radius: 4px;
    background: #fff;
}

.plan-file-drop strong {
    font-size: 13px;
    font-weight: 600;
}

.plan-file-drop small {
    max-width: 270px;
    margin-top: 5px;
    color: #7b8994;
    font-size: 11px;
    line-height: 1.4;
}

.plan-upload-note {
    display: flex;
    margin: 13px 0 15px;
    padding: 11px;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #dbe3e8;
    border-radius: 4px;
    color: #61727f;
    background: #f7f9fa;
}

.plan-upload-note .ui-icon {
    margin-top: 2px;
}

.plan-upload-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
}

.plan-upload-submit {
    width: 100%;
}

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

.plan-viewer-heading__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.plan-back-button {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid #cfd9e0;
    border-radius: 4px;
    color: #4c6170;
    background: #fff;
}

.plan-back-button:hover {
    border-color: #93afe6;
    color: var(--blue);
}

.plan-viewer-heading h1 {
    overflow: hidden;
    margin: 3px 0 4px;
    color: var(--ink);
    font-size: clamp(23px, 2vw, 31px);
    font-weight: 560;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-viewer-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.plan-viewer-heading__status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-viewer-heading__status > span:not(.plan-state) {
    display: inline-flex;
    min-height: 29px;
    padding: 0 8px;
    align-items: center;
    border: 1px solid #d6dfe5;
    border-radius: 4px;
    color: #60717e;
    background: #fff;
    font-size: 11px;
    white-space: nowrap;
}

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

.plan-workspace-card {
    min-width: 0;
    overflow: hidden;
}

.plan-toolbar {
    display: flex;
    min-height: 58px;
    padding: 9px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #dce4e9;
    background: #fff;
}

.plan-toolbar__group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.plan-toolbar button {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    padding: 0 9px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cfd9e0;
    border-radius: 4px;
    color: #455b6a;
    background: #fff;
    cursor: pointer;
}

.plan-toolbar button:hover:not(:disabled) {
    border-color: #8dabe4;
    color: var(--blue);
    background: #f4f7ff;
}

.plan-toolbar button:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.plan-toolbar button span,
.plan-toolbar__group > span {
    color: #627480;
    font-size: 11px;
    font-weight: 560;
}

.plan-zoom-readout {
    min-width: 44px;
    text-align: center;
}

.plan-placement-banner {
    display: flex;
    min-height: 48px;
    padding: 9px 13px;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #e1bd83;
    color: #784e08;
    background: #fff7e9;
}

.plan-placement-banner p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

.plan-placement-banner button {
    margin-left: auto;
    padding: 6px 8px;
    border: 1px solid #dfc08d;
    border-radius: 4px;
    color: #784e08;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
}

.plan-stage {
    position: relative;
    overflow: auto;
    min-height: 650px;
    height: calc(100vh - 235px);
    padding: 24px;
    background:
        linear-gradient(rgba(201, 212, 220, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 212, 220, .16) 1px, transparent 1px),
        #e9eef1;
    background-size: 24px 24px;
}

.plan-document {
    position: relative;
    overflow: visible;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 10px 30px rgba(10, 32, 51, .17);
}

.plan-document canvas,
.plan-document > img {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.plan-document > img {
    object-fit: contain;
}

.plan-pin-layer {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
}

.is-placing-pin .plan-document {
    cursor: crosshair;
}

.is-placing-pin .plan-document::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    border: 2px solid rgba(36, 99, 235, .58);
    content: "";
    pointer-events: none;
}

.is-placing-pin .permit-plan-pin {
    pointer-events: none;
}

.plan-loading {
    position: absolute;
    z-index: 6;
    inset: 24px;
    display: grid;
    place-items: center;
    align-content: center;
    color: #526777;
    background: rgba(242, 246, 248, .94);
}

.plan-loading > span {
    width: 30px;
    height: 30px;
    margin-bottom: 11px;
    border: 3px solid #d6e0e7;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: plan-spin .8s linear infinite;
}

.plan-loading p {
    margin: 0;
    font-size: 13px;
}

.plan-loading--error > span {
    display: none;
}

.plan-loading--error {
    color: #9d342e;
    background: #fff4f2;
}

@keyframes plan-spin {
    to { transform: rotate(360deg); }
}

.permit-plan-pin {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 3px;
    color: #fff;
    transform: translate(-13px, -27px);
    filter: drop-shadow(0 3px 5px rgba(10, 32, 51, .32));
}

.permit-plan-pin:hover,
.permit-plan-pin:focus-visible {
    z-index: 8;
}

.permit-plan-pin__marker {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 4px;
    background: #304b5d;
    transform: rotate(-45deg);
}

.permit-plan-pin__marker .ui-icon {
    transform: rotate(45deg);
}

.permit-plan-pin--low .permit-plan-pin__marker { background: #16845c; }
.permit-plan-pin--medium .permit-plan-pin__marker { background: #b57308; }
.permit-plan-pin--high .permit-plan-pin__marker { background: #c54b34; }
.permit-plan-pin--critical .permit-plan-pin__marker { background: #9f2626; }

.permit-plan-pin__label {
    max-width: 110px;
    overflow: hidden;
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 4px;
    color: #172c3b;
    background: rgba(255, 255, 255, .96);
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permit-plan-pin__popover {
    position: absolute;
    z-index: 10;
    bottom: calc(100% + 8px);
    left: 3px;
    display: none;
    width: 245px;
    padding: 12px;
    border: 1px solid #cad5dd;
    border-radius: 5px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 12px 28px rgba(10, 32, 51, .2);
}

.permit-plan-pin:hover .permit-plan-pin__popover,
.permit-plan-pin:focus-visible .permit-plan-pin__popover {
    display: grid;
    gap: 4px;
}

.permit-plan-pin__popover small {
    color: #71818d;
    font-size: 10px;
}

.permit-plan-pin__popover strong {
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
}

.permit-plan-pin__popover > span {
    color: #344a59;
    font-size: 12px;
    line-height: 1.35;
}

.permit-plan-pin__popover em {
    margin-top: 4px;
    padding-top: 7px;
    border-top: 1px solid #e5eaed;
    color: #6a7b87;
    font-size: 10px;
    font-style: normal;
}

.plan-pin-panel {
    display: grid;
    gap: 14px;
}

.plan-pin-create,
.plan-pin-register {
    overflow: hidden;
}

.plan-pin-create .field label span {
    color: #8b979f;
    font-size: 10px;
    font-weight: 450;
}

.plan-place-button {
    width: 100%;
    border-radius: 4px;
}

.plan-form-feedback {
    min-height: 17px;
    margin: 9px 0 0;
    color: #9a6208;
    font-size: 11px;
    line-height: 1.4;
}

.plan-pin-register > header {
    display: flex;
    min-height: 70px;
    padding: 16px 17px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e1e7eb;
}

.plan-pin-register > header > span {
    display: grid;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    place-items: center;
    border: 1px solid #d1dce3;
    border-radius: 4px;
    color: #526777;
    background: #f5f7f8;
    font-size: 11px;
    font-weight: 600;
}

.plan-pin-list {
    max-height: calc(100vh - 480px);
    min-height: 190px;
    overflow: auto;
}

.plan-pin-list article {
    position: relative;
    display: flex;
    border-bottom: 1px solid #e7ebee;
}

.plan-pin-list article:last-child {
    border-bottom: 0;
}

.plan-pin-list article > a {
    display: grid;
    min-width: 0;
    padding: 13px 42px 13px 14px;
    flex: 1;
    grid-template-columns: 28px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 9px;
}

.plan-pin-list article > a:hover {
    background: #f7f9fb;
}

.plan-list-pin {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 4px;
    color: #fff;
    background: #526777;
}

.plan-list-pin--low { background: #16845c; }
.plan-list-pin--medium { background: #b57308; }
.plan-list-pin--high { background: #c54b34; }
.plan-list-pin--critical { background: #9f2626; }

.plan-pin-list article > a > div {
    min-width: 0;
}

.plan-pin-list strong {
    display: block;
    margin-bottom: 2px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 600;
}

.plan-pin-list p {
    overflow: hidden;
    margin: 0 0 3px;
    color: #344a59;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-pin-list small {
    display: block;
    overflow: hidden;
    color: #7a8994;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-pin-list article > form {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
}

.plan-pin-list article > form button {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #8a969f;
    background: transparent;
    cursor: pointer;
}

.plan-pin-list article > form button:hover {
    border-color: #ebcbc8;
    color: #aa3731;
    background: #fff3f2;
}

.plan-pin-empty {
    display: grid;
    min-height: 220px;
    padding: 25px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.plan-pin-empty > span {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.plan-pin-empty h3 {
    font-size: 15px;
}

.plan-pin-empty p {
    margin-bottom: 0;
    font-size: 12px;
}

@media (max-width: 1280px) {
    .plans-layout {
        grid-template-columns: minmax(0, 1fr) 330px;
    }

    .plan-card-grid {
        grid-template-columns: 1fr;
    }

    .plan-viewer-layout {
        grid-template-columns: minmax(0, 1fr) 330px;
    }
}

@media (max-width: 1020px) {
    .plans-layout,
    .plan-viewer-layout {
        grid-template-columns: 1fr;
    }

    .plan-upload-card {
        position: static;
    }

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

    .plan-stage {
        height: 68vh;
        min-height: 520px;
    }

    .plan-pin-list {
        max-height: 440px;
    }
}

@media (max-width: 720px) {
    .plans-heading,
    .plan-viewer-heading,
    .plan-register-card__header,
    .plan-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .plans-heading .button,
    .plan-viewer-heading__status {
        width: 100%;
    }

    .plan-summary-grid,
    .plan-card-grid {
        grid-template-columns: 1fr;
    }

    .plan-card-grid {
        padding: 12px;
    }

    .project-plan-card__preview {
        height: 210px;
    }

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

    .plan-viewer-heading__identity {
        width: 100%;
        align-items: flex-start;
    }

    .plan-viewer-heading__identity > div {
        min-width: 0;
    }

    .plan-viewer-heading h1 {
        white-space: normal;
    }

    .plan-toolbar__group {
        width: 100%;
        justify-content: space-between;
    }

    .plan-stage {
        height: 60vh;
        min-height: 430px;
        padding: 14px;
    }

    .plan-loading {
        inset: 14px;
    }

    .permit-plan-pin__label {
        display: none;
    }
}

/* Location-first permit creation */

.permit-location-blocked {
    display: grid;
    min-height: 390px;
    padding: 45px 24px;
    place-items: center;
    align-content: center;
    border: 1px solid #d8e1e7;
    border-radius: 5px;
    text-align: center;
    background: #fff;
    box-shadow: 0 8px 24px rgba(10, 32, 51, .045);
}

.permit-location-blocked > span {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
    place-items: center;
    border: 1px solid #cbd8e1;
    border-radius: 5px;
    color: #526c7e;
    background: #f3f6f8;
}

.permit-location-blocked h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 600;
}

.permit-location-blocked p {
    max-width: 520px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.permit-location-card {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid #cfdbe3;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 9px 28px rgba(10, 32, 51, .055);
}

.permit-location-card__header {
    display: grid;
    min-height: 86px;
    padding: 18px 20px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid #dce4e9;
}

.permit-location-card__header > span:first-child,
.permit-details-step__heading > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #bcd0f4;
    border-radius: 4px;
    color: var(--blue);
    background: #f0f5ff;
    font-size: 14px;
    font-weight: 600;
}

.permit-location-card__header .eyebrow,
.permit-details-step__heading .eyebrow {
    margin-bottom: 3px;
}

.permit-location-card__header h2,
.permit-details-step__heading h2 {
    margin: 0 0 3px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.permit-location-card__header > div > p:last-child,
.permit-details-step__heading > div > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.permit-location-state {
    display: inline-flex;
    min-height: 32px;
    padding: 0 9px;
    align-items: center;
    gap: 6px;
    border: 1px solid #ead29e;
    border-radius: 4px;
    color: #865805;
    background: #fff8e9;
    font-size: 11px;
    font-weight: 580;
}

.permit-location-state.is-ready {
    border-color: #bcdccc;
    color: #126847;
    background: #edf9f4;
}

.permit-location-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    min-height: 570px;
}

.permit-location-viewer {
    min-width: 0;
    border-right: 1px solid #dce4e9;
}

.permit-location-toolbar {
    display: flex;
    min-height: 55px;
    padding: 9px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #dce4e9;
}

.permit-location-toolbar > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.permit-location-toolbar button {
    display: inline-flex;
    min-width: 35px;
    min-height: 35px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #ccd7df;
    border-radius: 4px;
    color: #455b6a;
    background: #fff;
    cursor: pointer;
}

.permit-location-toolbar button:hover:not(:disabled) {
    border-color: #8eabe3;
    color: var(--blue);
    background: #f4f7ff;
}

.permit-location-toolbar button:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.permit-location-toolbar span {
    color: #637480;
    font-size: 11px;
    font-weight: 560;
}

.permit-location-stage {
    position: relative;
    overflow: auto;
    height: 515px;
    padding: 18px;
    background:
        linear-gradient(rgba(201, 212, 220, .18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 212, 220, .18) 1px, transparent 1px),
        #e9eef1;
    background-size: 24px 24px;
}

.permit-location-document {
    position: relative;
    margin: 0 auto;
    cursor: crosshair;
    background: #fff;
    box-shadow: 0 10px 28px rgba(10, 32, 51, .18);
}

.permit-location-document canvas,
.permit-location-document > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
}

.permit-location-loading {
    position: absolute;
    z-index: 5;
    inset: 18px;
    display: grid;
    place-items: center;
    align-content: center;
    color: #526777;
    background: rgba(242, 246, 248, .94);
}

.permit-location-loading > span {
    width: 30px;
    height: 30px;
    margin-bottom: 11px;
    border: 3px solid #d6e0e7;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: plan-spin .8s linear infinite;
}

.permit-location-loading p {
    margin: 0;
    font-size: 13px;
}

.permit-location-loading.is-error {
    color: #9d342e;
    background: #fff4f2;
}

.permit-location-loading.is-error > span {
    display: none;
}

.permit-location-marker {
    position: absolute;
    z-index: 4;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 5px;
    color: #fff;
    background: var(--blue);
    box-shadow: 0 5px 12px rgba(10, 32, 51, .3);
    transform: translate(-17px, -31px) rotate(-45deg);
    pointer-events: none;
}

.permit-location-marker .ui-icon {
    transform: rotate(45deg);
}

.permit-location-instructions {
    padding: 20px;
    background: #fbfcfd;
}

.permit-location-instructions .field {
    margin-bottom: 19px;
}

.permit-location-guide {
    display: flex;
    padding: 14px 0;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid #e1e7eb;
}

.permit-location-guide > span {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid #d1dce4;
    border-radius: 4px;
    color: #526a7a;
    background: #fff;
}

.permit-location-guide strong {
    display: block;
    margin-bottom: 3px;
    color: #2c4353;
    font-size: 12px;
    font-weight: 600;
}

.permit-location-guide p {
    margin: 0;
    color: #74838e;
    font-size: 11px;
    line-height: 1.45;
}

.permit-location-result {
    display: flex;
    margin-top: 12px;
    padding: 12px;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #d9e2e8;
    border-radius: 4px;
    color: #657681;
    background: #fff;
}

.permit-location-result.is-ready {
    border-color: #bcdccc;
    color: #126847;
    background: #edf9f4;
}

.permit-location-result p {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
}

.permit-details-step {
    scroll-margin-top: 92px;
}

.permit-details-step__heading {
    display: flex;
    margin: 4px 0 14px;
    padding: 16px 18px;
    align-items: center;
    gap: 12px;
    border: 1px solid #d8e1e7;
    border-radius: 5px;
    background: #f8fafb;
}

.permit-details-step > .content-card {
    border-radius: 5px;
}

.permit-details-step > .button-row {
    padding-top: 2px;
}

@media (max-width: 1080px) {
    .permit-location-layout {
        grid-template-columns: 1fr;
    }

    .permit-location-viewer {
        border-right: 0;
        border-bottom: 1px solid #dce4e9;
    }

    .permit-location-stage {
        height: 58vh;
        min-height: 440px;
    }
}

@media (max-width: 700px) {
    .permit-location-card__header {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .permit-location-state {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .permit-location-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .permit-location-toolbar > div {
        width: 100%;
        justify-content: space-between;
    }

    .permit-location-stage {
        height: 52vh;
        min-height: 360px;
        padding: 12px;
    }

    .permit-location-loading {
        inset: 12px;
    }

    .permit-location-instructions {
        padding: 16px;
    }
}
