.two-factor.single {
  grid-template-columns: 1fr;
}

body.authenticated > #login-screen,
body.unauthenticated > #app {
  display: none !important;
}

body.authenticated > #app {
  display: flex !important;
}

body.unauthenticated > #login-screen {
  display: grid !important;
}

.clipboard-helper { position: fixed; top: -1000px; left: -1000px; opacity: 0; pointer-events: none; }

.home-empty {
  min-height: calc(100vh - 104px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 620px));
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
}

.server-status-card {
  width: min(620px, 100%);
  padding: 24px;
  border: 1px solid #dfe6f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 38, 66, .06);
}

@media (max-width: 1180px) {
  .home-empty { grid-template-columns: minmax(0, 620px); }
}

.server-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #edf1f6;
}

.server-status-heading h2 {
  margin: 0 0 5px;
  color: #10213d;
  font-size: 20px;
}

.server-status-heading p,
.server-status-card footer {
  margin: 0;
  color: #7d899c;
  font-size: 13px;
}

.server-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #159a75;
  font-size: 13px;
  white-space: nowrap;
}

.server-health i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #21b889;
  box-shadow: 0 0 0 4px rgba(33, 184, 137, .12);
}

.server-health.error { color: #e5484d; }
.server-health.error i { background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }

.resource-list {
  display: grid;
  gap: 22px;
  padding: 24px 0;
}

.resource-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #34445f;
  font-size: 14px;
}

.resource-label strong {
  color: #12223e;
  font-size: 17px;
}

.resource-track {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #edf1f7;
  appearance: none;
  -webkit-appearance: none;
}

.resource-track::-webkit-progress-bar { border-radius: 99px; background: #edf1f7; }
.resource-track::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #2d78f4, #5a9aff); }
.resource-track::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #2d78f4, #5a9aff); }
.memory-track::-webkit-progress-value { background: linear-gradient(90deg, #16a77c, #45c9a1); }
.memory-track::-moz-progress-bar { background: linear-gradient(90deg, #16a77c, #45c9a1); }
.disk-track::-webkit-progress-value { background: linear-gradient(90deg, #8c62e8, #ad88f4); }
.disk-track::-moz-progress-bar { background: linear-gradient(90deg, #8c62e8, #ad88f4); }

.resource-item small {
  display: block;
  margin-top: 8px;
  color: #8792a5;
  font-size: 12px;
}

.server-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid #e7ecf3;
  border-radius: 10px;
  background: #e7ecf3;
}

.server-details div {
  min-width: 0;
  padding: 14px 16px;
  background: #f8fafc;
}

.server-details dt {
  margin-bottom: 5px;
  color: #8792a5;
  font-size: 12px;
}

.server-details dd {
  overflow: hidden;
  margin: 0;
  color: #263752;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-status-card footer { text-align: right; }

@media (max-width: 640px) {
  .server-status-card { padding: 20px; }
  .server-details { grid-template-columns: 1fr; }
}

.stores-heading { align-items: center; }
.stores-panel { min-height: 150px; }
.empty-cell { padding: 48px 20px !important; text-align: center; color: #8792a5; }
.store-name-cell strong { display: block; color: #1b2940; }
.store-name-cell small { color: #8792a5; }
.mono-cell { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; }
.environment-cell { min-width: 220px; }
.environment-cell strong,
.environment-cell small,
.credential-status-cell small { display: block; }
.environment-cell strong { color: #34445f; font-size: 12px; }
.environment-cell small,
.credential-status-cell small { margin-top: 3px; color: #8792a5; font-size: 11px; }
.store-actions { display: flex; align-items: center; gap: 4px; }
.store-actions button { min-height: 30px; padding: 0 8px; border: 1px solid #d9e2ee; border-radius: 6px; background: #fff; color: #3478f6; font-size: 11px; white-space: nowrap; }
.store-actions button:hover { border-color: #9dbcf1; background: #f5f8ff; }
.store-actions button:disabled { cursor: wait; opacity: .55; }
.store-actions .danger-action { color: #d64248; }
.store-actions .danger-action:hover { border-color: #efb2b5; background: #fff5f5; }

.orders-heading { align-items: center; }
.orders-live { display: inline-flex; align-items: center; gap: 7px; color: #159a75; font-size: 13px; white-space: nowrap; }
.orders-live i { width: 8px; height: 8px; border-radius: 50%; background: #21b889; box-shadow: 0 0 0 4px rgba(33,184,137,.12); }
.orders-toolbar { display: grid; grid-template-columns: minmax(210px,1.25fr) minmax(190px,1fr) 130px 150px 160px 160px auto; gap: 14px; align-items: end; margin-bottom: 16px; padding: 18px; }
.orders-toolbar label { min-width: 0; margin: 0; color: #55647b; font-size: 12px; }
.orders-toolbar input, .orders-toolbar select { width: 100%; min-width: 0; }
.orders-toolbar .button { margin-bottom: 0; white-space: nowrap; }
.orders-panel { min-height: 260px; }
.orders-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid #edf0f5; }
.orders-table-heading > div { display: flex; align-items: baseline; gap: 12px; }
.orders-table-heading strong { font-size: 15px; }
.orders-table-heading span { color: var(--muted); font-size: 12px; }
.order-number-cell { color: #246add; font-weight: 600; }
.merchant-order-shell { overflow-x: auto; background: #f3f5f8; }
.merchant-order-columns,
.merchant-order-summary { display: grid; grid-template-columns: minmax(330px,1.65fr) minmax(220px,1fr) minmax(250px,1.05fr) minmax(210px,.9fr) minmax(190px,.75fr); min-width: 1220px; }
.merchant-order-columns { color: #4d5c73; background: #f4f6f9; font-size: 12px; font-weight: 600; }
.merchant-order-columns span { padding: 11px 14px; border-right: 1px solid #e8ecf2; }
.merchant-order-card { min-width: 1220px; margin: 0 0 8px; background: #fff; border-top: 1px solid #e5e9f0; border-bottom: 1px solid #e1e6ed; }
.merchant-order-card.platform-procurement-order { border-left: 4px solid #7650d8; background: linear-gradient(90deg,#f9f6ff 0,#fff 22%); box-shadow: inset 0 0 0 1px #e7defb; }
.platform-procurement-order .merchant-order-summary { background: linear-gradient(90deg,#f8f4ff 0,#fff 26%); }
.platform-procurement-badge { display: inline-flex; width: fit-content; align-items: center; padding: 3px 8px; margin-bottom: 2px; border-radius: 4px; background: #7046d5; color: #fff !important; box-shadow: 0 2px 6px rgba(112,70,213,.22); font-size: 11px; font-weight: 700; }
.platform-procurement-order .merchant-products-heading { border-left: 3px solid #8c68df; background: #f4efff; }
.merchant-order-summary > section { min-width: 0; min-height: 116px; padding: 13px 14px; border-right: 1px solid #edf0f4; color: #526077; font-size: 12px; }
.merchant-order-summary > section:last-child { border-right: 0; }
.merchant-order-summary section p { margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-order-main { display: grid; grid-template-columns: 18px 64px minmax(0,1fr); gap: 10px; align-items: start; }
.merchant-order-main input { width: 14px; min-height: 14px; height: 14px; margin: 3px 0 0; }
.merchant-order-main > div { display: grid; gap: 3px; min-width: 0; }
.merchant-order-main strong { overflow: hidden; color: #20304b; text-overflow: ellipsis; white-space: nowrap; }
.merchant-order-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-order-main em { width: fit-content; padding: 1px 5px; border-radius: 3px; background: #fff2e8; color: #e06b21; font-size: 10px; font-style: normal; }
.order-product-image { width: 58px; height: 58px; flex: none; object-fit: cover; border: 1px solid #e5e9ef; border-radius: 4px; background: #f5f7fa; }
.order-product-image.compact { width: 64px; height: 76px; }
.order-product-image.placeholder { display: grid; place-items: center; padding: 4px; color: #9aa4b3; font-size: 10px; text-align: center; }
.order-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.order-labels span { padding: 2px 5px; border-radius: 3px; background: #fff2e8; color: #dc651d; font-size: 10px; }
.merchant-products-heading,
.merchant-product-row { display: grid; grid-template-columns: minmax(460px,2fr) minmax(170px,.7fr) minmax(260px,1fr) minmax(140px,.55fr); min-width: 1190px; gap: 14px; }
.merchant-products-heading { margin: 0 10px; padding: 9px 14px; background: #f7f8fa; color: #4c5b72; font-size: 11px; }
.merchant-products-heading span { text-align: left; }
.merchant-products-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.merchant-products-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: transparent; color: #2873dd; font: inherit; cursor: pointer; }
.merchant-products-toggle:hover { color: #155fc4; }
.merchant-products-toggle span { display: inline-block; color: inherit; transition: transform .16s ease; }
.merchant-products-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.merchant-product-row { align-items: center; margin: 0 10px; padding: 12px 14px; border-bottom: 1px solid #eef1f5; color: #526077; font-size: 12px; }
.merchant-product-row:last-child { border-bottom: 0; }
.merchant-product-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.merchant-product-info > div { display: grid; gap: 2px; min-width: 0; }
.merchant-product-info strong { overflow: hidden; color: #293950; text-overflow: ellipsis; white-space: nowrap; }
.merchant-product-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant-quantity, .merchant-progress, .merchant-amount { display: grid; gap: 4px; }
.merchant-quantity strong, .merchant-progress strong, .merchant-amount strong { color: #293950; font-weight: 600; }
.merchant-quantity span, .merchant-progress span, .merchant-amount span { color: #8a95a6; font-size: 10px; }
.merchant-no-products { padding: 28px; color: #8994a6; text-align: center; }
.merchant-order-card > footer { display: flex; justify-content: space-between; gap: 16px; padding: 9px 24px; border-top: 1px solid #edf0f4; background: #fbfcfd; color: #6f7c90; font-size: 11px; }
.merchant-order-card > footer strong { color: #263650; font-size: 13px; }
.merchant-order-card.products-collapsed .merchant-product-row { min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
.merchant-order-card.products-collapsed .merchant-product-info .order-product-image,
.merchant-order-card.products-collapsed .merchant-product-info span,
.merchant-order-card.products-collapsed .merchant-quantity span,
.merchant-order-card.products-collapsed .merchant-progress span,
.merchant-order-card.products-collapsed .merchant-amount span { display: none; }
.merchant-order-card.products-collapsed > footer { display: none; }
.orders-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid #edf0f5; color: var(--muted); font-size: 12px; }
.orders-pagination > div { display: flex; gap: 8px; }
.orders-pagination .button { min-height: 34px; padding: 0 13px; font-size: 12px; }
.orders-pagination button:disabled { cursor: not-allowed; opacity: .48; }
.orders-page-size { display: flex; align-items: center; gap: 7px; color: #6f7c90; white-space: nowrap; }
.orders-page-size select { width: auto; min-width: 82px; min-height: 34px; padding: 0 28px 0 10px; font-size: 12px; }

.template-heading { align-items: center; }
.template-category-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.template-category-tabs button { min-height: 38px; padding: 0 16px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; color: #59677d; font-weight: 600; }
.template-category-tabs button:hover { border-color: #afc7ed; color: #286bd5; }
.template-category-tabs button.active { border-color: #a9c7f8; background: #edf4ff; color: #246add; }
.template-category-tabs span { display: inline-grid; min-width: 20px; height: 20px; margin-left: 6px; place-items: center; border-radius: 10px; background: #edf0f5; color: #6f7c90; font-size: 11px; }
.template-category-tabs button.active span { background: #d7e6ff; color: #246add; }
.template-panel { min-height: 320px; padding: 18px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(270px,1fr)); gap: 16px; }
.template-grid > .empty-cell { grid-column: 1 / -1; }
.template-card { overflow: hidden; border: 1px solid #e0e6ef; border-radius: 11px; background: #fff; box-shadow: 0 4px 14px rgba(31,50,82,.05); }
.template-preview-button { display: grid; width: 100%; height: 220px; padding: 12px; place-items: center; border: 0; border-bottom: 1px solid #edf0f5; background: #f6f8fb; cursor: zoom-in; }
.template-preview-button img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.template-card-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; }
.template-card-body > div { display: grid; gap: 3px; min-width: 0; }
.template-card-body strong { overflow: hidden; color: #1c2c46; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.template-card-body span,.template-card-body small { color: #7c889a; font-size: 11px; }
.template-card-body .danger-action { min-height: 30px; padding: 0 10px; border: 1px solid #efc5c7; border-radius: 6px; background: #fff; color: #d64248; }
.template-dialog { width: min(820px,calc(100% - 32px)); }
.template-dialog-body { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(300px,1.2fr); gap: 20px; padding: 22px 24px; }
.template-form-fields { display: grid; align-content: start; gap: 16px; }
.template-form-fields label { margin: 0; }
.template-file-field small { display: block; margin-top: 6px; color: #8490a2; font-size: 11px; }
.template-upload-preview { min-height: 280px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cad5e3; border-radius: 10px; background: #f7f9fc; color: #8995a7; font-size: 12px; }
.template-upload-preview img { display: block; max-width: 100%; max-height: 360px; object-fit: contain; }
.template-dialog-body .form-error { grid-column: 1 / -1; margin: 0; }
.template-image-dialog { width: min(980px,calc(100% - 32px)); }
.template-image-dialog > div > header { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #e8edf4; }
.template-image-dialog h2 { margin: 0; font-size: 19px; }
.template-image-dialog header p { margin: 4px 0 0; color: #758197; font-size: 12px; }
.template-image-dialog-body { display: grid; min-height: 360px; max-height: calc(100vh - 220px); padding: 18px; place-items: center; overflow: auto; background: #f2f4f7; }
.template-image-dialog-body img { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 4px 18px rgba(24,42,72,.12); }
.template-image-dialog footer { display: flex; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid #e8edf4; }

@media (max-width: 720px) {
  .template-heading { align-items: flex-start; }
  .template-dialog-body { grid-template-columns: 1fr; }
  .template-upload-preview { min-height: 220px; }
}

@media (max-width: 1250px) {
  .orders-toolbar { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .orders-heading { align-items: flex-start; }
  .orders-toolbar { grid-template-columns: 1fr; }
  .orders-table-heading > div { display: grid; gap: 2px; }
  .orders-pagination { align-items: flex-start; flex-direction: column; }
}

.store-dialog {
  width: min(680px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #18243a;
  box-shadow: 0 28px 80px rgba(10, 25, 50, .28);
}

.store-dialog::backdrop { background: rgba(17, 29, 50, .55); backdrop-filter: blur(2px); }
.store-dialog form > header { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid #e8edf4; }
.store-dialog h2 { margin: 0; font-size: 20px; }
.store-dialog header p { margin: 4px 0 0; color: #758197; font-size: 13px; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: #758197; font-size: 24px; line-height: 1; }
.dialog-close:hover { background: #f0f3f7; }
.store-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; padding: 22px 24px 4px; }
.store-form-grid label { margin-bottom: 17px; }
.store-form-grid .wide-field { grid-column: 1 / -1; }
.credential-note { display: flex; gap: 10px; margin: 0 24px 20px; padding: 11px 13px; border-radius: 8px; background: #f2f7ff; color: #5d6c82; font-size: 12px; }
.credential-note strong { color: #2c68cc; white-space: nowrap; }
.store-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #e8edf4; background: #fafbfd; }
.authorization-body { padding: 22px 24px; }
.authorization-body > label { margin: 22px 0 4px; }
.authorization-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.authorization-flow li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #e2e8f1; border-radius: 9px; background: #fafbfd; }
.authorization-flow li b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e9eef5; color: #738097; font-size: 12px; }
.authorization-flow li.active { border-color: #b9d0f4; background: #f4f8ff; }
.authorization-flow li.active b { background: var(--blue); color: #fff; }
.authorization-flow li span { display: grid; min-width: 0; }
.authorization-flow li strong { color: #263752; font-size: 13px; }
.authorization-flow li small { overflow: hidden; color: #8792a5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-create-link { margin: 5px 0 0; padding: 4px 0; }
.authorization-body .credential-note { margin: 16px 0 0; }
.project-dialog { width: min(700px,calc(100% - 32px)); }

@media (max-width: 640px) {
  .stores-heading { align-items: flex-start; }
  .store-form-grid { grid-template-columns: 1fr; }
  .store-form-grid .wide-field { grid-column: auto; }
  .credential-note { align-items: flex-start; }
  .authorization-flow { grid-template-columns: 1fr; }
}

.settings-page-heading { margin-bottom: 18px; }
.settings-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 14px rgba(35,50,78,.045); }
.settings-nav button { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; width: 100%; padding: 13px 12px; border: 0; border-radius: 8px; background: transparent; color: #263752; text-align: left; }
.settings-nav button > span { grid-row: 1 / 3; align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #f1f4f8; color: #6d7b91; font-weight: 700; }
.settings-nav button b { font-size: 14px; }
.settings-nav button small { margin-top: 2px; color: #8792a5; font-size: 12px; }
.settings-nav button:hover { background: #f7f9fc; }
.settings-nav button.active { background: var(--blue-soft); color: #246add; }
.settings-nav button.active > span { background: #dfeaff; color: #246add; }
.settings-content { min-width: 0; }
.settings-pane { display: none; min-height: 510px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 14px rgba(35,50,78,.045); }
.settings-pane.active { display: block; }
.settings-pane-heading { padding: 22px 26px; border-bottom: 1px solid #edf0f5; }
.settings-pane-heading h3 { margin: 0 0 5px; font-size: 18px; }
.settings-pane-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-pane-heading-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.shein-app-settings { padding: 24px 26px 28px; }
.authorization-project-picker { margin-top: 24px; }
.authorization-project-picker label { margin: 0; }
.authorization-project-help { margin: 8px 0 20px; color: var(--muted); font-size: 12px; }
.shein-app-settings > .credential-note { margin: 0 0 20px; }
.project-list-shell { overflow: auto; border: 1px solid #e2e8f1; border-radius: 10px; }
.project-list-shell th { background: #f8fafc; }
.authorization-confirm-dialog { width: min(560px,calc(100% - 32px)); }
.authorization-confirm-body { display: flex; gap: 16px; padding: 26px 24px; }
.authorization-confirm-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.authorization-confirm-body strong { color: #263752; font-size: 15px; }
.authorization-confirm-body p { margin: 7px 0 13px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.authorization-confirm-body small { display: block; padding: 9px 11px; border-radius: 7px; background: #f5f7fa; color: #536177; font-size: 12px; }
.confirm-dialog { width: min(520px,calc(100% - 32px)); }
.confirm-dialog-body { display: flex; align-items: flex-start; gap: 16px; min-height: 130px; padding: 28px 24px; }
.confirm-dialog-body p { margin: 2px 0 0; color: #3d4b61; font-size: 14px; line-height: 1.75; white-space: pre-line; }
.confirm-dialog-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 18px; font-weight: 700; }
.confirm-dialog-icon.danger { background: var(--red-soft); color: var(--red); }
.danger-button { color: #fff; background: var(--red); border-color: var(--red); }
.danger-button:hover { background: #ca363b; }
.store-name-dialog { width: min(560px,calc(100% - 32px)); }
.store-name-dialog-body { padding: 24px; }
.store-name-dialog-body label { margin: 0; }
.store-name-dialog-body input { width: 100%; }
.store-name-dialog-body > p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.store-name-dialog-body .form-error { color: var(--red); }
.settings-form { padding: 6px 26px 24px; }
.setting-field { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px); gap: 4px 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid #edf0f5; }
.setting-field label { margin: 0; color: #263752; font-size: 14px; }
.setting-field p { grid-column: 1; margin: 0; color: var(--muted); font-size: 12px; }
.number-input { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: stretch; }
.number-input input { width: 100%; border-radius: 7px 0 0 7px; }
.number-input i { min-width: 58px; display: grid; place-items: center; border: 1px solid #d8e0eb; border-left: 0; border-radius: 0 7px 7px 0; background: #f5f7fa; color: var(--muted); font-size: 13px; font-style: normal; }
.settings-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; }
.settings-form > footer span { color: var(--muted); font-size: 12px; }
.credential-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 26px; padding: 20px; border: 1px solid #e2e8f1; border-radius: 10px; background: #f8fafc; }
.credential-summary > div { min-width: 0; display: grid; gap: 7px; }
.credential-summary span, .credential-summary small { color: var(--muted); font-size: 12px; }
.credential-summary code, .one-time-secret code, .secret-line code { overflow-wrap: anywhere; color: #21304a; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.sensitive-action { margin: 0 26px 24px; padding: 20px; border: 1px solid #f0c8ca; border-radius: 10px; background: #fffafb; }
.sensitive-action > div > strong, .one-time-secret strong { font-size: 14px; }
.sensitive-action > div > p, .one-time-secret p { margin: 4px 0 16px; color: var(--muted); font-size: 12px; }
.sensitive-action > label { max-width: 420px; margin-bottom: 16px; }
.sensitive-action footer { display: flex; justify-content: flex-end; gap: 8px; }
.one-time-secret { display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; align-items: center; margin: 0 26px 24px; padding: 20px; border: 1px solid #b9dfd2; border-radius: 10px; background: #f4fbf8; }
.one-time-secret > div, .one-time-secret code { grid-column: 1; }
.one-time-secret .button { grid-column: 2; grid-row: 1 / 3; }
.security-block { margin: 24px 26px; overflow: hidden; border: 1px solid #e2e8f1; border-radius: 10px; }
.security-block-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; background: #f8fafc; border-bottom: 1px solid #e8edf4; }
.security-block-heading h4 { margin: 0 0 4px; font-size: 15px; }
.security-block-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.security-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.security-form label { margin: 0; }
.security-form-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.security-form-footer span { color: var(--muted); font-size: 12px; }
.totp-status { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 5px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: 12px; }
.totp-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.totp-status b { font-weight: 600; }
.totp-status.off { background: #eef1f6; color: #7c8899; }
.totp-actions { display: flex; gap: 8px; padding: 18px 20px; }
.security-block .sensitive-action { margin: 0 20px 20px; }
.sensitive-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sensitive-fields label { margin-bottom: 16px; }
.totp-enrollment { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; margin: 0 20px 20px; padding: 20px; border: 1px solid #b9d0f4; border-radius: 10px; background: #f8fbff; }
.totp-qr-box { display: grid; justify-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.totp-qr-box img { width: 158px; height: 158px; display: block; }
.totp-qr-box span { color: var(--muted); font-size: 12px; }
.totp-enroll-details > strong { font-size: 15px; }
.totp-enroll-details > p { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }
.secret-line { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 10px; border: 1px solid #dce5f2; border-radius: 7px; background: #fff; }
.secret-line code { flex: 1; }
.totp-enroll-details label { margin-bottom: 12px; }

.accounts-panel table { min-width: 980px; }
.account-name-cell strong { display: flex; align-items: center; gap: 8px; color: var(--text); }
.account-name-cell small, .account-last-login small { display: block; margin-top: 4px; color: var(--muted); }
.account-current-badge { display: inline-flex; padding: 2px 7px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 600; }
.account-role-badge { display: inline-flex; padding: 4px 9px; border-radius: 12px; background: #f0f3f8; color: #53627a; font-size: 11px; font-weight: 600; }
.account-role-badge.super { background: #fff2d9; color: #986000; }
.account-actions { display: flex; gap: 7px; }
.account-actions button { min-height: 30px; padding: 0 10px; border: 1px solid #d5dfed; border-radius: 6px; background: #fff; color: var(--blue); white-space: nowrap; }
.account-actions .danger-action { border-color: #f1b9bc; color: var(--red); }
.account-actions .muted-action { color: var(--muted); cursor: default; }
.account-dialog { width: min(560px, calc(100vw - 32px)); }
.account-dialog-body { padding: 22px 24px 8px; }
.account-dialog-body label { margin-bottom: 16px; }
.account-dialog-body > small { display: block; margin: -4px 0 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 960px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { grid-template-columns: repeat(3, 1fr); }
  .settings-nav button { grid-template-columns: 1fr; grid-template-rows: auto; text-align: center; }
  .settings-nav button > span { display: none; }
  .settings-nav button small { display: none; }
  .security-form { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .settings-nav { grid-template-columns: repeat(2, 1fr); }
  .settings-pane-heading-actions { align-items: flex-start; flex-direction: column; }
  .setting-field { grid-template-columns: 1fr; }
  .number-input { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .credential-summary { align-items: flex-start; flex-direction: column; }
  .one-time-secret { grid-template-columns: 1fr; }
  .one-time-secret > div, .one-time-secret code, .one-time-secret .button { grid-column: 1; grid-row: auto; }
  .security-block-heading { align-items: flex-start; }
  .sensitive-fields, .totp-enrollment { grid-template-columns: 1fr; }
  .security-form-footer { align-items: flex-start; flex-direction: column; }
}
