:root {
    color-scheme: dark;
    --black: #0B0B0D;
    --bg: #171719;
    --panel: #25262A;
    --raised: #2e2f34;
    --line: #414349;
    --muted: #adafb8;
    --text: #ECEDEF;
    --red: #C8102E;
    --softred: #ef9caa;
    --radius: 16px;
    --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 1rem/1.5 var(--font)
}

/* Relative type follows the reader's browser font size, including text-only zoom. */
h1, h2, h3, .btn, .field, .notice, .item-pair, .stat, .quick {
    overflow-wrap: anywhere
}

.stats > *, .columns > *, .right-column > *, .quick-grid > *, .form-grid > * {
    min-width: 0
}

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

button,
a,
input,
select,
textarea {
    touch-action: manipulation
}

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

button {
    cursor: pointer
}

button:disabled {
    opacity: .5;
    cursor: wait
}

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

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: clamp(1.875rem, 3vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -1.4px;
    font-weight: 600;
    margin-bottom: 12px
}

h2 {
    font-size: 1.4375rem;
    letter-spacing: -.5px;
    font-weight: 600
}

h3 {
    font-size: 1.125rem;
    font-weight: 600
}

p {
    margin-bottom: 16px
}

small,
.muted {
    color: var(--muted)
}

small {
    font-size: 0.8125rem
}

svg.icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0
}

button svg.icon {
    pointer-events: none
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px
}

.skip {
    position: fixed;
    top: -80px;
    left: 20px;
    padding: 12px;
    background: var(--red);
    z-index: 200
}

.skip:focus {
    top: 8px
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    padding: 33px 18px 20px;
    background: var(--black);
    border-right: 1px solid #2a2b2e;
    display: flex;
    flex-direction: column;
    z-index: 15;
    overflow: auto
}

.wordmark {
    padding: 0 13px 27px;
    line-height: 1.15
}

.wordmark strong {
    font-size: 1.4375rem;
    font-weight: 650;
    letter-spacing: -.7px
}

.wordmark span {
    font-size: 0.625rem;
    letter-spacing: 3.6px;
    font-weight: 600;
    color: var(--muted);
    display: block;
    margin-top: 9px
}

.wordmark i {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--red);
    margin-right: 8px
}

.nav-label {
    font-size: 0.625rem;
    letter-spacing: 1.8px;
    color: #92949e;
    margin: 22px 13px 10px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 9px;
    color: #b9bbc3;
    font-size: 0.875rem;
    margin-bottom: 3px
}

.nav-item.active {
    background: #36141c;
    color: #fff;
    box-shadow: inset 3px 0 var(--red)
}

.nav-item:hover {
    background: #222226;
    color: white
}

.nav-item.active svg {
    color: #f06c84
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 28px
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 10px;
    border-top: 1px solid #2b2c31;
    font-size: 0.8125rem
}

.avatar {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #393a40;
    border: 1px solid #53555c;
    border-radius: 50%;
    font-weight: 600
}

.content {
    grid-column: 2;
    min-width: 0
}

.topbar {
    height: 85px;
    border-bottom: 1px solid #303136;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 42px;
    gap: 14px
}

.breadcrumb {
    font-size: 0.8125rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 13px
}

.breadcrumb strong {
    font-weight: 500;
    color: var(--text)
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 15px
}

.view-label-mobile {
    display: none
}

.top-date {
    font-size: 0.75rem;
    color: var(--muted)
}

.icon-btn {
    min-width: 48px;
    min-height: 48px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.unread-dot {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 100%
}

main {
    max-width: 1600px;
    margin: auto;
    padding: 37px 42px 60px
}

.page-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.625rem;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 12px
}

.page-top p {
    color: var(--muted);
    margin: 0;
    font-size: 0.9375rem
}

.btn {
    min-height: 56px;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid #51535b;
    background: #303137;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 550;
    font-size: 0.875rem;
    white-space: normal;
    text-align: center;
    line-height: 1.35
}

.btn:hover {
    background: #3c3d44
}

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

.btn.primary:hover {
    background: #e01839
}

.btn.ghost {
    background: transparent;
    border-color: var(--line)
}

.btn.small {
    min-height: 44px;
    padding: 9px 14px;
    font-size: 0.8125rem
}

.btn.wide {
    width: 100%
}

.btn.danger {
    color: #ffa8b9;
    border-color: #813245
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px
}

.stat {
    background: var(--panel);
    border: 1px solid #3a3b41;
    border-radius: var(--radius);
    padding: 21px 24px;
    position: relative;
    text-align: left;
    color: var(--text)
}

button.stat {
    width: 100%
}

.stat:hover {
    border-color: #70737d
}

.stat .label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.8125rem;
    color: #c4c5cc
}

.stat .label svg {
    width: 18px;
    height: 18px;
    color: var(--muted)
}

.stat .value {
    font-size: 2.375rem;
    line-height: 1.2;
    margin: 14px 0 8px;
    letter-spacing: -1px
}

.stat .hint {
    font-size: 0.75rem;
    color: var(--muted)
}

.stat.accent {
    background: linear-gradient(120deg, #331c23, #25262A)
}

.stat.accent .value {
    color: #ff9aaf
}

.columns {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
    gap: 24px
}

.panel {
    border: 1px solid #3c3d43;
    background: var(--panel);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px
}

.panel-head {
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid #3a3b41
}

.panel-head h2 {
    margin: 0;
    font-size: 1.1875rem
}

.panel-head .link {
    font-size: 0.8125rem;
    color: #c9cbd2;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px
}

.panel-body {
    padding: 24px
}

.task-row {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 19px 24px;
    border-bottom: 1px solid #3a3b41;
    width: 100%;
    background: none;
    color: var(--text);
    text-align: left;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    min-height: 88px
}

.task-row:last-child {
    border-bottom: 0
}

.task-row:hover {
    background: #303136
}

.task-icon {
    height: 47px;
    width: 47px;
    background: #34353b;
    border: 1px solid #4a4b53;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #d8dae1
}

.task-icon.red {
    background: #47212a;
    border-color: #743344;
    color: #ffa3b6
}

.row-main {
    flex: 1;
    min-width: 0
}

.row-main strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 550;
    margin-bottom: 5px
}

.row-sub {
    font-size: 0.75rem;
    color: #afb1bb;
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.row-end {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0
}

.badge {
    font-size: 0.6875rem;
    line-height: 1.35;
    border: 1px solid #5b5d66;
    background: #36373d;
    color: #dedfe5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 6px;
    padding: 5px 8px;
    white-space: normal
}

.badge.attention {
    background: #49212a;
    border-color: #7b3446;
    color: #ffbdca
}

.badge.done {
    background: #303d37;
    border-color: #627c6d;
    color: #dcf0e5
}

.badge.neutral {
    background: #303137;
    color: #c6c8d1
}

.notice {
    padding: 18px 20px;
    background: #30232a;
    border: 1px solid #65404c;
    border-radius: 12px;
    display: flex;
    gap: 13px;
    margin-bottom: 24px;
    color: #ead9de;
    font-size: 0.875rem
}

.notice svg {
    flex-shrink: 0
}

.notice strong {
    display: block;
    margin-bottom: 4px
}

.notice p {
    margin: 0
}

.notice.info {
    background: #292a2f;
    border-color: #50525c;
    color: #d4d6de
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.quick {
    min-height: 110px;
    border: 1px solid #494b54;
    border-radius: 12px;
    padding: 17px;
    color: var(--text);
    background: #2b2c31;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px
}

.quick:hover {
    background: #393a41
}

.quick svg {
    color: #b7bac5
}

.quick span {
    font-size: 0.8125rem
}

.progress-track {
    height: 5px;
    border-radius: 9px;
    background: #42434a;
    margin: 16px 0
}

.progress-fill {
    height: 100%;
    background: var(--red);
    border-radius: 9px
}

.round-status {
    display: flex;
    align-items: baseline;
    gap: 7px
}

.round-status strong {
    font-size: 2.375rem;
    font-weight: 550
}

.round-status span {
    color: var(--muted);
    font-size: 0.875rem
}

.kicker {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: .3px
}

.empty {
    text-align: center;
    padding: 38px 24px;
    color: var(--muted)
}

.empty .icon {
    width: 35px;
    height: 35px;
    margin-bottom: 12px;
    color: #9295a0
}

.empty strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 500
}

.empty p {
    font-size: 0.875rem;
    max-width: 430px;
    margin: 0 auto 18px
}

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 22px
}

.search {
    position: relative;
    flex: 1;
    min-width: 180px
}

.search input {
    padding-left: 44px
}

.search svg {
    position: absolute;
    left: 14px;
    top: 17px;
    color: var(--muted)
}

input,
select,
textarea {
    width: 100%;
    background: #1e1f23;
    border: 1px solid #666A73;
    color: var(--text);
    border-radius: 9px;
    padding: 14px 15px;
    min-height: 56px;
    outline-offset: 3px
}

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

input[type=checkbox] {
    width: 22px;
    height: 22px;
    min-height: 22px;
    accent-color: var(--red);
    flex-shrink: 0
}

label.field {
    display: block;
    margin-bottom: 19px;
    font-size: 0.875rem;
    color: #e3e4e9
}

label.field>span {
    display: block;
    margin-bottom: 8px
}

label.field small {
    display: block;
    margin-top: 6px;
    line-height: 1.45
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px
}

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

.check {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 16px;
    font-size: 0.9375rem;
    min-height: 42px;
    padding: 8px 0
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 0.8125rem
}

.chip.active {
    background: #ececef;
    color: #1a1b1f;
    border-color: #ececef
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.device-card {
    padding: 23px;
    border: 1px solid #474952;
    background: var(--panel);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

.device-card h3 {
    margin: 0
}

.device-number {
    font-size: 0.6875rem;
    letter-spacing: 1.5px;
    color: var(--muted)
}

.device-top {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.device-temp {
    font-size: 2.1875rem;
    letter-spacing: -1px;
    margin: 6px 0
}

.device-temp small {
    font-size: 0.9375rem;
    letter-spacing: 0
}

.device-card .btn {
    margin-top: auto
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: #42434a;
    border: 1px solid #42434a;
    border-radius: 12px;
    overflow: hidden
}

.calendar-day {
    background: var(--panel);
    min-height: 130px;
    padding: 11px;
    min-width: 0
}

.calendar-day.today {
    background: #36272d
}

.calendar-day strong {
    display: block;
    font-size: 0.8125rem;
    margin-bottom: 12px
}

.calendar-event {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.6875rem;
    line-height: 1.4;
    border: 0;
    border-left: 2px solid var(--red);
    background: #38383f;
    color: #eee;
    padding: 7px;
    margin-bottom: 6px;
    border-radius: 3px;
    word-break: break-word
}

.table-wrap {
    overflow-x: auto
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem
}

table.data th {
    text-align: left;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 500;
    padding: 15px 20px;
    border-bottom: 1px solid #464850
}

table.data td {
    padding: 16px 20px;
    border-bottom: 1px solid #3a3b42
}

table.data td .btn {
    min-height: 45px
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr
}

.auth-art {
    background: #0e0e10;
    padding: 65px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden
}

.auth-art:after {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    border: 1px solid #3b232a;
    transform: rotate(-25deg);
    right: -200px;
    bottom: -80px;
    border-radius: 65px;
    box-shadow: 0 0 0 70px #20151b, 0 0 0 71px #3b232a, 0 0 0 140px #171215, 0 0 0 141px #302027
}

.auth-art>* {
    z-index: 1;
    position: relative
}

.auth-art h1 {
    font-size: clamp(2.1875rem, 4vw, 3.75rem);
    max-width: 500px;
    line-height: 1.15;
    margin-top: 60px
}

.auth-art p {
    max-width: 370px;
    color: var(--muted);
    font-size: 1.125rem
}

.auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 35px
}

.auth-inner {
    width: 100%;
    max-width: 420px
}

.auth-inner h2 {
    font-size: 1.8125rem
}

.auth-inner .eyebrow {
    color: #f28a9f
}

.auth-switch {
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--muted)
}

.auth-switch button {
    color: #fff;
    border: 0;
    background: none;
    text-decoration: underline;
    padding: 8px
}

.auth-foot {
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: 30px;
    display: flex;
    gap: 8px;
    align-items: center
}

.error {
    background: #4a1e28;
    border: 1px solid #9b3a51;
    padding: 14px;
    border-radius: 9px;
    color: #ffd0da;
    margin-bottom: 16px;
    font-size: 0.875rem
}

.error:empty {
    display: none
}

dialog {
    width: min(760px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    background: var(--panel);
    color: var(--text);
    border: 1px solid #62656f;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 30px 140px #0009
}

dialog::backdrop {
    background: #000b;
    backdrop-filter: blur(4px)
}

.modal-head {
    padding: 24px 28px;
    border-bottom: 1px solid #474952;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 3
}

.modal-head h2 {
    margin: 0;
    font-size: 1.4375rem
}

.modal-body {
    padding: 27px 28px
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
    padding-top: 22px;
    border-top: 1px solid #464850
}

.steps-title {
    font-size: 1.5rem;
    line-height: 1.4;
    margin: 25px 0
}

.steps-info {
    font-size: 1.125rem;
    line-height: 1.65
}

.photo-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0
}

.photo-list img {
    width: 120px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line)
}

.photo-list figure {
    width: 140px;
    max-width: 100%;
    overflow-wrap: anywhere
}

.photo-list figcaption {
    font-size: .875rem;
    margin-top: 6px
}

.guide-photo {
    width: 100%;
    max-height: 330px;
    object-fit: contain;
    border-radius: 12px;
    background: #18191c
}

.signature-canvas {
    width: 100%;
    height: 190px;
    display: block;
    background: #f4f4f4;
    border: 2px dashed #747780;
    border-radius: 10px;
    touch-action: none
}

.signature-preview {
    max-width: 220px;
    background: #eee;
    border-radius: 8px
}

.signature-meta {
    display: flex;
    gap: 12px;
    align-items: center
}

.signature-meta input {
    max-width: 180px
}

.speech-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 9px 0
}

.speech-tools button {
    min-height: 45px
}

.speech-review {
    padding: 17px;
    background: #1c1d21;
    border: 1px solid #6b525c;
    border-radius: 10px;
    margin: 12px 0
}

.speech-review textarea {
    font-size: 1.125rem
}

.speech-recording {
    color: #ffb2c2;
    font-size: 0.875rem
}

.big-value {
    text-align: center;
    padding: 25px;
    border: 1px solid #54565f;
    background: #1c1d21;
    border-radius: 15px;
    margin: 20px 0
}

.big-value .number {
    font-size: 4.0625rem;
    line-height: 1.2;
    letter-spacing: -2px;
    margin: 13px 0
}

.big-value .kicker {
    font-size: 0.875rem
}

.big-value input {
    font-size: 2.8125rem;
    text-align: center;
    height: 95px
}

.confirmation {
    border: 1px solid #656772;
    border-radius: 12px;
    padding: 22px;
    margin: 20px 0;
    font-size: 1.125rem;
    line-height: 1.6
}

.confirmation strong {
    color: white
}

.timeline {
    border-left: 1px solid #555761;
    margin-left: 8px;
    padding-left: 22px
}

.timeline-item {
    padding: 0 0 22px;
    font-size: 0.875rem
}

.timeline-item small {
    display: block
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px
}

.badge-count {
    margin-left: auto;
    background: #3c3d43;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.6875rem
}

.loading {
    padding: 70px;
    text-align: center;
    color: var(--muted)
}

#toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 90;
    max-width: 450px;
    pointer-events: none
}

#toast:not(:empty) {
    padding: 17px 22px;
    border: 1px solid #6b6e78;
    border-radius: 12px;
    background: #36383f;
    box-shadow: 0 12px 50px #0008
}

#offline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 95;
    padding: 12px 20px;
    text-align: center;
    background: #663143;
    color: #fff;
    font-size: 0.8125rem
}

.mobile-nav,
.mobile-brand {
    display: none
}

.demo-banner {
    background: #32252c;
    text-align: center;
    border-bottom: 1px solid #694451;
    color: #efdce2;
    font-size: 0.75rem;
    padding: 7px
}

.inline-link {
    color: #ffb3c3;
    text-decoration: underline
}

.section-gap {
    margin-top: 30px
}

.document-preview {
    white-space: pre-wrap;
    line-height: 1.7;
    max-height: 420px;
    overflow: auto;
    padding: 18px;
    border: 1px solid #4d5059;
    border-radius: 10px;
    font-size: 1rem
}

.report-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.fine-print {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 15px
}

.two-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.item-pair {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid #44464e;
    font-size: 0.875rem
}

.qr-preview {
    background: #fff;
    padding: 16px;
    border-radius: 10px;
    max-width: 230px;
    margin: auto
}

.device-card .guide-photo {
    height: 140px
}

.form-section {
    border-top: 1px solid #45474f;
    padding-top: 22px;
    margin-top: 8px
}

.form-section h3 {
    margin-bottom: 18px
}

.shortcuts {
    display: flex;
    gap: 9px;
    flex-wrap: wrap
}

.workflow-note {
    font-size: 0.8125rem;
    color: #b7bac3;
    margin-top: 10px
}

.scroll-tabs {
    overflow: auto;
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 17px
}

.kbd {
    font-size: 0.6875rem;
    border: 1px solid #60636c;
    border-radius: 4px;
    padding: 2px 5px
}

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

@media(min-width:1550px) {
    main {
        padding: 45px 55px
    }

    .topbar {
        padding: 0 55px
    }

    .stats {
        gap: 22px
    }

    .columns {
        gap: 28px
    }
}

@media(max-width:1150px) {
    .app-shell {
        grid-template-columns: 210px 1fr
    }

    .sidebar {
        width: 210px;
        padding: 27px 12px
    }

    .wordmark strong {
        font-size: 1.3125rem
    }

    .topbar {
        padding: 0 25px
    }

    main {
        padding: 30px 25px
    }

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

    .right-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px
    }

    .stats {
        gap: 12px
    }

    .stat {
        padding: 18px
    }

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

    .nav-item {
        font-size: 0.8125rem;
        gap: 10px
    }

    .top-date {
        display: none
    }
}

@media(max-width:760px) {
    .app-shell {
        display: block
    }

    .sidebar {
        display: none
    }

    .content {
        padding-bottom: calc(4.5rem + 50px + env(safe-area-inset-bottom))
    }

    .topbar {
        height: auto;
        min-height: 70px;
        padding: 12px 19px;
        flex-wrap: wrap
    }

    .breadcrumb {
        display: none
    }

    .mobile-brand {
        display: block;
        font-size: 1.125rem;
        font-weight: 600;
        letter-spacing: -.4px
    }

    .mobile-brand span {
        color: #d75770;
        font-size: 0.6875rem;
        font-weight: 500;
        letter-spacing: 1px;
        margin-left: 7px
    }

    .top-actions {
        gap: 9px
    }

    .view-label { display: none }
    .view-label-mobile { display: inline }
    .mobile-brand { flex-shrink: 0 }
    .row-main strong { overflow-wrap: anywhere }

    .top-actions .btn {
        font-size: 0.75rem;
        padding: 10px;
        min-height: 44px
    }

    .icon-btn {
        min-width: 44px;
        min-height: 44px
    }

    main {
        padding: 27px 18px
    }

    .page-top {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
        margin-bottom: 24px
    }

    h1 {
        font-size: 1.9375rem;
        letter-spacing: -.8px
    }

    .page-top p {
        font-size: 0.875rem
    }

    .page-top>.btn {
        width: 100%
    }

    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 23px
    }

    .stat {
        padding: 17px
    }

    .stat .value {
        font-size: 2.0625rem
    }

    .stat .label {
        font-size: 0.75rem
    }

    .stat .hint {
        font-size: 0.6875rem
    }

    .panel-head {
        padding: 19px
    }

    .panel-body {
        padding: 19px
    }

    .task-row {
        padding: 18px 17px;
        gap: 12px
    }

    .row-main strong {
        font-size: 0.9375rem
    }

    .row-end {
        gap: 6px
    }

    .row-end>.icon {
        display: none
    }

    .row-end .badge {
        max-width: 89px;
        font-size: 0.625rem
    }

    .task-icon {
        width: 42px;
        height: 42px
    }

    .right-column {
        display: block
    }

    .mobile-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #101012f5;
        border-top: 1px solid #45464e;
        padding: 8px 3px max(8px, env(safe-area-inset-bottom));
        z-index: 20;
        backdrop-filter: blur(15px)
    }

    .mobile-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-direction: column;
        min-height: 56px;
        font-size: 0.625rem;
        color: #b6b8c2
    }

    .mobile-nav a {
        min-width: 0;
        overflow-wrap: anywhere;
        text-align: center
    }

    .mobile-nav a.active {
        color: #ff9db1
    }

    .mobile-nav .report-nav {
        background: var(--red);
        border-radius: 10px;
        color: #fff;
        margin: 0 3px
    }

    .device-grid {
        grid-template-columns: 1fr 1fr;
        gap: 11px
    }

    .device-card {
        padding: 16px;
        gap: 12px
    }

    .device-card h3 {
        font-size: 1rem;
        line-height: 1.4
    }

    .device-temp {
        font-size: 1.8125rem
    }

    .device-card .btn {
        padding: 12px 9px;
        font-size: 0.75rem
    }

    .device-number {
        font-size: 0.5625rem
    }

    .form-grid,
    .profile-grid,
    .report-split {
        grid-template-columns: 1fr
    }

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

    .calendar-day {
        min-height: 70px
    }

    .calendar-day.empty-day {
        display: none
    }

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

    .auth-art {
        padding: 30px;
        min-height: 210px
    }

    .auth-art h1 {
        font-size: 1.8125rem;
        margin-top: 20px;
        max-width: 360px;
        margin-bottom: 15px
    }

    .auth-art p {
        display: none
    }

    .auth-art .wordmark {
        padding: 0;
        font-size: 1.3125rem
    }

    .auth-art .auth-foot {
        display: none
    }

    .auth-form {
        padding: 35px 25px;
        align-items: flex-start
    }

    .modal-head {
        padding: 20px;
        align-items: flex-start;
        position: relative
    }

    .modal-body {
        padding: 22px 20px
    }

    dialog {
        max-height: calc(100dvh - 24px);
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        border-radius: 14px
    }

    .modal-head h2 {
        font-size: 1.3125rem
    }

    .modal-actions .btn {
        flex: 1;
        min-width: 110px
    }

    .notice {
        font-size: 0.8125rem;
        padding: 16px
    }

    .two-buttons {
        grid-template-columns: 1fr
    }

    .steps-title {
        font-size: 1.4375rem
    }

    .btn {
        min-height: 56px
    }

    #toast {
        left: 14px;
        right: 14px;
        bottom: 94px;
        max-width: none
    }

    .toolbar select {
        max-width: none !important
    }

    .toolbar {
        gap: 10px
    }

    .qr-preview {
        max-width: 200px
    }

    .panel-head h2 {
        font-size: 1.125rem
    }

    .quick {
        min-height: 105px
    }

    .big-value .number {
        font-size: 3.625rem
    }
}

@media(max-width:370px) {
    main {
        padding: 23px 13px
    }

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

    .row-end {
        display: flex;
        flex-basis: calc(100% - 50px);
        margin-left: 50px;
        justify-content: flex-start
    }
    .task-row { flex-wrap: wrap }
    .mobile-brand span { display: none }

    .stat {
        padding: 15px
    }

    .stat .label {
        font-size: 0.6875rem
    }

    .stat .label svg {
        width: 16px
    }

    .top-actions>.btn {
        display: inline-flex
    }

    .mobile-nav a {
        font-size: 0.5625rem
    }

    .task-row {
        padding: 16px 14px
    }

    .task-icon {
        width: 38px;
        height: 38px
    }
}

@media(prefers-reduced-motion:no-preference) {

    .btn,
    .nav-item,
    .task-row {
        transition: background .16s, border-color .16s
    }

    .panel,
    .stat {
        animation: appear .25s ease-out
    }

    @keyframes appear {
        from {
            opacity: 0;
            transform: translateY(5px)
        }

        to {
            opacity: 1;
            transform: none
        }
    }
}

.device-control .confirmation {
    font-size: 0.9375rem;
    padding: 15px;
    line-height: 1.5
}

.device-control .steps-info {
    font-size: 1.0625rem
}

.device-control .big-value {
    padding: 18px;
    margin: 0 0 20px
}

.device-control .big-value .number {
    font-size: 3.4375rem
}

@media print {

    .sidebar,
    .topbar,
    .mobile-nav,
    .btn,
    #toast {
        display: none !important
    }

    .app-shell {
        display: block
    }

    .content {
        padding: 0
    }

    body,
    main,
    .panel {
        background: white;
        color: #222
    }

    main {
        padding: 0
    }

    .panel {
        break-inside: avoid;
        border-color: #aaa
    }
}

.photo-editor {
    display: grid;
    gap: 16px
}

.photo-editor-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px
}

.photo-editor-item img {
    width: 100%;
    max-height: 140px;
    object-fit: contain
}

.photo-editor-item .field {
    margin: 0 0 10px
}

.photo-editor-item .shortcuts {
    flex-wrap: wrap
}

@media(max-width:500px) {
    .photo-editor-item {
        grid-template-columns: 1fr
    }

    .photo-editor-item img {
        max-height: 160px;
        width: auto;
        max-width: 100%
    }
}

.retention-item { padding: 18px 0; border-bottom: 1px solid var(--border, #484b54); overflow-wrap: anywhere; }
.retention-item:last-child { border-bottom: 0; }
.retention-item h3 { margin: 12px 0 6px; }
.retention-item p { margin: 10px 0; }
