.tsd-archive-filter-toggle { display: none; }

@media (max-width: 520px) {
  body.atol-tsd {
    --tsd-nav-height: 58px;
    --tsd-gap: 10px;
    overflow-x: hidden;
  }

  body.atol-tsd .mobile-header {
    height: 50px;
    min-height: 50px;
    padding: 0 12px;
  }

  body.atol-tsd .mobile-header .brand-copy small,
  body.atol-tsd .mobile-header .theme-switcher,
  body.atol-tsd .mobile-account b { display: none; }

  body.atol-tsd .mobile-header .brand-copy strong { font-size: 17px; letter-spacing: .08em; }
  body.atol-tsd .workspace { padding-bottom: calc(var(--tsd-nav-height) + 10px); }
  body.atol-tsd main { padding: 10px 8px 14px; }
  body.atol-tsd #operator-page:not(.showing-active) > .page-header { display: none; }
  body.atol-tsd .page-header { margin: 0 2px 9px; }
  body.atol-tsd .page-header .eyebrow,
  body.atol-tsd .page-header p,
  body.atol-tsd .header-metrics { display: none; }
  body.atol-tsd .page-header h1 { font-size: 22px; line-height: 1.15; }

  body.atol-tsd .panel {
    padding: 11px;
    border-radius: 12px;
  }

  body.atol-tsd .operator-layout { margin: 0; }
  body.atol-tsd .create-panel .panel-heading { margin-bottom: 8px; padding-bottom: 7px; }
  body.atol-tsd .create-panel .panel-heading .step-number { display: none; }
  body.atol-tsd .create-panel .panel-heading h2 { font-size: 0; }
  body.atol-tsd .create-panel .panel-heading h2::after { content: "Новая запись"; font-size: 18px; }
  body.atol-tsd .create-panel .required-note { display: none; }
  body.atol-tsd .incident-form { gap: 9px; }
  body.atol-tsd .incident-form .field { gap: 4px; font-size: 13px; }
  body.atol-tsd .incident-form input,
  body.atol-tsd .incident-form select,
  body.atol-tsd .incident-form textarea {
    min-height: 45px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 16px;
  }
  body.atol-tsd .operator-name-field { display: none; }
  body.atol-tsd .advanced-fields > summary { min-height: 42px; padding: 9px 10px; font-size: 13px; }
  body.atol-tsd .advanced-fields > summary span { display: none; }
  body.atol-tsd .primary-action { min-height: 47px; }

  body.atol-tsd .camera-readiness {
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
  }
  body.atol-tsd .camera-readiness .readiness-icon { width: 30px; height: 30px; }
  body.atol-tsd .camera-readiness .readiness-body { display: flex; align-items: center; min-width: 0; }
  body.atol-tsd .camera-readiness .readiness-summary { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
  body.atol-tsd .camera-readiness .readiness-summary strong { font-size: 17px; }
  body.atol-tsd .camera-readiness .readiness-summary small { margin: 0; font-size: 11px; }
  body.atol-tsd .camera-readiness.ready .readiness-cameras { display: none; }
  body.atol-tsd .camera-readiness:not(.ready) .readiness-cameras {
    margin: 0 0 0 8px;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.atol-tsd .camera-readiness:not(.ready) .readiness-camera { flex: 0 0 auto; }

  body.atol-tsd .active-card { margin: 0; padding-bottom: 76px; }
  body.atol-tsd .recording-head { display: flex; margin-bottom: 8px; }
  body.atol-tsd .recording-head .eyebrow { display: none; }
  body.atol-tsd .recording-clock { margin: 0; font-size: 18px; }
  body.atol-tsd .operation-time-strip { padding: 8px; gap: 7px; }
  body.atol-tsd .operation-time-strip small { font-size: 10px; }
  body.atol-tsd .operation-time-strip strong { font-size: 12px; }
  body.atol-tsd .action-guidance { padding: 8px 0; gap: 7px; }
  body.atol-tsd .action-guidance > strong { font-size: 13px; }
  body.atol-tsd .active-record-actions { display: flex; width: 100%; }
  body.atol-tsd .active-record-actions #edit-incident { display: none; }
  body.atol-tsd .active-record-actions #new-incident {
    width: 100%;
    min-height: 42px;
    border-radius: 9px;
  }
  body.atol-tsd .active-readiness { margin: 5px 0; }
  body.atol-tsd .record-controls {
    position: fixed;
    z-index: 35;
    left: 8px;
    right: 8px;
    bottom: calc(var(--tsd-nav-height) + 7px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
    backdrop-filter: blur(14px);
  }
  body.atol-tsd .record-controls button { min-height: 48px; padding: 8px; border-radius: 9px; font-size: 14px; }
  body.atol-tsd .record-controls .record-start { grid-column: 1 / -1; }
  body.atol-tsd .materials-block { margin-top: 7px; }

  body.atol-tsd .archive-page-header { display: flex; align-items: center; justify-content: space-between; }
  body.atol-tsd .archive-header-actions { margin: 0; }
  body.atol-tsd #archive-browser-status { display: none; }
  body.atol-tsd #refresh { width: 42px; min-width: 42px; min-height: 42px; padding: 0; }
  body.atol-tsd #refresh b { display: none; }
  body.atol-tsd #incidents-page > .panel { padding: 9px; }
  body.atol-tsd .archive-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px;
    margin-bottom: 8px;
  }
  body.atol-tsd .archive-search { min-width: 0; min-height: 44px; }
  body.atol-tsd .archive-search input { min-width: 0; padding: 8px; font-size: 15px; }
  body.atol-tsd .tsd-archive-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 46px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: var(--input-bg, var(--panel));
  }
  body.atol-tsd .tsd-archive-filter-toggle b { display: none; }
  body.atol-tsd .tsd-archive-filter-toggle i {
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: var(--primary);
    font-size: 10px;
    font-style: normal;
  }
  body.atol-tsd .archive-filter-reset { display: none; }
  body.atol-tsd #incident-table-head.incident-table-head.archive-column-filters { display: none !important; }
  body.atol-tsd #incident-table-head.incident-table-head.archive-column-filters.tsd-open {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin: 0 0 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
  }
  body.atol-tsd .archive-column-filter,
  body.atol-tsd .archive-date-filter { min-width: 0; }
  body.atol-tsd .archive-column-filter select,
  body.atol-tsd .archive-date-filter summary { min-height: 42px; padding: 7px 9px; font-size: 13px; }
  body.atol-tsd .archive-video-heading,
  body.atol-tsd .archive-actions-heading { display: none; }

  body.atol-tsd .incident-list { gap: 0; }
  body.atol-tsd .incident-row,
  body.atol-tsd.role-operator .incident-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main record" "zone review" "duration duration";
    gap: 6px 9px;
    padding: 11px 7px;
    border-width: 1px 0 0;
    border-radius: 0;
  }
  body.atol-tsd .incident-row:first-child { border-top: 0; }
  body.atol-tsd .incident-main { grid-area: main; min-width: 0; }
  body.atol-tsd .incident-main strong { font-size: 15px; }
  body.atol-tsd .incident-zone { grid-area: zone; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  body.atol-tsd .incident-date { display: none; }
  body.atol-tsd .incident-record-status { grid-area: record; justify-self: end; }
  body.atol-tsd .incident-review-status { grid-area: review; justify-self: end; }
  body.atol-tsd .incident-duration { grid-area: duration; display: flex; gap: 6px; align-items: baseline; font-size: 12px; }
  body.atol-tsd .incident-duration small { margin: 0; }
  body.atol-tsd .incident-actions { display: none; }

  body.atol-tsd .mobile-nav {
    height: var(--tsd-nav-height);
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
  }
  body.atol-tsd .mobile-nav .nav-btn { min-height: 46px; border-radius: 10px; }
  body.atol-tsd .mobile-nav .nav-icon { width: 25px; height: 25px; }
}
