:root {
    --ds-color-bg: var(--bg);
    --ds-color-surface: rgba(13, 24, 43, 0.92);
    --ds-color-surface-muted: rgba(255, 255, 255, 0.04);
    --ds-color-surface-hover: rgba(255, 255, 255, 0.075);
    --ds-color-border: var(--stroke);
    --ds-color-border-strong: var(--stroke-strong);
    --ds-color-text: var(--text);
    --ds-color-text-muted: var(--muted);
    --ds-color-text-soft: var(--muted-soft);
    --ds-color-primary: var(--accent);
    --ds-color-primary-strong: var(--accent-strong);
    --ds-color-danger: var(--danger);
    --ds-color-warning: var(--accent-warm);
    --ds-color-success: var(--success);
    --ds-radius-control: 14px;
    --ds-radius-card: 18px;
    --ds-radius-panel: 20px;
    --ds-shadow-card: 0 18px 48px rgba(0, 0, 0, 0.22);
    --ds-control-height: 46px;
    --ds-control-height-sm: 38px;
    --ds-space-1: 4px;
    --ds-space-2: 8px;
    --ds-space-3: 12px;
    --ds-space-4: 16px;
    --ds-space-5: 20px;
    --ds-space-6: 24px;
    --ds-font-xs: 12px;
    --ds-font-sm: 13px;
    --ds-font-md: 14px;
    --ds-font-lg: 18px;
    --ds-font-xl: 22px;
    --ds-focus: 0 0 0 4px rgba(78, 205, 196, 0.14);
}

html.theme-light {
    --ds-color-surface: rgba(255, 255, 255, 0.96);
    --ds-color-surface-muted: rgba(15, 23, 42, 0.045);
    --ds-color-surface-hover: rgba(15, 23, 42, 0.075);
    --ds-shadow-card: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.workspace-content,
  .minimal-content {
    row-gap: var(--ds-space-5);
  }

  .ds-surface,
  .card,
  .toolbar-card,
  .metric-card,
  .inventory-shell,
  .inventory-card,
  .project-command-card,
  .settings-panel,
  .settings-info-panel,
  .settings-row-card,
  .settings-operation-card,
  .dynamic-card,
  .dialog-section,
  .auth-card {
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-card);
    background: linear-gradient(180deg, var(--ds-color-surface), rgba(8, 16, 29, 0.94));
    box-shadow: var(--ds-shadow-card);
  }

  html.theme-light .ds-surface,
  html.theme-light .card,
  html.theme-light .toolbar-card,
  html.theme-light .metric-card,
  html.theme-light .inventory-shell,
  html.theme-light .inventory-card,
  html.theme-light .project-command-card,
  html.theme-light .settings-panel,
  html.theme-light .settings-info-panel,
  html.theme-light .settings-row-card,
  html.theme-light .settings-operation-card,
  html.theme-light .dynamic-card,
  html.theme-light .dialog-section,
  html.theme-light .auth-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
  }

  .ds-card,
  .card,
  .form-card,
  .feature-card,
  .auth-card {
    padding: var(--ds-space-5);
  }

  .project-command-card {
    border-color: rgba(78, 205, 196, 0.16);
    background:
      linear-gradient(135deg, rgba(78, 205, 196, 0.11), transparent 36%),
      linear-gradient(180deg, rgba(18, 29, 50, 0.92), rgba(8, 15, 27, 0.94));
    direction: rtl;
    text-align: right;
  }

  .project-command-card-polished:hover {
    border-color: rgba(78, 205, 196, 0.42);
    background:
      linear-gradient(135deg, rgba(78, 205, 196, 0.16), transparent 38%),
      linear-gradient(180deg, rgba(22, 36, 61, 0.94), rgba(10, 19, 33, 0.96));
  }

  html.theme-light .project-command-card {
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.12), transparent 36%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.96));
  }

  .project-command-head-rich {
    justify-content: space-between;
    align-items: center;
    direction: rtl;
  }

  .project-command-title {
    flex: 1 1 auto;
    align-items: flex-start;
    text-align: right;
    direction: rtl;
  }

  .project-command-meta,
  .project-command-stats {
    justify-content: flex-start;
  }

  .project-command-actions {
    direction: rtl;
  }

  .ds-card-header,
  .section-mini-head,
  .project-command-head,
  .inventory-shell-head,
  .settings-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ds-space-4);
  }

  .ds-card-body,
  .stack-list,
  .settings-list,
  .dynamic-stack {
    display: grid;
    gap: var(--ds-space-3);
  }

  .ds-card-footer,
  .inline-actions,
  .dashboard-cta-row,
  .inventory-actions,
  .hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: var(--ds-space-3);
  }

  .page-command-bar,
  .page-header {
    min-height: 82px;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-panel);
    background: linear-gradient(180deg, var(--ds-color-surface), rgba(8, 16, 29, 0.92));
    box-shadow: var(--ds-shadow-card);
    padding: var(--ds-space-4) var(--ds-space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ds-space-4);
    flex-wrap: wrap;
  }

  html.theme-light .page-command-bar,
  html.theme-light .page-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96));
  }

  .danger-command {
    border-color: rgba(239, 68, 68, 0.3);
  }

  h1,
  h2,
  h3,
  h4,
  .page-title {
    letter-spacing: 0;
    line-height: 1.45;
  }

  .page-command-bar h1,
  .page-title {
    margin: 0;
    font-size: var(--ds-font-xl);
    font-weight: 700;
  }

  .section-mini-head h2,
  .section-mini-head h3,
  .section-mini-head h4 {
    margin: 0;
    font-size: var(--ds-font-lg);
    font-weight: 700;
  }

  .page-subtitle,
  .muted,
  .small,
  .field-label,
  .field label {
    line-height: 1.8;
  }

  .btn,
  .icon-btn,
  .category-pill,
  .info-chip,
  .pill,
  .version-pill,
  .page-badge,
  .eyebrow {
    min-height: var(--ds-control-height);
    border-radius: var(--ds-radius-control);
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface-muted);
    color: var(--ds-color-text);
    font-size: var(--ds-font-md);
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ds-space-2);
    white-space: nowrap;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  }

  .btn {
    padding-inline: var(--ds-space-4);
  }

  .icon-btn {
    width: var(--ds-control-height);
    min-width: var(--ds-control-height);
    padding: 0;
  }

  .btn-sm,
  .action-icon-btn {
    min-height: var(--ds-control-height-sm);
    border-radius: 12px;
    font-size: var(--ds-font-sm);
  }

  .btn-sm {
    padding-inline: var(--ds-space-3);
  }

  .action-icon-btn {
    width: var(--ds-control-height-sm);
    min-width: var(--ds-control-height-sm);
  }

  .btn:hover,
  .icon-btn:hover,
  .category-pill:hover,
  .workspace-nav-item:hover {
    transform: translateY(-1px);
    border-color: rgba(78, 205, 196, 0.32);
    background: var(--ds-color-surface-hover);
  }

  .btn:active,
  .icon-btn:active,
  .category-pill:active {
    transform: translateY(0);
    box-shadow: none;
  }

  .btn.primary {
    border-color: rgba(78, 205, 196, 0.38);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(78, 205, 196, 0.2));
  }

  .btn.danger,
  .icon-btn.danger {
    border-color: rgba(239, 68, 68, 0.32);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.16));
  }

  .btn:focus-visible,
  .icon-btn:focus-visible,
  .category-pill:focus-visible,
  .workspace-nav-item:focus-visible,
  a:focus-visible,
  button:focus-visible,
  summary:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 2px solid rgba(78, 205, 196, 0.72);
    outline-offset: 2px;
    box-shadow: var(--ds-focus);
  }

  .form,
  .form-card,
  .field,
  .toolbar-group {
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-2);
  }

  .form {
    gap: var(--ds-space-4);
  }

  [hidden] {
    display: none !important;
  }

  .form-grid,
  .pw-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ds-space-4);
  }

  input,
  textarea,
  select {
    min-height: var(--ds-control-height);
    border-radius: var(--ds-radius-control);
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface-muted);
    color: var(--ds-color-text);
    padding: 12px 14px;
    font-size: var(--ds-font-md);
  }

  input:hover,
  textarea:hover,
  select:hover {
    background: var(--ds-color-surface-hover);
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--ds-color-text-soft);
  }

  .field label,
  .field-label {
    min-height: 20px;
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-sm);
    font-weight: 700;
  }

  .error,
  .field-validation-error,
  .validation-summary-errors {
    color: #fca5a5;
    font-size: var(--ds-font-xs);
    line-height: 1.8;
  }

  html.theme-light .error,
  html.theme-light .field-validation-error,
  html.theme-light .validation-summary-errors {
    color: #b91c1c;
  }

  .table-wrap,
  .ds-table-wrap {
    overflow: auto;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-color-surface-muted);
  }

  table,
  .ds-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ds-color-text);
  }

  th,
  td,
  .ds-table th,
  .ds-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ds-color-border);
    text-align: right;
    vertical-align: middle;
  }

  th,
  .ds-table th {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-sm);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.035);
  }

  tr:hover td,
  .ds-table tr:hover td {
    background: var(--ds-color-surface-hover);
  }

  .empty-state,
  .alert,
  .toast {
    border-radius: var(--ds-radius-card);
  }

  .alert {
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface-muted);
    padding: var(--ds-space-3) var(--ds-space-4);
    display: grid;
    gap: var(--ds-space-1);
  }

  .alert.success {
    border-color: rgba(34, 197, 94, 0.3);
  }

  .alert.warn {
    border-color: rgba(245, 158, 11, 0.3);
  }

  .alert.danger {
    border-color: rgba(239, 68, 68, 0.3);
  }

  .dialog-shell {
    border-radius: var(--ds-radius-panel);
  }

  .dialog-head,
  .dialog-body,
  .dialog-foot {
    padding: var(--ds-space-5);
  }

  .workspace-nav {
    gap: var(--ds-space-2);
  }

  .workspace-nav-item {
    min-height: 68px;
    border-radius: var(--ds-radius-control);
    padding: 12px 14px;
  }

  .workspace-nav-item.active {
    border-color: rgba(78, 205, 196, 0.38);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.14), rgba(14, 165, 233, 0.09));
  }

  .workspace-nav-icon,
  .user-chip-mark,
  .brand-mark,
  .app-mark {
    border-radius: var(--ds-radius-control);
  }

  .pw-tool-panel,
  .pw-suggestion {
    border-radius: var(--ds-radius-card);
    border: 1px solid var(--ds-color-border);
    background: rgba(5, 12, 24, 0.76);
  }

  .settings-panel-body > .pw-tool-panel {
    width: 100%;
    max-width: none;
    margin-block: 0;
  }

  .settings-panel-body > .pw-tool-panel .pw-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-panel-body > .pw-tool-panel .pw-keyword-field {
    grid-column: 1 / -1;
  }

  .settings-panel-body > .pw-tool-panel .pw-suggestion {
    grid-template-columns: auto auto auto minmax(0, 1fr);
  }

  html.theme-light .pw-tool-panel,
  html.theme-light .pw-suggestion {
    background: rgba(255, 255, 255, 0.9);
  }

  @media (max-width: 860px) {
    .settings-panel-body > .pw-tool-panel .pw-tool-grid,
    .settings-panel-body > .pw-tool-panel .pw-suggestion {
      grid-template-columns: 1fr;
    }

    .settings-panel-body > .pw-tool-panel .pw-keyword-field {
      grid-column: auto;
    }

    .page-command-bar,
    .page-header,
    .card,
    .toolbar-card,
    .inventory-shell,
    .auth-card,
    .dialog-head,
    .dialog-body,
    .dialog-foot {
      padding: var(--ds-space-4);
    }

    .form-grid,
    .pw-tool-grid,
    .metric-grid,
    .mini-metric-grid,
    .dashboard-grid,
    .dashboard-grid-three,
    .dashboard-grid-wide,
    .project-command-grid,
    .inventory-grid,
    .settings-action-grid,
    .settings-operation-grid {
      grid-template-columns: 1fr;
    }

    .btn,
    .inline-actions .btn,
    .dashboard-cta-row .btn,
    .inventory-actions .btn {
      width: 100%;
    }

    .sms-auth-send-inline {
      width: 100%;
    }
  }

/* 3.5.6 visual polish layer */
:root {
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --ds-radius-control: 10px;
    --ds-radius-card: 10px;
    --ds-radius-panel: 12px;
    --ds-shadow-card: 0 14px 34px rgba(0, 0, 0, 0.18);
    --surface-card: linear-gradient(180deg, rgba(18, 29, 50, 0.94), rgba(9, 17, 31, 0.95));
}

html.theme-light {
    --ds-shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body {
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.08), transparent 28%),
      linear-gradient(225deg, rgba(78, 205, 196, 0.07), transparent 34%),
      linear-gradient(180deg, #06101b 0%, var(--bg) 48%, #040914 100%);
}

html.theme-light body {
    background:
      linear-gradient(135deg, rgba(14, 165, 233, 0.07), transparent 30%),
      linear-gradient(180deg, #f8fbff 0%, var(--bg) 48%, #edf4ff 100%);
}

.backdrop-glow {
    display: none;
}

.backdrop-grid {
    opacity: 0.36;
    background-size: 48px 48px;
}

.card,
.toolbar-card,
.metric-card,
.settings-panel,
.settings-row-card,
.settings-operation-card,
.inventory-shell,
.inventory-card,
.project-command-card,
.auth-card {
    box-shadow: var(--ds-shadow-card);
}

.metric-card,
.settings-metric-card {
    min-height: 116px;
    position: relative;
    overflow: hidden;
}

.metric-card::before,
.settings-metric-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 99px;
    background: rgba(78, 205, 196, 0.58);
}

.metric-grid .metric-card:nth-child(2)::before {
    background: rgba(14, 165, 233, 0.62);
}

.metric-grid .metric-card:nth-child(3)::before {
    background: rgba(245, 158, 11, 0.62);
}

.metric-grid .metric-card:nth-child(4)::before {
    background: rgba(34, 197, 94, 0.58);
}

.metric-card strong {
    font-size: 30px;
    line-height: 1.15;
}

.metric-card span,
.metric-card small {
    line-height: 1.65;
}

.section-mini-head,
.settings-row-head,
.project-command-head {
    align-items: center;
}

.stack-list-row,
.activity-row,
.mini-metric,
.checkbox-tile {
    border-radius: var(--ds-radius-card);
}

.stack-list-row:hover,
.activity-row:hover,
.mini-metric:hover {
    border-color: rgba(78, 205, 196, 0.24);
    background: var(--ds-color-surface-hover);
}

.btn,
.icon-btn,
.category-pill,
.info-chip,
.pill,
.version-pill,
.eyebrow {
    min-height: 42px;
    line-height: 1.35;
}

.pill,
.info-chip,
.eyebrow,
.version-pill {
    min-height: 32px;
    padding-inline: 11px;
    font-size: var(--ds-font-xs);
}

.btn.primary {
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.15);
}

input,
textarea,
select {
    text-align: inherit;
}

.text-ltr,
input.text-ltr,
textarea.text-ltr,
select.text-ltr,
bdi.text-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
}

.auth-stage-single {
    grid-template-columns: minmax(340px, 500px);
}

.auth-card {
    padding: 26px;
}

.auth-head {
    align-items: flex-start;
}

.auth-head .page-header {
    min-height: auto;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-head .page-title {
    font-size: 24px;
}

.auth-panel {
    gap: 20px;
}

.auth-panel .form {
    gap: 18px;
}

@media (min-width: 560px) {
    .auth-panel #Input_Username {
        width: 100%;
        margin-inline-end: 0;
    }
}

.auth-panel .field label {
    margin-bottom: 7px;
    color: var(--ds-color-text-soft);
    font-size: var(--ds-font-sm);
    font-weight: 800;
}

.auth-panel input {
    min-height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.038);
}

.auth-panel .password-field-wrap-tight {
    position: relative;
    display: block;
}

.auth-panel .password-field-wrap-tight input {
    width: 100%;
    padding-inline-start: 54px;
}

.auth-panel .password-field-wrap-tight .icon-btn {
    position: absolute;
    inset-inline-start: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.auth-panel .password-field-wrap-tight .icon-btn:hover {
    transform: translateY(-50%);
    background: rgba(78, 205, 196, 0.1);
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--ds-color-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.024);
}

.auth-mode-option {
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--ds-color-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    text-align: center;
}

.auth-mode-option span {
    font-weight: 700;
    font-size: 15px;
}

.auth-mode-option small {
    color: var(--ds-color-text-muted);
    font-size: 12px;
}

.auth-mode-option.active,
.auth-mode-option:hover {
    border-color: rgba(78, 205, 196, 0.38);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.14), rgba(14, 165, 233, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
}

.auth-form-actions .btn {
    min-height: 50px;
    width: 100%;
    justify-content: center;
    border-radius: 14px;
}

.auth-form-actions .btn:not(.primary) {
    background: rgba(255, 255, 255, 0.024);
    color: var(--ds-color-text-muted);
}

.auth-form-actions .btn:not(.primary):hover {
    color: var(--ds-color-text);
}

.auth-form-actions .btn.primary {
    order: -1;
}

.auth-panel .inline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
}

.auth-panel .inline-actions .btn {
    min-height: 50px;
    width: 100%;
    justify-content: center;
}

.auth-panel .inline-actions .btn.primary {
    order: -1;
}

.dialog-shell {
    overflow: hidden;
}

.dialog-head {
    border-bottom: 1px solid var(--ds-color-border);
}

.dialog-foot {
    border-top: 1px solid var(--ds-color-border);
    background: rgba(255, 255, 255, 0.025);
}

.sms-auth-code-row {
    grid-template-columns: minmax(0, 1fr) 86px;
}

.sms-auth-timer {
    border-radius: var(--ds-radius-control);
}

.sms-auth-dialog {
    width: min(500px, calc(100vw - 32px));
}

.sms-auth-dialog::backdrop {
    background: rgba(2, 8, 18, 0.72);
    backdrop-filter: blur(6px);
}

.sms-auth-dialog .dialog-shell {
    border: 1px solid rgba(78, 205, 196, 0.16);
    border-radius: var(--ds-radius-card);
    background: var(--surface-card);
    box-shadow: var(--ds-shadow-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sms-auth-dialog .dialog-head,
.sms-auth-dialog .dialog-body,
.sms-auth-dialog .dialog-foot {
    padding: 0;
    border: 0;
    background: transparent;
}

.sms-auth-dialog .dialog-head {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: start;
    gap: 12px;
}

.sms-auth-dialog .dialog-head > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.sms-auth-mark {
    width: 54px;
    height: 54px;
    border-radius: var(--ds-radius-control);
}

.sms-auth-dialog .dialog-head h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.45;
}

.sms-auth-dialog .dialog-head p {
    margin: 0;
    color: var(--ds-color-text-muted);
    line-height: 1.8;
}

.sms-auth-dialog .dialog-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sms-auth-dialog .field {
    min-width: 0;
}

.sms-auth-dialog .field input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.sms-auth-dialog .field input:focus-visible {
    outline-offset: -2px;
}

.sms-auth-dialog .sms-auth-send-inline {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    align-self: stretch;
    padding-inline: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.sms-auth-dialog .sms-auth-code-row {
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: end;
    direction: ltr;
}

.sms-auth-dialog .sms-auth-code-row .field {
    grid-column: 2;
    direction: rtl;
}

.sms-auth-dialog .sms-auth-code-row .sms-auth-timer {
    grid-column: 1;
    grid-row: 1;
}

.sms-auth-dialog .sms-auth-timer {
    min-height: 46px;
}

.sms-auth-dialog .dialog-foot {
    display: block;
    width: 100%;
}

.sms-auth-dialog .dialog-foot .btn {
    display: flex;
    width: 100% !important;
    inline-size: 100% !important;
    max-width: none;
    min-height: 50px;
}

.settings-filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 460px) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(78, 205, 196, 0.16);
    border-radius: var(--ds-radius-panel);
    background:
        linear-gradient(135deg, rgba(78, 205, 196, 0.08), transparent 44%),
        rgba(255, 255, 255, 0.028);
}

.settings-search-field {
    margin: 0;
}

.settings-search-field > span {
    color: var(--ds-color-text-muted);
    font-size: var(--ds-font-xs);
    font-weight: 700;
}

.settings-search-hidden {
    display: none !important;
}

.settings-console {
    grid-template-columns: minmax(208px, 248px) minmax(0, 1fr);
}

.settings-console-nav {
    border-color: rgba(78, 205, 196, 0.16);
    background:
        linear-gradient(180deg, rgba(17, 31, 52, 0.94), rgba(8, 16, 29, 0.9)),
        var(--ds-color-surface);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.18);
}

.settings-nav-title {
    position: relative;
    min-height: 72px;
    padding: 12px 12px 16px;
    padding-inline-start: 58px;
    border-bottom-color: rgba(78, 205, 196, 0.18);
    justify-content: center;
}

.settings-nav-title::before {
    content: "";
    position: absolute;
    inset-inline-start: 10px;
    top: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(78, 205, 196, 0.28);
    border-radius: var(--ds-radius-control);
    background:
        linear-gradient(currentColor, currentColor) center 10px / 14px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center 17px / 18px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center 24px / 10px 2px no-repeat,
        rgba(78, 205, 196, 0.12);
    color: var(--ds-color-primary);
}

.settings-nav-title strong {
    font-size: 17px;
    letter-spacing: 0;
}

.settings-nav-title span {
    width: fit-content;
    min-height: auto;
    padding: 0;
    color: rgba(148, 163, 184, 0.84);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.settings-nav-list .category-pill {
    min-height: 54px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--ds-radius-control);
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.018);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.settings-nav-list .category-pill .category-pill-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    margin: 0;
    color: var(--ds-color-primary);
    background: rgba(255, 255, 255, 0.055);
}

.settings-nav-list .category-pill strong {
    min-width: 0;
    color: var(--ds-color-text);
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

.settings-nav-list .category-pill span:not(.category-pill-icon) {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.settings-nav-list .category-pill:hover {
    border-color: rgba(78, 205, 196, 0.24);
    background: rgba(78, 205, 196, 0.055);
    transform: translateY(-1px);
}

.settings-nav-list .category-pill.active {
    background:
        linear-gradient(90deg, rgba(78, 205, 196, 0.16), rgba(78, 205, 196, 0.055)),
        rgba(255, 255, 255, 0.02);
    border-color: rgba(78, 205, 196, 0.42);
    box-shadow: inset 3px 0 0 rgba(78, 205, 196, 0.78), 0 10px 24px rgba(78, 205, 196, 0.06);
}

.settings-row-card {
    gap: 12px;
}

.settings-metric-card {
    border-color: rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 42%),
        rgba(12, 22, 40, 0.78);
    transition: border-color 160ms ease, transform 160ms ease;
}

.settings-metric-card:hover {
    border-color: rgba(78, 205, 196, 0.26);
    transform: translateY(-1px);
}

.settings-metric-users::before {
    background: rgba(78, 205, 196, 0.68);
}

.settings-metric-projects::before {
    background: rgba(14, 165, 233, 0.66);
}

.settings-metric-backups::before {
    background: rgba(245, 158, 11, 0.66);
}

.settings-metric-health.ok::before {
    background: rgba(34, 197, 94, 0.64);
}

.settings-metric-health.warning::before {
    background: rgba(245, 158, 11, 0.76);
}

.settings-panel,
.settings-row-card,
.settings-operation-card {
    border-color: rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        rgba(12, 22, 40, 0.72);
}

.settings-panel[open],
.settings-panel-open,
.settings-row-card:hover {
    border-color: rgba(78, 205, 196, 0.22);
}

html.theme-light .settings-console-nav {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 252, 0.94)),
        var(--ds-color-surface);
}

html.theme-light .settings-filter-bar,
html.theme-light .settings-panel,
html.theme-light .settings-row-card,
html.theme-light .settings-operation-card,
html.theme-light .settings-metric-card {
    background:
        linear-gradient(145deg, rgba(14, 165, 233, 0.045), transparent 46%),
        rgba(255, 255, 255, 0.94);
}

html.theme-light .settings-user-details > span,
html.theme-light .settings-user-access {
    background: rgba(15, 23, 42, 0.028);
}

.settings-operation-card {
    padding: 16px;
}

.settings-operation-card h3 {
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ds-color-border);
}

.settings-panel summary::after {
    width: 34px;
    height: 34px;
    border-radius: var(--ds-radius-control);
}

.settings-users-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.settings-user-section-panel {
    position: relative;
    border-color: rgba(78, 205, 196, 0.2);
    background:
        linear-gradient(135deg, rgba(23, 147, 170, 0.1), rgba(255, 255, 255, 0.02) 44%),
        rgba(255, 255, 255, 0.026);
}

.settings-user-section-panel > summary {
    min-height: 58px;
}

.settings-user-section-panel > summary::after {
    display: none;
}

.settings-user-section-panel > summary span {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

.settings-user-section-panel > summary span::before {
    content: "+";
    width: 34px;
    height: 34px;
    border-radius: var(--ds-radius-control);
    border: 1px solid rgba(78, 205, 196, 0.35);
    background: rgba(78, 205, 196, 0.12);
    color: var(--ds-color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    line-height: 1;
    grid-row: span 2;
}

.settings-user-list-panel > summary span::before {
    content: "";
    background:
        linear-gradient(currentColor, currentColor) center 13px / 18px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center 20px / 18px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center 27px / 18px 2px no-repeat,
        rgba(78, 205, 196, 0.12);
}

.settings-user-section-panel > summary strong {
    font-size: 16px;
}

.settings-user-section-panel > summary small {
    max-width: 560px;
}

.settings-users-command .settings-panel-body {
    padding: 16px;
}

.settings-create-user-panel .form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-create-user-panel .field:has(.settings-checkbox-grid),
.settings-create-user-panel .settings-create-admin-confirm {
    grid-column: 1 / -1;
}

.settings-create-user-panel .settings-create-password-field {
    grid-column: span 2;
}

.settings-create-user-panel .settings-create-password-field .password-field-wrap {
    grid-template-columns: minmax(0, 1fr) 42px auto;
}

.mail-password-wrap {
    grid-template-columns: minmax(0, 1fr) 46px;
}

.settings-create-user-panel .settings-create-password-field .password-generate-btn {
    width: auto;
    min-width: 88px;
    max-width: 128px;
    min-height: 38px;
    padding-inline: 12px;
    justify-self: start;
}

.settings-create-user-panel .settings-checkbox-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.project-access-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.project-access-choice {
    min-height: 54px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--ds-radius-card);
    background: rgba(15, 23, 42, 0.34);
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 14px;
    align-items: center;
    padding: 9px 12px;
}

.project-access-choice > strong {
    min-width: 0;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ds-color-text);
    font-size: 13px;
    line-height: 1.6;
}

.project-access-choice .access-level-toggle {
    width: auto;
    min-width: 144px;
    height: 34px;
    gap: 6px;
}

.project-access-choice .access-level-toggle label {
    min-width: 66px;
    min-height: 32px;
    height: 32px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.project-access-choice .access-level-toggle span {
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.theme-light .project-access-choice {
    background: rgba(255, 255, 255, 0.68);
}

.settings-create-user-panel > form > .field:last-of-type {
    max-width: 360px;
}

.settings-create-user-panel > form > .btn {
    width: auto;
    min-width: 116px;
    max-width: 176px;
    min-height: 38px;
    padding-inline: 18px;
    margin-inline-start: auto;
}

.settings-user-list-panel .settings-user-list {
    padding: 12px 16px 16px;
}

.settings-user-list {
    gap: 10px;
}

.settings-user-card {
    padding: 14px;
    gap: 12px;
}

.settings-user-card.is-super-admin {
    border-color: rgba(78, 205, 196, 0.24);
    background:
        linear-gradient(135deg, rgba(78, 205, 196, 0.075), transparent 38%),
        linear-gradient(180deg, rgba(20, 30, 50, 0.8), rgba(11, 20, 35, 0.82));
}

.settings-user-card .settings-row-head {
    align-items: center;
}

.settings-row-head > .settings-user-identity,
.settings-user-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    flex-direction: initial;
}

.settings-user-avatar {
    min-width: 42px;
    width: fit-content;
    height: 42px;
    padding-inline: 10px;
    border-radius: var(--ds-radius-control);
    border: 1px solid rgba(78, 205, 196, 0.24);
    background: rgba(78, 205, 196, 0.1);
    color: var(--ds-color-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    direction: ltr;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
}

.settings-user-card.is-super-admin .settings-user-avatar {
    border-color: rgba(78, 205, 196, 0.34);
    background: rgba(78, 205, 196, 0.12);
}

.settings-user-card.is-super-admin .pill.warn {
    border-color: rgba(78, 205, 196, 0.3);
    background: rgba(78, 205, 196, 0.1);
    color: var(--ds-color-text);
}

.settings-user-name {
    display: block;
    font-size: 17px;
    line-height: 1.4;
}

.settings-user-badges {
    justify-content: flex-start;
    gap: 8px;
}

.settings-user-badges .btn,
.settings-user-card .settings-panel-nested summary {
    min-height: 34px;
    max-width: 156px;
    padding-inline: 11px;
    border-radius: 999px;
    font-size: var(--ds-font-xs);
}

.settings-user-badges .btn {
    flex: 0 0 auto;
}

.settings-user-details {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(130px, 0.8fr) minmax(160px, 0.9fr);
    gap: 8px;
}

.settings-user-details > span,
.settings-user-access {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--ds-radius-control);
    background: rgba(255, 255, 255, 0.024);
    padding: 9px 11px;
}

.settings-user-details small,
.settings-user-access > small {
    display: block;
    margin-bottom: 4px;
    color: var(--ds-color-text-muted);
    font-size: 11px;
    font-weight: 800;
}

.settings-user-details bdi {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ds-color-text);
    font-size: var(--ds-font-sm);
    font-weight: 700;
}

.settings-user-access {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
}

.settings-user-access > small {
    margin: 0;
}

.settings-user-card .chip-row {
    gap: 6px;
    min-width: 0;
}

.settings-user-card .chip-row .pill {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-user-card .settings-panel-nested {
    width: fit-content;
    max-width: 100%;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    align-self: flex-start;
}

.settings-user-card .settings-panel-nested[open] {
    width: 100%;
    margin-top: 4px;
    border: 1px solid var(--ds-color-border-soft);
    border-radius: var(--ds-radius-panel);
    background: rgba(255, 255, 255, 0.022);
    overflow: hidden;
    align-self: stretch;
}

.settings-user-card .settings-panel-nested summary {
    width: fit-content;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid var(--ds-color-border-soft);
    background: rgba(255, 255, 255, 0.04);
}

.settings-user-card .settings-panel-nested[open] summary {
    margin: 8px 8px 0;
    background: rgba(23, 147, 170, 0.14);
}

.settings-user-card .settings-panel-nested summary span {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.settings-user-card .settings-panel-nested summary small {
    display: none;
}

.settings-user-card .settings-operation-grid {
    padding: 0 12px 12px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.settings-user-card .settings-operation-card {
    padding: 12px;
    border-radius: var(--ds-radius-card);
    gap: 10px;
}

.settings-user-card .settings-operation-card h3 {
    font-size: 14px;
    padding-bottom: 4px;
}

.settings-user-card .settings-operation-card .btn {
    width: auto;
    min-width: 92px;
    max-width: 148px;
    min-height: 36px;
    padding-inline: 12px;
    align-self: flex-start;
}

.settings-user-card .settings-operation-card input {
    min-height: 40px;
}

.settings-user-card .settings-operation-card .password-field-wrap {
    grid-template-columns: minmax(0, 1fr) 40px;
}

.settings-user-card .settings-operation-card .password-field-wrap .icon-btn {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
}

.settings-user-card .settings-operation-card .password-field-wrap .password-generate-btn {
    width: auto;
    min-width: 88px;
    max-width: 128px;
    justify-self: start;
}

.super-admin-settings-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-action-grid {
    align-items: start;
    grid-auto-rows: auto;
}

.settings-action-grid > .settings-panel,
.settings-action-grid > .settings-info-panel {
    height: auto;
    min-height: 0;
}

.settings-action-grid > .settings-panel > summary {
    min-height: 56px;
}

.settings-action-grid > .settings-panel:not([open]) {
    width: min(360px, 100%);
    justify-self: start;
}

.settings-action-grid > .settings-panel[open] {
    width: 100%;
    justify-self: stretch;
}

.settings-action-grid > .settings-panel > summary strong {
    font-size: 16px;
}

.settings-console-main > details.settings-panel:not([open]),
.settings-users-command > details.settings-panel:not([open]) {
    width: min(360px, 100%);
    justify-self: start;
}

.settings-console-main > details.settings-panel[open],
.settings-users-command > details.settings-panel[open] {
    width: 100%;
    justify-self: stretch;
}

.settings-create-user-panel[open] > summary span::before {
    content: "-";
}

.settings-console-main > details.settings-panel > summary,
.settings-users-command > details.settings-panel > summary {
    min-height: 56px;
}

.settings-console-main > details.settings-panel > summary strong,
.settings-users-command > details.settings-panel > summary strong {
    font-size: 16px;
}

.settings-info-panel {
    justify-content: center;
}

.settings-panel-open {
    padding-top: 0;
}

.settings-panel-open > .settings-panel-body {
    padding-top: var(--ds-space-4);
}

.settings-panel-body > .section-mini-head {
    margin-bottom: var(--ds-space-4);
}

.settings-panel-body.form {
    gap: var(--ds-space-4);
}

.settings-panel-body .form-grid {
    align-items: start;
}

.settings-panel-body .form-grid > .field,
.settings-panel-body .form-grid > .checkbox-inline {
    min-width: 0;
}

.settings-panel-body .form-grid > .checkbox-inline {
    min-height: var(--ds-control-height);
    align-self: end;
}

.mail-settings-grid {
    align-items: start;
}

.mail-settings-grid .field {
    min-height: 82px;
}

.mail-settings-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ds-space-4);
}

.mail-settings-toggles .checkbox-inline {
    min-height: 54px;
}

.mail-test-panel {
    border: 1px solid rgba(78, 205, 196, 0.18);
    border-radius: var(--ds-radius-panel);
    background: rgba(78, 205, 196, 0.045);
    padding: 14px;
}

.mail-test-panel .section-mini-head {
    min-height: auto;
    margin-bottom: 10px;
}

.mail-test-panel .section-mini-head h3 {
    font-size: var(--ds-font-lg);
}

.mail-test-row {
    display: grid;
    grid-template-columns: minmax(260px, 520px) auto;
    gap: 12px;
    align-items: end;
    justify-content: start;
}

.mail-test-row .field {
    margin: 0;
}

.mail-test-actions {
    display: flex;
    justify-content: flex-end;
    align-items: end;
}

.mail-test-actions .btn {
    min-height: var(--ds-control-height);
    white-space: nowrap;
}

/* Motion polish inspired by the reference videos, tuned to the existing Azaran theme. */
.workspace-nav {
    position: relative;
    isolation: isolate;
    --nav-indicator-top: 0px;
    --nav-indicator-height: 68px;
}

.workspace-nav-indicator {
    position: absolute;
    inset-inline: 0;
    top: var(--nav-indicator-top);
    height: var(--nav-indicator-height);
    border: 1px solid rgba(78, 205, 196, 0.28);
    border-radius: var(--ds-radius-control);
    background:
        radial-gradient(circle at 18% 50%, rgba(78, 205, 196, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(78, 205, 196, 0.12), rgba(14, 165, 233, 0.08));
    box-shadow: inset -3px 0 0 rgba(78, 205, 196, 0.72), 0 14px 34px rgba(14, 165, 233, 0.08);
    opacity: 0;
    transform: scaleX(0.96);
    transition: top 260ms cubic-bezier(.2, .9, .2, 1), height 260ms cubic-bezier(.2, .9, .2, 1), opacity 180ms ease, transform 220ms ease;
    pointer-events: none;
    z-index: 0;
}

.workspace-nav.indicator-ready .workspace-nav-indicator {
    opacity: 1;
    transform: scaleX(1);
}

.workspace-nav-item {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.workspace-nav-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 180ms ease;
    pointer-events: none;
}

.workspace-nav-item::after {
    content: "";
    position: absolute;
    inset-block: 10px;
    inset-inline-start: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--ds-color-primary);
    opacity: 0;
    transform: scaleY(0.3);
    transition: opacity 180ms ease, transform 220ms ease;
}

.workspace-nav-item.active::after,
.workspace-nav-item:focus-visible::after {
    opacity: 0.9;
    transform: scaleY(1);
}

.workspace-nav-item.active {
    background: transparent;
    box-shadow: none;
}

.workspace-nav-item.active::before,
.workspace-nav-item:focus-visible::before {
    opacity: 1;
    animation: nav-sheen 900ms ease;
}

.workspace-nav-item:focus-visible .workspace-nav-icon,
.workspace-nav-item.active .workspace-nav-icon {
    border-color: rgba(78, 205, 196, 0.38);
    background: rgba(78, 205, 196, 0.12);
    box-shadow: 0 10px 26px rgba(78, 205, 196, 0.1);
    transform: translateY(-1px);
}

.workspace-nav-item:hover {
    border-color: rgba(78, 205, 196, 0.16);
    background: rgba(78, 205, 196, 0.035);
}

.workspace-nav-item.active .workspace-nav-icon {
    animation: nav-icon-float 2.4s ease-in-out infinite;
}

.workspace-nav-icon {
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

html.theme-light .workspace-nav-indicator {
    background:
        radial-gradient(circle at 18% 50%, rgba(14, 165, 233, 0.13), transparent 34%),
        linear-gradient(135deg, rgba(78, 205, 196, 0.14), rgba(14, 165, 233, 0.08));
    box-shadow: inset -3px 0 0 rgba(14, 165, 233, 0.62), 0 12px 26px rgba(15, 23, 42, 0.06);
}

.sms-code-field {
    position: relative;
    min-height: 54px;
    cursor: text;
}

.sms-code-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    color: transparent;
    caret-color: transparent;
    z-index: 2;
}

.sms-code-slots {
    min-height: 54px;
    display: grid;
    grid-template-columns: repeat(6, minmax(34px, 1fr));
    gap: 8px;
    direction: ltr;
}

.sms-code-slot {
    position: relative;
    min-width: 0;
    height: 54px;
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-control);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        var(--ds-color-surface-muted);
    color: var(--ds-color-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.sms-code-slot::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    bottom: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--ds-color-primary);
    opacity: 0;
    transform: scaleX(0.3);
    transition: opacity 170ms ease, transform 170ms ease;
}

.sms-code-slot.active,
.sms-code-slot.filled {
    border-color: rgba(78, 205, 196, 0.46);
    background: rgba(78, 205, 196, 0.08);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sms-code-slot.active {
    transform: translateY(-2px);
    animation: sms-slot-breathe 980ms ease-in-out infinite;
}

.sms-code-slot.active::after,
.sms-code-slot.filled::after {
    opacity: 0.95;
    transform: scaleX(1);
}

.sms-code-slot.filled {
    animation: sms-slot-pop 180ms ease;
}

.sms-code-field.is-complete .sms-code-slot {
    border-color: rgba(34, 197, 94, 0.42);
}

.sms-code-field.is-success .sms-code-slot {
    animation: sms-slot-success 460ms ease;
}

.sms-code-field.is-error .sms-code-slot {
    border-color: rgba(239, 68, 68, 0.58);
    background: rgba(239, 68, 68, 0.08);
}

.sms-code-field.is-shaking {
    animation: sms-code-shake 360ms ease;
}

.sms-auth-dialog[open] .dialog-shell {
    animation: sms-dialog-enter 240ms cubic-bezier(.2, .9, .2, 1);
}

.sms-auth-dialog[open] .sms-auth-mark,
.sms-auth-dialog[open] .eyebrow {
    animation: sms-mark-pop 520ms cubic-bezier(.2, .9, .2, 1);
}

.sms-auth-dialog[open] .sms-code-slot {
    animation: sms-slot-enter 360ms cubic-bezier(.2, .9, .2, 1) both;
}

.sms-auth-dialog[open] .sms-code-slot:nth-child(2) {
    animation-delay: 45ms;
}

.sms-auth-dialog[open] .sms-code-slot:nth-child(3) {
    animation-delay: 90ms;
}

.sms-auth-dialog[open] .sms-code-slot:nth-child(4) {
    animation-delay: 135ms;
}

.sms-auth-dialog[open] .sms-code-slot:nth-child(5) {
    animation-delay: 180ms;
}

.sms-auth-dialog[open] .sms-code-slot:nth-child(6) {
    animation-delay: 225ms;
}

.sms-auth-dialog .sms-auth-timer {
    box-shadow: inset 0 0 0 1px rgba(78, 205, 196, 0.08);
}

[data-sms-status].success {
    color: #86efac;
}

@keyframes sms-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes nav-sheen {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes nav-icon-float {
    0%,
    100% {
        transform: translateY(-1px);
        box-shadow: 0 10px 26px rgba(78, 205, 196, 0.1);
    }

    50% {
        transform: translateY(-5px);
        box-shadow: 0 16px 34px rgba(78, 205, 196, 0.18);
    }
}

@keyframes sms-mark-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sms-slot-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.92);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sms-slot-pop {
    50% {
        transform: translateY(-2px) scale(1.04);
    }
}

@keyframes sms-slot-breathe {
    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(78, 205, 196, 0.15), 0 10px 22px rgba(78, 205, 196, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

@keyframes sms-slot-success {
    35% {
        transform: translateY(-2px);
        border-color: rgba(34, 197, 94, 0.68);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.1);
    }
}

@keyframes sms-code-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(7px);
    }

    50% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .workspace-nav-indicator,
    .workspace-nav-item::after,
    .workspace-nav-item::before,
    .workspace-nav-icon,
    .sms-code-slot,
    .sms-code-slot::after {
        transition-duration: 1ms;
    }

    .sms-code-slot.filled,
    .workspace-nav-item.active .workspace-nav-icon,
    .workspace-nav-item.active::before,
    .workspace-nav-item:hover::before,
    .sms-code-slot.active,
    .sms-auth-dialog[open] .sms-auth-mark,
    .sms-auth-dialog[open] .eyebrow,
    .sms-auth-dialog[open] .sms-code-slot,
    .sms-code-field.is-success .sms-code-slot,
    .sms-code-field.is-shaking,
    .sms-auth-dialog[open] .dialog-shell {
        animation: none;
    }
}

@media (max-width: 860px) {
    .auth-mode-switch,
    .settings-filter-bar,
    .settings-action-grid,
    .mail-settings-toggles,
    .mail-test-row {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .auth-form-actions .btn,
    .auth-mode-option,
    .settings-filter-bar .btn {
        width: 100%;
    }

    .btn.sms-auth-send-inline {
        width: 100%;
        min-width: 0;
    }

    .sms-code-slots {
        gap: 6px;
        grid-template-columns: repeat(6, minmax(28px, 1fr));
    }

    .sms-code-slot {
        height: 48px;
        font-size: 19px;
    }

    .mail-test-actions {
        justify-content: stretch;
    }

    .mail-test-actions .btn {
        width: 100%;
    }

    .settings-user-card .settings-row-head {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-user-badges {
        width: 100%;
        justify-content: flex-start;
    }

    .settings-user-badges .btn {
        flex: 0 1 auto;
        width: auto;
        min-width: 120px;
    }

    .settings-user-card .settings-operation-card .btn {
        width: auto;
        min-width: 104px;
    }

    .settings-user-card .settings-operation-card .password-field-wrap .password-generate-btn {
        width: auto;
        min-width: 88px;
        justify-self: start;
    }
}

.nav-toggle-btn {
    display: none;
}

@media (max-width: 1024px) {
    html,
    body {
        overflow-x: hidden;
    }

    .nav-toggle-btn {
        display: inline-flex;
    }
}

.category-pill-icon .app-icon,
.network-host-icon .app-icon {
    width: 18px;
    height: 18px;
}

.category-pill-icon {
    color: var(--ds-color-primary);
}

.btn.danger[data-icon-decorated="true"] {
    gap: 8px;
}

.btn.danger[data-icon-decorated="true"] .app-icon {
    width: 17px;
    height: 17px;
}

.danger-card {
    position: relative;
    border-color: rgba(239, 68, 68, 0.34) !important;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.09), transparent 44%),
        rgba(255, 255, 255, 0.024) !important;
}

.danger-card::before {
    content: "";
    position: absolute;
    inset-block: 12px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.78);
}

.app-dialog .dialog-foot {
    gap: var(--ds-space-3);
}

.asset-dialog .dialog-foot {
    justify-content: space-between;
}

.asset-dialog .dialog-foot > .btn.danger {
    margin-inline-end: auto;
}

.asset-dialog .dialog-foot .inline-actions {
    justify-content: flex-start;
}

.asset-dialog .dialog-body,
.settings-panel-body {
    scrollbar-gutter: stable;
}

.asset-collapsible-section > summary,
.settings-panel > summary {
    cursor: pointer;
}

.asset-documents-section {
    border-color: rgba(78, 205, 196, 0.24);
    background: rgba(78, 205, 196, 0.055);
}

.asset-documents-section > summary {
    align-items: center;
}

.document-upload-panel {
    display: grid;
    grid-template-columns: minmax(250px, 1.15fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 12px;
}

.document-dropzone {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px dashed rgba(78, 205, 196, 0.38);
    border-radius: var(--ds-radius-2);
    background: rgba(2, 6, 23, 0.18);
    cursor: pointer;
}

.document-dropzone strong,
.document-dropzone small {
    display: block;
}

.document-dropzone small {
    margin-top: 3px;
    color: var(--ds-color-muted);
    font-size: 12px;
}

.document-dropzone input {
    grid-column: 1 / -1;
    width: 100%;
}

.document-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.document-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--ds-radius-2);
    background: rgba(12, 22, 40, 0.48);
}

.document-row-pending {
    border-style: dashed;
    border-color: rgba(250, 204, 21, 0.36);
    background: rgba(250, 204, 21, 0.055);
}

.document-row-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.document-row-main strong,
.document-row-main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-row-main small {
    color: var(--ds-color-muted);
    font-size: 12px;
}

.document-row-actions {
    justify-content: flex-start;
}

.document-type-badge {
    min-width: 46px;
    height: 38px;
    padding: 0 8px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    color: #e5f8ff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.82);
}

.document-type-image {
    color: #d7f8f4;
    border-color: rgba(78, 205, 196, 0.34);
    background: rgba(78, 205, 196, 0.14);
}

.document-type-pdf {
    color: #ffe1e1;
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(127, 29, 29, 0.28);
}

.document-type-word {
    color: #dbeafe;
    border-color: rgba(96, 165, 250, 0.38);
    background: rgba(30, 64, 175, 0.24);
}

.document-type-excel {
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.34);
    background: rgba(22, 101, 52, 0.24);
}

.document-type-text {
    color: #fef3c7;
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(146, 64, 14, 0.22);
}

@media (max-width: 860px) {
    .document-upload-panel,
    .document-row {
        grid-template-columns: 1fr;
    }

    .document-row-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
