:root {
    --bg: #f4f7f7;
    --surface: #ffffff;
    --surface-soft: #f8fbfa;
    --line: #d6e0df;
    --line-strong: #b7c7c4;
    --text: #1c2826;
    --muted: #657570;
    --brand: #177e68;
    --brand-dark: #0e5d4c;
    --brand-soft: #e7f4f0;
    --accent: #b96f0d;
    --accent-soft: #fff3dd;
    --info: #2563a7;
    --info-soft: #eaf2fb;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --sidebar: #12201d;
    --sidebar-muted: #a8c9bf;
    --radius: 8px;
    --shadow: 0 8px 24px rgba(18, 32, 29, 0.08);
    --focus: 0 0 0 3px rgba(23, 126, 104, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
    overflow-x: hidden;
}

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

button,
a,
input,
select,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a:hover {
    text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 2000;
    padding: 9px 12px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-width: 0;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    background: var(--sidebar);
    color: #eef8f5;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eef8f5;
    min-width: 0;
}

.brand-link:hover {
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.brand-copy {
    min-width: 0;
}

.brand-name {
    display: block;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-sub {
    display: block;
    margin-top: 2px;
    color: var(--sidebar-muted);
    font-size: 11px;
    line-height: 1.25;
}

.nav {
    display: grid;
    gap: 4px;
}

.nav a,
.nav button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: var(--radius);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #eef8f5;
    cursor: pointer;
    text-align: left;
}

.nav a:hover,
.nav button:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.11);
    text-decoration: none;
}

.nav a.active {
    box-shadow: inset 3px 0 0 #66c8af;
}

.nav svg,
.btn svg,
.icon-button svg,
.section-nav svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 10px;
}

.user-card {
    min-width: 0;
    color: #dcece8;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.user-card span {
    color: var(--sidebar-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.mobile-nav-close,
.mobile-menu-button {
    display: none;
}

.nav-backdrop {
    display: none;
}

.main {
    width: 100%;
    min-width: 0;
    max-width: 1840px;
    margin: 0 auto;
    padding: 24px clamp(18px, 2.5vw, 36px) 40px;
}

.topline {
    min-height: 54px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topline-primary,
.topline-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.page-heading {
    min-width: 0;
}

.page-date {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

h1,
h2,
h3 {
    letter-spacing: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: 25px;
}

h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

p:first-child {
    margin-top: 0;
}

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

.grid {
    display: grid;
    gap: 16px;
}

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

.grid.two.list-form {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
}

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

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

.panel-heading-row {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.panel-heading-row h2 {
    margin-bottom: 7px;
}

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

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

.detail-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.call-filters input {
    width: min(310px, 42vw);
}

.call-filters select {
    width: 150px;
}

.compact-check {
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.telephony-status-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.telephony-status-grid span,
.telephony-status-grid strong {
    display: block;
}

.telephony-status-grid strong {
    margin-top: 3px;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
}

.copy-field .icon-button.copied {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.phone-dock-backdrop,
.phone-modal-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(8, 18, 16, 0.5);
    opacity: 0;
    pointer-events: none;
}

.phone-dock-backdrop {
    z-index: 1390;
    transition: opacity 180ms ease;
}

.phone-dock {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1400;
    width: min(440px, 100vw);
    height: 100dvh;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 1px solid var(--line);
    background: #fff;
    box-shadow: -14px 0 34px rgba(18, 32, 29, 0.2);
    transform: translateX(105%);
    transition: transform 180ms ease;
    overflow-y: auto;
}

body.phone-dock-open .phone-dock {
    transform: translateX(0);
}

body.phone-dock-open .phone-dock-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.phone-dock-header,
.phone-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.phone-dock-header strong,
.phone-dock-header span {
    display: block;
}

.phone-dock-header strong {
    font-size: 18px;
}

.phone-dock-header span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.phone-quick-call,
.phone-match {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}

.phone-quick-call {
    display: grid;
    gap: 10px;
}

.phone-selected-context span,
.phone-selected-context strong,
.phone-match span,
.phone-match strong {
    display: block;
}

.phone-match strong {
    margin: 3px 0 9px;
}

.phone-message {
    margin: 0;
}

.alert.info {
    border-color: #9fc0e3;
    color: #1c5085;
    background: var(--info-soft);
}

.net2phone-dialer-root {
    flex: 1 1 320px;
    min-width: 0;
    min-height: 320px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.net2phone-dialer-root iframe,
.net2phone-dialer-root > * {
    max-width: 100%;
}

.phone-history-link {
    width: 100%;
}

.phone-outcome-modal {
    position: fixed;
    inset: 0;
    z-index: 1600;
    padding: 18px;
    display: grid;
    place-items: center;
}

.phone-outcome-modal[hidden] {
    display: none;
}

.phone-outcome-modal .phone-modal-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.phone-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100dvh - 36px);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.phone-modal-header {
    margin-bottom: 14px;
}

.phone-modal-header h2 {
    margin-top: 3px;
}

body.phone-modal-open {
    overflow: hidden;
}

.panel {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.panel:target,
section:target {
    scroll-margin-top: 82px;
}

.stat {
    min-height: 88px;
    display: grid;
    align-content: center;
    gap: 5px;
}

.stat strong {
    font-size: 27px;
}

.toolbar {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.toolbar > * {
    min-width: 0;
}

.btn,
.icon-button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}

.icon-button {
    width: 42px;
    padding: 0;
}

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

.btn.danger {
    border-color: #efb8b2;
    background: var(--danger-soft);
    color: var(--danger);
}

.btn:hover,
.icon-button:hover {
    filter: brightness(0.98);
    text-decoration: none;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 9px 10px;
    background: #fff;
    color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #8da49f;
}

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

textarea[readonly] {
    background: #f3f6f5;
    color: var(--text);
    cursor: default;
}

input[type="file"] {
    min-height: 44px;
    padding: 7px;
}

label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

label span {
    color: var(--text);
    font-weight: 600;
}

.checkline {
    min-height: 42px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--text);
    font-size: 13px;
}

.checkline input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
    flex: 0 0 18px;
}

.checkline small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.35;
}

form.inline {
    display: inline;
}

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

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

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

.collection-form .full {
    grid-column: auto;
}

.form-grid > div.full {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

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

.badge {
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 9px;
    display: inline-flex;
    align-items: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.badge.warn {
    background: var(--accent-soft);
    color: #774500;
}

.badge.bad {
    background: #ffe5e1;
    color: var(--danger);
}

.badge.info {
    background: var(--info-soft);
    color: #1c5085;
}

.alerts {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.alert {
    padding: 11px 12px;
    border: 1px solid;
    border-radius: var(--radius);
    background: #fff;
}

.alert.success {
    border-color: #91cfbd;
    color: var(--brand-dark);
    background: #f2fbf8;
}

.alert.error {
    border-color: #efb8b2;
    color: var(--danger);
    background: var(--danger-soft);
}

.timeline {
    display: grid;
    gap: 11px;
}

.timeline-item {
    min-width: 0;
    padding: 0 0 2px 11px;
    border-left: 3px solid var(--brand);
    overflow-wrap: anywhere;
}

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

.compact-list {
    display: grid;
    gap: 9px;
}

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

.compact-row > * {
    min-width: 0;
}

.section-nav {
    margin: 0 0 16px;
    padding: 2px 0 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.section-nav a {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
}

.section-nav a:hover {
    border-color: var(--brand);
    color: var(--brand-dark);
    text-decoration: none;
}

/* Centro de ayuda */
.help-hero {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: var(--surface-soft);
}

.help-hero h2 {
    font-size: 21px;
}

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

.help-index {
    position: sticky;
    top: 16px;
}

.help-index nav {
    display: grid;
    gap: 5px;
}

.help-index nav a {
    min-height: 39px;
    padding: 8px 9px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.help-index nav a:hover {
    background: var(--brand-soft);
    text-decoration: none;
}

.help-progress {
    margin: 13px 0;
}

.help-progress-track {
    height: 7px;
    margin-top: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e9e7;
}

.help-progress-bar {
    width: 0;
    height: 100%;
    background: var(--brand);
    transition: width 180ms ease;
}

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

.tutorial {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    scroll-margin-top: 84px;
}

.tutorial[open] {
    border-color: #91bdb2;
    box-shadow: var(--shadow);
}

.tutorial[hidden] {
    display: none;
}

.tutorial summary {
    min-height: 64px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    list-style: none;
}

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

.tutorial-number {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 800;
}

.tutorial-title {
    min-width: 0;
}

.tutorial-title strong,
.tutorial-title small {
    display: block;
}

.tutorial-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.tutorial-chevron {
    color: var(--muted);
    transition: transform 180ms ease;
}

.tutorial[open] .tutorial-chevron {
    transform: rotate(180deg);
}

.tutorial-body {
    padding: 0 16px 16px 65px;
    border-top: 1px solid var(--line);
}

.tutorial-steps {
    margin: 15px 0;
    padding: 0;
    display: grid;
    gap: 10px;
    list-style: none;
    counter-reset: tutorial-step;
}

.tutorial-steps li {
    position: relative;
    min-height: 28px;
    padding-left: 36px;
    counter-increment: tutorial-step;
}

.tutorial-steps li::before {
    content: counter(tutorial-step);
    position: absolute;
    top: -2px;
    left: 0;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef3f2;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.tutorial-footer {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tutorial-complete {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
}

.tutorial-complete input {
    width: 18px;
    min-height: 18px;
}

.help-empty {
    display: none;
}

.help-empty.visible {
    display: block;
}

/* Acceso y páginas públicas */
.auth-page,
.public-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--bg);
}

.login,
.upload-shell {
    width: min(720px, 100%);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

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

.login-brand {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-brand strong,
.login-brand small {
    display: block;
}

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

.login h1,
.upload-shell h1 {
    margin: 0 0 8px;
    font-size: 25px;
}

.login p,
.upload-shell p {
    color: var(--muted);
}

.login label,
.upload-shell label {
    margin-bottom: 14px;
}

.login button,
.public-page button {
    min-height: 44px;
    border: 0;
    border-radius: var(--radius);
    padding: 10px 14px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
}

.login button {
    width: 100%;
}

.public-page .brand {
    margin-bottom: 5px;
    color: var(--brand);
    font-size: 19px;
    font-weight: 800;
}

.drop {
    padding: 18px;
    border: 2px dashed #91c7b8;
    border-radius: var(--radius);
    background: #f2fbf8;
    overflow-wrap: anywhere;
}

.public-page .success {
    padding: 16px;
    border: 1px solid #91cfbd;
    border-radius: var(--radius);
    background: #f2fbf8;
    color: var(--brand-dark);
}

.public-page .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#qr img,
#qr canvas {
    max-width: 100%;
    height: auto !important;
}

.public-page button.danger {
    background: var(--danger);
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        height: 100dvh;
        padding-top: max(18px, env(safe-area-inset-top));
        transform: translateX(-105%);
        transition: transform 180ms ease;
        box-shadow: 12px 0 30px rgba(10, 20, 18, 0.24);
    }

    body.nav-open {
        overflow: hidden;
    }

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

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

    .mobile-nav-close {
        flex: 0 0 40px;
        width: 40px;
        min-height: 40px;
        border: 0;
        border-radius: var(--radius);
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        cursor: pointer;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 900;
        display: block;
        background: rgba(8, 18, 16, 0.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        padding-right: 24px;
        padding-left: 24px;
        padding-top: 0;
    }

    .topline {
        position: sticky;
        top: 0;
        z-index: 800;
        min-height: 66px;
        margin: 0 -24px 18px;
        padding: 9px 24px;
        border-bottom: 1px solid var(--line);
        background: rgba(244, 247, 247, 0.96);
        backdrop-filter: blur(9px);
    }

    .mobile-menu-button {
        width: 42px;
        min-height: 42px;
        flex: 0 0 42px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        align-items: center;
        justify-content: center;
        background: #fff;
        color: var(--text);
        cursor: pointer;
    }

    .help-index {
        top: 82px;
    }
}

@media (max-width: 900px) {
    .grid.two,
    .help-layout,
    .help-hero {
        grid-template-columns: 1fr;
    }

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

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

    .help-index {
        position: static;
    }

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

@media (max-width: 1040px) {
    .grid.two.list-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .main {
        padding-right: 13px;
        padding-bottom: 30px;
        padding-left: 13px;
    }

    .topline {
        margin-right: -13px;
        margin-left: -13px;
        padding-right: 13px;
        padding-left: 13px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 17px;
    }

    .page-date {
        display: none;
    }

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

    .topline-actions .btn {
        width: 42px;
        padding: 0;
    }

    .panel {
        padding: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid .full {
        grid-column: auto;
    }

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

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

    .call-stats .stat {
        min-height: 78px;
    }

    .call-stats .stat strong {
        font-size: 23px;
    }

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

    .call-filters,
    .call-filters input,
    .call-filters select,
    .call-filters .compact-check {
        width: 100%;
    }

    .phone-dock {
        width: 100%;
        padding: max(13px, env(safe-area-inset-top)) 13px max(13px, env(safe-area-inset-bottom));
        border-left: 0;
    }

    body.phone-dock-open {
        overflow: hidden;
    }

    .phone-outcome-modal {
        padding: 0;
        place-items: end stretch;
    }

    .phone-modal-dialog {
        width: 100%;
        max-height: 92dvh;
        padding: 15px;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .form-grid > div > .btn,
    .form-grid > .btn {
        flex: 1 1 180px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .toolbar > form.toolbar,
    form.toolbar {
        width: 100%;
    }

    form.toolbar > input,
    form.toolbar > select,
    form.toolbar > label {
        flex: 1 1 180px;
        width: auto;
        max-width: none !important;
        min-width: 0 !important;
    }

    form.toolbar > .btn {
        flex: 0 0 auto;
    }

    .compact-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    table.responsive-table,
    table.responsive-table tbody,
    table.responsive-table tr,
    table.responsive-table td {
        display: block;
        width: 100%;
    }

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

    table.responsive-table tbody {
        display: grid;
        gap: 10px;
    }

    table.responsive-table tr {
        padding: 5px 7px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
    }

    table.responsive-table td {
        min-width: 0;
        padding: 8px 5px;
        border-bottom: 1px solid #e7eceb;
        display: grid;
        grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
        gap: 10px;
    }

    table.responsive-table td:last-child {
        border-bottom: 0;
    }

    table.responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
    }

    table.responsive-table td[colspan] {
        display: block;
    }

    table.responsive-table td[colspan]::before,
    table.responsive-table td[data-label=""]::before {
        display: none;
    }

    table.responsive-table td .toolbar,
    table.responsive-table td form {
        min-width: 0;
    }

    .help-index nav {
        grid-template-columns: 1fr;
    }

    .tutorial summary {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        padding: 13px;
    }

    .tutorial-number {
        width: 33px;
        height: 33px;
    }

    .tutorial-body {
        padding: 0 13px 14px;
    }

    .tutorial-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .tutorial-footer .btn {
        width: 100%;
    }

    .auth-page,
    .public-page {
        display: block;
        padding: 0;
        background: #fff;
    }

    .login,
    .upload-shell {
        width: 100%;
        min-height: 100dvh;
        padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
        border: 0;
        box-shadow: none;
    }

    .public-page .button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-page .button-row button,
    .public-page form > button {
        width: 100%;
    }
}

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

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