.user-cabinet-launch {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 160;
  min-height: 42px;
  padding: 8px 14px;
  color: #fff;
  background: #0b4f96;
  border: 1px solid #4298e8;
  border-radius: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.user-cabinet-dialog {
  width: min(1180px, calc(100vw - 28px));
  height: min(900px, calc(100dvh - 28px));
  max-width: none;
  max-height: none;
  padding: 20px;
  overflow: auto;
  color: #f4f8ff;
  background: #06162b;
  border: 1px solid #31577c;
  border-radius: 6px;
}

.user-cabinet-dialog::backdrop { background: rgba(0, 8, 20, .78); }
.uc-shell { display: grid; gap: 14px; padding-top: 8px; }
.uc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-right: 58px; }
.uc-head h2 { margin: 0; font-size: 25px; }
.uc-head p { margin: 4px 0 0; color: #abc4dc; }
.uc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.uc-panel {
  padding: 14px;
  background: #0a223f;
  border: 1px solid #2f5579;
  border-radius: 6px;
}

.uc-panel h3 { margin: 0 0 10px; font-size: 18px; }
.uc-panel p { color: #c6d7e8; }
.uc-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.uc-section-head h3 { margin: 0; }
.uc-profile dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; }
.uc-profile dl > div { display: grid; grid-template-columns: minmax(110px, .7fr) 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid #1f4364; }
.uc-profile dt { color: #91acc5; }
.uc-profile dd { margin: 0; overflow-wrap: anywhere; }

.uc-list { display: grid; }
.uc-person { display: grid; grid-template-columns: minmax(180px, 1fr) 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #1f4364; }
.uc-person:last-child { border-bottom: 0; }
.uc-person small { display: block; color: #aac0d6; }
.uc-person.is-progress { grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) 1fr auto; }
.uc-metrics { display: flex; gap: 10px; margin-bottom: 10px; }
.uc-metric { min-width: 150px; padding: 10px; background: #102f52; border-left: 3px solid #57a9f2; }
.uc-metric strong { display: block; color: #d9ff87; font-size: 22px; }
.uc-progress { height: 5px; margin-top: 5px; overflow: hidden; background: #1b3653; }
.uc-progress span { display: block; height: 100%; background: #83d33f; }
.uc-course-list { display: grid; gap: 4px; font-size: 12px; }

.uc-password { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.uc-password input,
.uc-profile-form input,
.uc-request textarea,
.uc-destruction textarea,
.uc-destruction input[type="file"] {
  min-width: 0;
  padding: 10px;
  color: #fff;
  background: #041328;
  border: 1px solid #376087;
  border-radius: 4px;
}

.uc-button {
  min-height: 40px;
  padding: 8px 14px;
  color: #fff;
  background: #147ceb;
  border: 1px solid #41a1ff;
  border-radius: 5px;
}

.uc-button.is-secondary { background: #102b49; border-color: #42688a; }
.uc-button.is-danger { background: #6d2036; border-color: #b14c66; }
.uc-destruction a.uc-button { display: inline-flex; align-items: center; width: fit-content; text-decoration: none; }
.uc-message { padding: 10px; color: #d5ffe5; background: #123828; border: 1px solid #2c7b54; border-radius: 5px; }
.uc-error { padding: 10px; color: #ffdce2; background: #42192a; border: 1px solid #9b3857; border-radius: 5px; }

.uc-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.uc-profile-form label,
.uc-destruction label,
.uc-request label { display: grid; gap: 5px; color: #b7cce0; }
.uc-profile-choice { position: relative; display: grid; gap: 5px; min-width: 0; color: #b7cce0; }
.uc-profile-choice details { position: relative; min-width: 0; }
.uc-profile-choice summary {
  min-height: 40px;
  padding: 10px 34px 10px 10px;
  overflow: hidden;
  color: #fff;
  background: #041328;
  border: 1px solid #376087;
  border-radius: 4px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uc-profile-choice-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  max-height: 230px;
  padding: 8px;
  overflow: auto;
  color: #fff;
  background: #071d38;
  border: 1px solid #46739a;
  border-radius: 5px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, .42);
}
.uc-profile-choice-menu label { display: flex; align-items: flex-start; gap: 8px; padding: 6px; color: #fff; border-radius: 4px; }
.uc-profile-choice-menu label:hover { background: rgba(48, 132, 216, .2); }
.uc-profile-choice-menu label.is-legacy { color: #ffd596; }
.uc-profile-choice-menu input { margin-top: 2px; }
.uc-profile-choice-menu small { color: inherit; opacity: .78; }
.uc-profile-choice-menu p { margin: 5px; color: #aac0d6; font-size: 12px; }
.uc-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; grid-column: 1 / -1; }
.uc-admin-events { display: grid; gap: 9px; grid-column: 1 / -1; padding: 12px; background: #071a31; border: 1px solid #2f5579; border-radius: 5px; }
.uc-admin-events > strong { color: #eaf5ff; }
.uc-admin-events > div { display: grid; gap: 8px; }
.uc-event-row { display: grid; grid-template-columns: minmax(150px, .35fr) minmax(240px, 1fr) 42px; gap: 8px; align-items: end; }
.uc-event-row .uc-button { width: 42px; min-height: 42px; padding: 0; }
.uc-admin-events p { margin: 0; }

.uc-request-list { display: grid; }
.uc-request { padding: 12px 0; border-top: 1px solid #285070; }
.uc-request > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.uc-request > header span { padding: 4px 7px; color: #d7eaff; background: #173a60; border: 1px solid #3b648a; border-radius: 4px; font-size: 12px; }
.uc-request-diff { display: grid; grid-template-columns: minmax(100px, .6fr) 1fr 20px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid #193c5d; }
.uc-request small { display: block; margin-top: 8px; color: #adc3d8; }
.uc-approvals .uc-request { margin-top: 10px; }

.uc-danger-link { justify-self: start; padding: 7px 0; color: #ffb6c4; background: transparent; border: 0; border-bottom: 1px dashed #b14c66; }
.uc-destruction { border-color: #854258; }
.uc-warning { padding: 11px; color: #ffe6b0; background: #392b12; border: 1px solid #81602e; border-radius: 4px; }
.uc-warning p { margin: 4px 0 0; color: inherit; }
.uc-destruction-steps { display: grid; gap: 10px; padding-left: 24px; color: #d7e6f5; }
.uc-destruction-steps li { padding-left: 4px; }
.uc-privacy-note,
.uc-alternative-channel { padding: 10px 12px; color: #b9cde1; background: #071a31; border-left: 3px solid #4d789e; }
.uc-alternative-channel a { color: #78c2ff; }
.uc-check { grid-template-columns: auto 1fr; align-items: start; margin: 12px 0; }
.uc-check input { margin-top: 3px; }

@media (max-width: 760px) {
  .user-cabinet-dialog { width: 100vw; height: 100dvh; max-height: none; padding: 14px; border: 0; border-radius: 0; }
  .user-cabinet-launch { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); font-size: 13px; }
  .uc-head { align-items: flex-start; padding-right: 42px; }
  .uc-grid, .uc-profile-form, .uc-profile dl { grid-template-columns: 1fr; }
  .uc-profile dl > div { grid-template-columns: minmax(130px, .75fr) minmax(0, 1fr); gap: 10px; }
  .uc-profile dt { overflow-wrap: anywhere; line-height: 1.2; }
  .uc-person, .uc-person.is-progress { grid-template-columns: 1fr; }
  .uc-password { grid-template-columns: 1fr; }
  .uc-event-row { grid-template-columns: 1fr; }
  .uc-event-row .uc-button { width: 100%; }
  .uc-request-diff { grid-template-columns: 1fr; }
  .uc-request-diff span:nth-of-type(2) { transform: rotate(90deg); justify-self: center; }
}
