/* Hide login before paint when returning from subpages / deep links. */
html.kabinet-session-pending #login-view,
html.kabinet-session-pending #forgot-view {
  display: none !important;
}
html.kabinet-session-pending #app-view[hidden] {
  display: none !important;
}
.kabinet-boot-status {
  display: none;
  margin: 28px 0 0;
}
html.kabinet-session-pending .kabinet-boot-status {
  display: block;
}

/* Mobile-safe width: page itself never grows sideways. */
html {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  overflow-x: hidden;
  max-width: 100%;
}
.wrap,
.app,
.app-layout,
.app-content,
.side-menu,
.card,
.edit-list,
.edit-form,
.add-form,
.car-add-form,
.powers-block,
.panel-title-row,
.panel-title-actions,
.car-docs,
.car-doc-draft,
.last-power,
#powers-panel,
#registry-panel,
#users-panel {
  max-width: 100%;
  min-width: 0;
}

.wrap {
  width: min(1600px, calc(100% - 40px));
}
.app {
  margin: 24px 0 40px;
  width: 100%;
}
.card {
  width: min(440px, 100%);
  margin: 28px 0 0;
  padding: 22px 22px 26px;
  border: 1px solid #e6e6e6;
  background: #fff;
}
.card h1,
.app h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}
.note,
.status {
  margin: 0 0 16px;
  font-size: 15px;
}
.status {
  min-height: 1.4em;
  color: #008fa3;
}
.status.is-bad {
  color: #9d2a2a;
}
label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 400;
}
input[type="email"],
input[type="password"],
input[type="text"] {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
}
button,
.btn {
  display: inline-block;
  margin: 0;
  padding: 10px 18px;
  border: 0;
  background: #06e5ff;
  color: #231f20;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.btn:hover {
  background: #00b797;
  color: #fff;
}
button:disabled {
  background: #6b6b6b;
  color: #fff;
  cursor: default;
}
.btn[hidden] {
  display: none;
}
.linkish {
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #008fa3;
  font: inherit;
  font-weight: 400;
  text-decoration: underline;
  cursor: pointer;
}
.linkish:hover {
  background: none;
  color: #00b797;
}
.who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 18px;
}
.app-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.side-menu {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #231f20;
}
.side-menu button {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.side-menu button:hover {
  background: #3a3536;
  color: #fff;
}
.side-menu button.is-on {
  background: #06e5ff;
  color: #231f20;
}
.side-menu button.is-on:hover {
  background: #00b797;
  color: #fff;
}
.app-content {
  flex: 1;
  min-width: 0;
}
.table-wrap,
.power-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #e6e6e6;
  text-align: left;
  vertical-align: top;
}
th {
  font-weight: 500;
  color: #231f20;
}
.name-row {
  display: flex;
  gap: 8px;
  min-width: 220px;
}
.name-row input {
  margin: 0;
}
input.cell-input,
select.user-select {
  display: block;
  width: 100%;
  min-width: 160px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
}
select.user-select {
  min-width: 190px;
  padding-right: 28px;
}
.panel-bar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 14px;
}
.plus {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}
.add-form {
  max-width: 440px;
  margin: 0 0 16px;
  padding: 16px 16px 18px;
  border: 1px solid #e6e6e6;
}
.add-form select {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
}
.msg {
  min-width: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}
.mono {
  word-break: break-all;
}
.is-blocked {
  color: #9d2a2a;
}
.empty {
  margin: 12px 0;
  color: #555;
}
.registry-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin: 0 0 12px;
}
.trash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #231f20;
  color: #fff;
}
.trash-btn:hover {
  background: #9d2a2a;
  color: #fff;
}
.trash-btn svg {
  display: block;
}
.check-cell {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}
.check-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #008fa3;
}
.foot {
  padding-bottom: 40px;
  color: #777;
  font-size: 14px;
}
.side-menu-title {
  display: none;
  margin: 0 0 4px;
  padding: 0 4px;
  color: #06e5ff;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mobile-menu-back {
  display: none;
  width: 100%;
  margin: 0 0 14px;
  background: #231f20;
  color: #fff;
  text-align: left;
}
.mobile-menu-back:hover {
  background: #3a3536;
  color: #fff;
}

@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }
  .side-menu {
    flex: none;
    width: 100%;
  }
  .side-menu-title {
    display: block;
  }
  .mobile-menu-back {
    display: inline-block;
  }
  .app-layout.is-menu-only .app-content,
  .app-layout.is-menu-only .mobile-menu-back {
    display: none !important;
  }
  .app-layout.is-section .side-menu {
    display: none;
  }
  .app-layout.is-section .mobile-menu-back:not([hidden]) {
    display: inline-block;
  }
  .powers-block {
    max-width: 100%;
  }
  .car-add-form,
  .add-form {
    max-width: 100%;
  }
  .form-grid:not([hidden]) {
    grid-template-columns: 1fr;
  }
  .table-wrap table {
    min-width: 640px;
  }
  .car-pick-row {
    flex-direction: column;
    align-items: stretch;
  }
  .car-select,
  select.car-select {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    line-height: 42px !important;
    padding: 0 36px 0 12px !important;
    overflow: hidden;
  }
  .car-pick-row > button,
  .car-pick-row > .icon-btn,
  .car-pick-row > a.icon-btn,
  .car-pick-row > .plus {
    width: 100%;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }
  .panel-title-row {
    flex-direction: column;
    align-items: stretch;
  }
  .panel-title-actions {
    width: 100%;
  }
  .panel-title-btn {
    width: 100%;
    text-align: center;
    white-space: normal;
  }
  .who {
    gap: 10px;
  }
  .who .note {
    margin: 0;
    font-size: 14px;
    word-break: break-word;
  }
  .who #logout,
  .who .btn {
    width: 100%;
    text-align: center;
  }
  .note,
  .status,
  .pick-summary,
  .car-selected,
  .car-selected dd,
  label {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  input[type="email"],
  input[type="password"],
  input[type="text"],
  select,
  textarea,
  button,
  .btn {
    max-width: 100%;
  }
}
@media (max-width: 640px) {
  .card h1,
  .app h1 {
    font-size: 26px;
  }
  .wrap {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
  }
  .card {
    margin-top: 18px;
    padding: 18px 16px 20px;
  }
  .top-row {
    gap: 10px;
  }
  .top-meta {
    gap: 6px 12px;
    font-size: 13px;
    max-width: 55%;
  }
  .brand img {
    height: 34px;
  }
  .side-menu button {
    min-height: 48px;
    font-size: 16px;
  }
  .dates-row {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .car-selected dl {
    grid-template-columns: 1fr;
  }
  .edit-form-actions {
    flex-direction: column;
  }
  .edit-form-actions button,
  .edit-form-actions .btn,
  .edit-form-actions .btn-secondary {
    width: 100%;
  }
  .car-doc-drop {
    max-width: 100%;
  }
}


.panel-title {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 700;
}
.block-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 500;
}
.powers-block {
  max-width: 720px;
}
.powers-block.powers-create,
.last-power {
  max-width: 100%;
}
.power-table-wrap table {
  width: 100%;
  min-width: 860px;
  table-layout: auto;
}
.power-table-wrap th,
.power-table-wrap td {
  white-space: nowrap;
  vertical-align: middle;
}
.power-table-wrap td:nth-child(2),
.power-table-wrap td:nth-child(3) {
  white-space: normal;
  min-width: 140px;
}
.power-actions-cell {
  white-space: nowrap;
  width: 1%;
}
.power-actions-cell .btn,
.power-actions-cell .btn-secondary,
.power-actions-cell .download-btn {
  display: inline-block;
  width: auto;
  margin: 0 6px 0 0;
  vertical-align: middle;
}
.power-actions-cell .btn:last-child,
.power-actions-cell .btn-secondary:last-child {
  margin-right: 0;
}
.car-pick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.car-select,
select.car-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  display: block;
  flex: 1 1 260px;
  min-width: 200px;
  width: auto;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  padding: 0 36px 0 12px;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23231f20' d='M1.1 1.2 6 6.1l4.9-4.9 1.1 1.1L6 8.3 0 2.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  color: #231f20;
  font: inherit;
  font-size: 16px;
  line-height: 42px;
  vertical-align: middle;
}
.car-select::-ms-expand {
  display: none;
}
.car-pick-row > button {
  flex: 0 0 auto;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  line-height: 1;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.car-add-form {
  max-width: 920px;
}
.form-grid:not([hidden]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  align-items: start;
}
.add-form[hidden],
.car-add-form[hidden],
.form-grid[hidden],
.car-doc-draft[hidden],
.last-power[hidden] {
  display: none !important;
}
.form-field {
  min-width: 0;
}
.form-field label {
  margin-top: 0;
}
.form-field-full {
  grid-column: 1 / -1;
}
.form-grid > .form-field-full .edit-form-actions {
  margin-top: 4px;
}
.car-selected {
  margin: 14px 0 0;
  padding: 14px 16px;
  border: 1px solid #e6e6e6;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.45;
}
.car-selected dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 6px 12px;
}
.car-selected dt {
  margin: 0;
  color: #555;
}
.car-selected dd {
  margin: 0;
  font-weight: 500;
}
.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;
}

.powers-block + .powers-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e6e6e6;
}
.pick-summary {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: #231f20;
}

.dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  max-width: 720px;
}
.dates-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0;
}
.dates-actions button {
  white-space: nowrap;
}
.dates-row input[type="text"] {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .dates-row {
    grid-template-columns: 1fr;
  }
  .dates-actions button {
    width: 100%;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
}
.icon-btn:hover {
  background: #06e5ff;
  border-color: #06e5ff;
  color: #231f20;
}
.icon-btn.is-danger:hover {
  background: #9d2a2a;
  border-color: #9d2a2a;
  color: #fff;
}
.btn-secondary {
  background: #231f20;
  color: #fff;
}
.btn-secondary:hover {
  background: #3a3536;
  color: #fff;
}
.edit-list {
  margin: 0 0 18px;
}
.table-search {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  max-width: 420px;
}
.table-search-label {
  font-size: 13px;
  font-weight: 500;
  color: #5a5556;
}
.table-search-input,
input.table-search-input[type="search"],
input.table-search-input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
}
.table-search-input:focus,
input.table-search-input[type="search"]:focus,
input.table-search-input[type="text"]:focus {
  outline: none;
  border-color: #06e5ff;
  box-shadow: 0 0 0 2px rgba(6, 229, 255, 0.2);
}
.table-search-input::-webkit-search-cancel-button {
  -webkit-appearance: searchfield-cancel-button;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  align-items: center;
}
.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.pager-btn:hover {
  border-color: #06e5ff;
  background: #f7feff;
  color: #231f20;
}
.pager-btn.is-on {
  border-color: #06e5ff;
  background: #06e5ff;
  color: #231f20;
}
.pager-btn.is-on:hover {
  background: #00b797;
  border-color: #00b797;
  color: #fff;
}
.edit-actions-cell {
  white-space: nowrap;
  width: 1%;
}
.edit-actions-cell .icon-btn {
  width: 34px;
  height: 34px;
  margin-right: 6px;
  vertical-align: middle;
}
.edit-actions-cell .icon-btn:last-child {
  margin-right: 0;
}
.edit-form.is-view-only input,
.edit-form.is-view-only textarea,
.edit-form.is-view-only select {
  background: #f3f1f1;
  color: #231f20;
  cursor: default;
  pointer-events: none;
}
.edit-form.is-view-only .car-docs-head .icon-btn,
.edit-form.is-view-only #car-doc-draft,
.edit-form.is-view-only .board-log-head .icon-btn,
.edit-form.is-view-only .board-log-actions,
.edit-form.is-view-only button[type="submit"] {
  display: none !important;
}
.edit-form.is-view-only .board-log-entry {
  background: #f7f7f7;
}
.edit-form.is-view-only .board-log-date,
.edit-form.is-view-only .board-log-text {
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}
.edit-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.dates-row .note {
  grid-column: 1 / -1;
}

.powers-create #create-power {
  min-width: 220px;
}
@media (max-width: 900px) {
  .powers-create #create-power {
    width: 100%;
    min-width: 0;
  }
  .edit-form-actions button,
  .edit-form-actions .btn,
  .edit-form-actions .btn-secondary {
    flex: 1 1 auto;
  }
}
.car-docs {
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e6e6e6;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.car-docs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.car-docs-head .block-title {
  margin: 0;
}
.board-log {
  margin: 20px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #e6e6e6;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.board-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.board-log-head .block-title {
  margin: 0;
}
.board-log-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.board-log-empty {
  margin: 0;
  color: #6b6566;
  font-size: 14px;
}
.board-log-entry {
  border: 1px solid #dcdcdc;
  background: #fff;
  padding: 14px 14px 12px;
}
.board-log-entry-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 10px;
}
.board-log-date-wrap {
  display: grid;
  gap: 4px;
  min-width: 140px;
}
.board-log-date-wrap label {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #5a5556;
}
.board-log-date {
  width: 140px;
  max-width: 100%;
  margin: 0 !important;
  height: 40px;
  box-sizing: border-box;
}
.board-log-text {
  display: block;
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #231f20;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  resize: vertical;
  box-sizing: border-box;
}
.board-log-text:focus {
  outline: none;
  border-color: #06e5ff;
  box-shadow: 0 0 0 2px rgba(6, 229, 255, 0.2);
}
.board-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.board-log-actions .btn-secondary {
  background: #efefef;
  color: #231f20;
}
.board-log-view-date {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #231f20;
}
.board-log-view-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.45;
  color: #231f20;
}
@media (max-width: 900px) {
  .board-log-date {
    width: 100%;
  }
  .board-log-date-wrap {
    flex: 1 1 140px;
  }
  .board-log-actions button {
    flex: 1 1 auto;
  }
}
.car-docs-list {
  display: flex;
  gap: 12px;
  margin: 0 0 14px;
  padding: 4px 2px 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
}
.car-docs-list .empty {
  margin: 8px 0;
}
.car-doc-card {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  border: 1px solid #e6e6e6;
  background: #fff;
  scroll-snap-align: start;
  cursor: pointer;
  overflow: hidden;
}
.car-doc-card:hover,
.car-doc-card:focus-visible {
  border-color: #06e5ff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 229, 255, 0.25);
}
.car-doc-card-media {
  position: relative;
  height: 140px;
  background: #231f20;
}
.car-doc-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #2e2a2b;
  content-visibility: auto;
}
.car-doc-card-media.is-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #231f20 0%, #3a3536 100%);
}
.car-doc-pdf-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 88px;
  border: 2px solid #06e5ff;
  background: #fff;
  color: #231f20;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
.car-doc-pdf-thumb span {
  display: block;
}
.car-doc-viewer-pdf {
  display: block;
  width: min(960px, 100%);
  height: min(78vh, 100%);
  border: 0;
  background: #fff;
  transform-origin: center center;
  transition: transform 0.15s ease;
}
.car-doc-viewer-pdf[hidden] {
  display: none !important;
}
.car-doc-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.car-doc-card-actions .icon-btn {
  width: 34px;
  height: 34px;
  background: rgba(35, 31, 32, 0.88);
  border-color: transparent;
  color: #fff;
}
.car-doc-card-actions .icon-btn:hover {
  background: #06e5ff;
  color: #231f20;
}
.car-doc-card-actions .icon-btn.is-danger:hover {
  background: #9d2a2a;
  color: #fff;
}
.car-doc-card-caption {
  margin: 0;
  padding: 10px 12px;
  min-height: 44px;
  background: #231f20;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}
.car-doc-card-caption.is-empty {
  color: #9a9596;
}
.car-doc-card-caption[data-doc-caption] {
  cursor: text;
}
.car-doc-card-caption[data-doc-caption]:hover {
  background: #2e2a2b;
}
.car-doc-card-caption.is-editing {
  padding: 8px 10px;
  background: #231f20;
}
.car-doc-card-caption-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}
input.car-doc-card-caption-input[type="text"],
.car-doc-card-caption-input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
  caret-color: #06e5ff;
  font: inherit;
  line-height: 1.35;
  box-sizing: border-box;
  color-scheme: dark;
}
input.car-doc-card-caption-input[type="text"]::placeholder,
.car-doc-card-caption-input::placeholder {
  color: #9a9596;
}
input.car-doc-card-caption-input[type="text"]:-webkit-autofill,
input.car-doc-card-caption-input[type="text"]:-webkit-autofill:hover,
input.car-doc-card-caption-input[type="text"]:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #06e5ff;
  transition: background-color 99999s ease-out;
  box-shadow: 0 0 0 1000px #231f20 inset !important;
}
.car-doc-caption-save {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2ecc71;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.car-doc-caption-save:hover {
  background: rgba(46, 204, 113, 0.16);
  color: #3ee687;
}
.car-doc-caption-save.is-done {
  background: #2ecc71;
  color: #fff;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.28);
}
.car-doc-caption-save[hidden] {
  display: none !important;
}
.car-doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(35, 31, 32, 0.96);
  color: #fff;
}
.car-doc-viewer[hidden] {
  display: none !important;
}
.car-doc-viewer-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px 16px;
  flex: 0 0 auto;
  pointer-events: none;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
}
.car-doc-viewer-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  pointer-events: auto;
}
.car-doc-viewer-zoom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.car-doc-viewer-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: #06e5ff;
  color: #231f20;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.car-doc-viewer-btn:hover {
  background: #00b797;
  color: #fff;
}
.car-doc-viewer-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 12px 56px;
  -webkit-overflow-scrolling: touch;
}
.car-doc-viewer-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease;
  user-select: none;
}
.car-doc-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  background: #06e5ff;
  color: #231f20;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.car-doc-viewer-nav:hover {
  background: #00b797;
  color: #fff;
}
.car-doc-viewer-prev {
  left: 12px;
}
.car-doc-viewer-next {
  right: 12px;
}
.car-doc-viewer-caption {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 18px;
  background: #231f20;
  border-top: 3px solid #06e5ff;
}
.car-doc-viewer-caption-main {
  min-width: 0;
  flex: 1 1 auto;
}
.car-doc-viewer-caption-text {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  word-break: break-word;
}
.car-doc-viewer-caption-text.is-empty {
  color: #9a9596;
  font-weight: 400;
}
.car-doc-viewer-counter {
  margin: 0;
  color: #06e5ff;
  font-size: 13px;
}
.car-doc-viewer-rotate {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.car-doc-viewer-rotate[hidden] {
  display: none !important;
}
.car-doc-viewer-rotate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
}
.car-doc-viewer-rotate-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}
.car-doc-viewer-rotate-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}
body.car-doc-viewer-open {
  overflow: hidden;
}
@media (max-width: 640px) {
  .car-doc-viewer-caption {
    flex-direction: column;
    align-items: stretch;
  }
  .car-doc-viewer-rotate {
    justify-content: flex-end;
  }
  .car-doc-card {
    flex-basis: 150px;
    width: 150px;
  }
  .car-doc-card-media {
    height: 120px;
  }
  .car-doc-viewer-stage {
    padding: 8px 44px;
  }
  .car-doc-viewer-nav {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}
.car-doc-draft {
  padding: 16px;
  border: 1px solid #e6e6e6;
  background: #fff;
  margin-bottom: 12px;
}
.car-doc-drop-label {
  margin-bottom: 8px;
}
.car-doc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.car-doc-drop {
  position: relative;
  display: block;
  margin: 0 0 14px;
  padding: 22px 18px;
  border: 1px dashed #cfcfcf;
  background: #f7fbfc;
  color: #231f20;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.car-doc-drop:hover,
.car-doc-drop:focus-visible {
  border-color: #008fa3;
  background: #effafc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 229, 255, 0.25);
}
.car-doc-drop.is-dragover {
  border-color: #06e5ff;
  background: #e8fbff;
  box-shadow: 0 0 0 3px rgba(6, 229, 255, 0.35);
}
.car-doc-drop.has-file {
  border-style: solid;
  border-color: #00b797;
  background: #f3fffb;
}
.car-doc-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.car-doc-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 4px;
  border: 1px solid #06e5ff;
  background: #06e5ff;
  color: #231f20;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}
.car-doc-drop-title {
  font-size: 16px;
  font-weight: 600;
  color: #231f20;
}
.car-doc-drop-hint {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.4;
  color: #777;
}
.car-doc-drop-name {
  margin-top: 6px;
  padding: 6px 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #231f20;
  color: #fff;
  font-size: 13px;
}
@media (max-width: 640px) {
  .car-doc-drop {
    padding: 18px 14px;
  }
  .car-doc-drop-title {
    font-size: 15px;
  }
}
.last-power {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}
.last-power .block-title {
  margin-top: 0;
}
.last-power .edit-list {
  margin-bottom: 12px;
}

.panel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.panel-title-row .panel-title {
  margin: 0;
}
.panel-title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.panel-title-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .panel-title-actions {
    width: 100%;
  }
  .panel-title-btn {
    flex: 1 1 100%;
    width: 100%;
    text-align: center;
    white-space: normal;
  }
  .power-actions-cell .btn,
  .power-actions-cell .btn-secondary,
  .power-actions-cell .download-btn {
    margin: 0 6px 6px 0;
  }
}

.download-btn {
  padding: 8px 12px;
  font-size: 14px;
  white-space: nowrap;
}
