﻿.asset-library-form{
  gap: 18px;
}.asset-library-list{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow: auto;
  padding: 2px 6px 6px 2px;
  align-content: start;
}.asset-library-row{
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 188px;
  padding: 12px;
  border: 1px solid rgba(216, 225, 234, 0.96);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 253, 0.96) 100%);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}.asset-library-row:hover{
  border-color: rgba(15, 118, 110, 0.22);
  background: linear-gradient(180deg, rgba(244, 255, 251, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}.asset-library-row.is-selected{
  border-color: rgba(15, 118, 110, 0.46);
  background:
    linear-gradient(180deg, rgba(240, 253, 250, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow:
    0 0 0 2px rgba(15, 118, 110, 0.10),
    0 14px 28px rgba(15, 23, 42, 0.08);
}.asset-library-check{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand);
}.asset-library-thumb{
  width: 100%;
}.asset-library-thumb-media{
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(222, 230, 238, 0.96);
  background: linear-gradient(180deg, rgba(244, 247, 250, 0.98) 0%, rgba(236, 242, 247, 0.98) 100%);
}.asset-library-thumb-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.18s ease;
}.asset-library-row:hover .asset-library-thumb-media img{
  transform: scale(1.03);
}.asset-library-thumb-file{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: var(--weight-heavy);
  letter-spacing: 0.08em;
}.asset-library-row-main{
  min-width: 0;
  display: grid;
  gap: 4px;
}.asset-library-row-main strong{
  color: var(--text-strong);
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1.4;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.8em;
}.asset-library-row-main span{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}.asset-library-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}.asset-library-actions-left,
.asset-library-actions-right{
  display: flex;
  align-items: center;
  gap: 10px;
}.asset-library-actions-right{
  justify-content: flex-end;
}.asset-library-empty .empty{
  min-height: 180px;
}/* Asset library modal: lighter image-manager layout with clearer selection and fixed actions. */
.asset-library-modal{
  padding: 10px;
}.asset-library-modal .modal-panel{
  width: min(920px, calc(100vw - 20px));
  max-height: min(720px, calc(100dvh - 20px));
  border-color: #d8e1ea;
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.22);
}.asset-library-modal .modal-head{
  min-height: 68px;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
}.asset-library-modal .modal-close{
  width: 28px;
  height: 28px;
  color: #64748b;
}.asset-library-modal .modal-body{
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
}.asset-library-modal .asset-library-form{
  width: 100%;
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
}.asset-library-modal .asset-library-list{
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.58) transparent;
}.asset-library-modal .asset-library-list::-webkit-scrollbar{
  width: 8px;
}.asset-library-modal .asset-library-list::-webkit-scrollbar-track{
  background: transparent;
}.asset-library-modal .asset-library-list::-webkit-scrollbar-thumb{
  border: 2px solid #ffffff;
  background: rgba(100, 116, 139, 0.54);
}.asset-library-modal .asset-library-row{
  grid-template-rows: auto auto;
  gap: 8px;
  min-height: 188px;
  height: 188px;
  padding: 10px;
  border-color: #dbe4ee;
  background: #ffffff;
  box-shadow: none;
}.asset-library-modal .asset-library-row:hover{
  border-color: rgba(15, 118, 110, 0.34);
  background: #fbfffd;
  box-shadow: none;
  transform: none;
}.asset-library-modal .asset-library-row.is-selected{
  border-color: rgba(15, 118, 110, 0.74);
  background: #f6fffc;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.16);
}.asset-library-modal .asset-library-check{
  appearance: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  padding: 0 !important;
  border: 1px solid rgba(100, 116, 139, 0.5);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.10);
}.asset-library-modal .asset-library-check:checked{
  border-color: var(--brand);
  background: var(--brand);
}.asset-library-modal .asset-library-check:checked::after{
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}.asset-library-modal .asset-library-thumb-media{
  aspect-ratio: 1 / 1;
  height: auto;
  border: 0;
  background: #f3f6f9;
}.asset-library-modal .asset-library-thumb-media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}.asset-library-modal .asset-library-row-main{
  gap: 2px;
  min-height: 18px;
  align-content: start;
}.asset-library-modal .asset-library-row-main strong{
  min-height: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 760;
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-height: 4.9em;
}.asset-library-modal .asset-library-row-main span{
  display: none;
}.asset-library-modal .asset-library-actions{
  flex: 0 0 auto;
  padding: 18px 20px 20px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}.asset-library-modal .asset-library-actions button{
  min-width: 56px;
  min-height: 40px;
  padding: 0 16px;
}.asset-library-modal .asset-library-actions .danger{
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}.asset-library-modal .asset-library-actions .primary{
  min-width: 58px;
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}.asset-library-modal .asset-library-empty{
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 22px;
}body.is-authenticated{
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.10), transparent 24%),
    radial-gradient(circle at 88% 2%, rgba(56, 189, 248, 0.10), transparent 26%),
    linear-gradient(180deg, #f8fbfa 0%, #f2f6f7 48%, #eef3f4 100%);
}body.is-authenticated .center-pane,
body.is-authenticated .workspace-card,
body.is-authenticated .workspace-head,
body.is-authenticated .center-pane{
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.08);
}body.is-authenticated .center-card,
body.is-authenticated .workspace-head,
body.is-authenticated .workspace-card{
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 30px rgba(11, 59, 53, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}.account-tab-button{
  display: none !important;
}.is-super-admin .account-tab-button{
  display: none !important;
}.account-manager-card{
  padding: 24px;
}.tab-panel[data-tab-panel="accounts"]{
  display: none !important;
}.account-panel{
  min-height: 0;
}.account-layout{
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 18px;
}.account-audit-card{
  grid-column: 1 / -1;
}.account-card{
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
}.account-section-head{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}.account-section-head h3{
  color: var(--text-strong);
  font-size: var(--type-section-title);
  font-weight: var(--weight-heavy);
}.account-section-head p{
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--type-body-sm);
}.account-form,
.account-form-grid{
  display: grid;
  gap: 14px;
}.account-form-grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}.account-form label{
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: var(--type-card-title);
  font-weight: var(--weight-bold);
}.account-permission-box{
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}.account-permission-title{
  color: var(--muted-soft);
  font-size: var(--type-meta);
  font-weight: var(--weight-bold);
}.account-employee-grid{
  max-height: 210px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
}.account-permission-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}.account-actions{
  display: flex;
  justify-content: flex-end;
}.account-actions button,
.account-row-actions button{
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--type-body-sm);
  font-weight: var(--weight-bold);
}.account-actions .primary{
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}.account-list{
  display: grid;
  gap: 10px;
}.account-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}.account-row-main{
  min-width: 0;
  display: grid;
  gap: 3px;
}.account-row-main strong{
  color: var(--text-strong);
  font-size: var(--type-card-title);
}.account-row-main span,
.account-row-main em,
.account-credit-line{
  color: var(--muted);
  font-size: var(--type-meta);
  font-style: normal;
}.account-row-state{
  min-width: 54px;
  padding: 4px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: var(--type-meta);
  font-weight: var(--weight-bold);
}.account-row-state.is-active{
  color: var(--success-ink);
  background: var(--success-soft);
}.account-row-state.is-disabled{
  color: var(--muted);
  background: var(--idle-soft);
}.account-row-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}.account-audit-list{
  display: grid;
  gap: 10px;
}.account-audit-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-raised);
}.account-audit-main{
  min-width: 0;
  display: grid;
  gap: 4px;
}.account-audit-main strong{
  color: var(--text-strong);
  font-size: var(--type-card-title);
  font-weight: var(--weight-bold);
}.account-audit-main span,
.account-audit-main em,
.account-audit-row time{
  color: var(--muted);
  font-size: var(--type-meta);
  font-style: normal;
}.account-audit-row time{
  white-space: nowrap;
}@keyframes modal-fade-in{
  from{opacity:0}
  to{opacity:1}
}@keyframes modal-pop-in{
  from{opacity:0;transform:scale(.94) translateY(8px)}
  to{opacity:1;transform:scale(1) translateY(0)}
}.modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.34);
  backdrop-filter: blur(7px);
  animation: modal-fade-in 0.14s ease;
}.modal-panel{
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-modal, 14px);
  background: #ffffff;
  color: #171717;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
  animation: modal-pop-in 0.16s cubic-bezier(.34,1.2,.64,1);
}.modal-wide .modal-panel{
  width: min(1000px, 100%);
}.modal-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eeeeee;
  background: #ffffff;
}.modal-head h3{
  margin: 0;
  color: #171717;
  font-size: var(--fs-xl, 20px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}.modal-head p{
  margin: 6px 0 0;
  color: #71717a;
  font-size: var(--fs-sm, 13px);
  line-height: 1.5;
}.modal-close{
  width: var(--x-ctrl-md, 32px);
  height: var(--x-ctrl-md, 32px);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: var(--x-r-md, 8px);
  background: transparent;
  color: #a1a1aa;
  font-size: var(--fs-xl, 20px);
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}.modal-close:hover{
  background: #f4f4f5;
  color: #18181b;
}.modal-body{
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 22px;
}.modal-body:has(.subaccount-modal-grid){
  overflow: hidden;
}.image-preview-modal{
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
}.image-preview-panel{
  position: relative;
  display: grid;
  place-items: center;
  width: min(96vw, 1600px);
  height: calc(100vh - 56px);
  min-width: 0;
  min-height: 0;
}.image-preview-modal .image-preview-panel > img{
  display: block;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: 100% !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border: 1px solid rgba(226, 232, 240, 0.32);
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}.image-preview-toolbar{
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}.image-preview-close{
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  cursor: pointer;
  transform: none;
  transition: background 0.1s;
}.image-preview-close:hover{
  background: #f1f5f9;
  transform: none;
}.image-preview-dl-btn{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  cursor: pointer;
  transition: background 0.1s;
}.image-preview-dl-btn:hover{
  background: #f1f5f9;
}.image-preview-title{
  position: fixed;
  left: 28px;
  bottom: 22px;
  max-width: min(72vw, 1280px);
  margin-top: 10px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}.modal-form{
  display: grid;
  gap: 16px;
}.modal-form + .modal-form{
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #eeeeee;
}.modal-form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}.modal-form label{
  display: grid;
  gap: 7px;
  color: #52525b;
  font-size: var(--fs-sm, 13px);
  font-weight: 500;
  line-height: 1.4;
}.modal-form .field-span-2{
  grid-column: 1 / -1;
}.modal-form input:not([type="checkbox"]):not([type="radio"]),
.modal-form select{
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #dddddd;
  border-radius: var(--x-r-md, 8px);
  background: #ffffff;
  color: #171717;
  font-size: var(--fs-sm, 13px);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}.modal-form input:not([type="checkbox"]):not([type="radio"]):focus,
.modal-form select:focus{
  outline: none;
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}.password-form .modal-form-grid{
  grid-template-columns: 1fr;
}.password-form .field-span-2{
  grid-column: auto;
}.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}.modal-actions button{
  min-height: var(--x-ctrl-lg, 38px);
  padding: 0 16px;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-md, 8px);
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}.modal-actions button:hover{
  background: #fafafa;
  border-color: #d4d4d8;
}.modal-actions .primary{
  border-color: #18181b;
  background: #18181b;
  color: #ffffff;
  box-shadow: none;
}.modal-actions .primary:hover{
  border-color: #000000;
  background: #000000;
}.subaccount-modal-grid{
  height: min(600px, calc(100vh - 220px));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 18px;
  align-items: stretch;
}.subaccount-modal-grid > .modal-form{
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}.permission-block{
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md, 8px);
  background: #fafafa;
}.permission-block-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}.permission-block-head strong,
.subaccount-list-head{
  color: #18181b;
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
}.permission-employee-list{
  min-height: 0;
  max-height: none;
  display: grid;
  gap: 6px;
  padding-right: 4px;
  overflow: auto;
}.permission-employee-list::-webkit-scrollbar{
  width: 8px;
}.permission-employee-list::-webkit-scrollbar-track{
  background: transparent;
}.permission-employee-list::-webkit-scrollbar-thumb{
  border: 2px solid #fafafa;
  background: var(--x-ui-scrollbar-thumb, #c7c7cc);
  border-radius: 999px;
}.permission-employee-row{
  min-height: 52px;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 9px 12px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md, 8px);
  background: #ffffff;
  color: #171717 !important;
  font-size: var(--fs-sm, 13px) !important;
  font-weight: 500 !important;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}.permission-employee-row:hover{
  border-color: #dddddd;
  background: #fcfcfc;
}.permission-employee-copy{
  min-width: 0;
  display: grid;
  gap: 2px;
}.permission-employee-copy strong{
  min-width: 0;
  overflow: hidden;
  color: #18181b;
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}.permission-employee-copy em{
  min-width: 0;
  overflow: hidden;
  color: #71717a;
  font-size: var(--fs-xs, 12px);
  font-weight: 400;
  font-style: normal;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}.permission-switches{
  display: grid;
  gap: 12px;
  padding: 4px 2px 0;
}.account-check{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #52525b !important;
  font-size: var(--fs-sm, 13px) !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  cursor: pointer;
}.account-check > span{
  flex: 1 1 auto;
  min-width: 0;
}.modal-panel input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: border-box;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex: 0 0 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #d4d4d8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  transition: border-color 120ms ease, background 120ms ease;
}
.modal-panel input[type="checkbox"]:hover{
  border-color: #a1a1aa;
}
.modal-panel input[type="checkbox"]:checked{
  border-color: #18181b;
  background: #18181b;
}
.modal-panel input[type="checkbox"]:checked::after{
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.modal-panel input[type="checkbox"]:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.18);
}.subaccount-modal-grid .modal-actions{
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 12px;
  background: transparent;
}.subaccount-list{
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md, 8px);
  background: #fafafa;
  overflow: hidden;
}.subaccount-list-head{
  flex: 0 0 auto;
  margin-bottom: 12px;
}.subaccount-list-body{
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}.subaccount-list-body::-webkit-scrollbar{
  width: 8px;
}.subaccount-list-body::-webkit-scrollbar-track{
  background: transparent;
}.subaccount-list-body::-webkit-scrollbar-thumb{
  border: 2px solid #fafafa;
  background: var(--x-ui-scrollbar-thumb, #c7c7cc);
  border-radius: 999px;
}.subaccount-list-body .empty{
  padding: 24px 12px;
  color: #a1a1aa;
  font-size: var(--fs-sm, 13px);
  text-align: center;
}.subaccount-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md, 8px);
  background: #ffffff;
}.subaccount-row div{
  min-width: 0;
  display: grid;
  gap: 3px;
}.subaccount-row strong{
  color: #18181b;
  font-size: var(--fs-sm, 13px);
  font-weight: 600;
}.subaccount-row span{
  min-width: 0;
  overflow: hidden;
  color: #71717a;
  font-size: var(--fs-xs, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}.subaccount-row .account-credit-line{
  color: #52525b;
}.subaccount-row button{
  min-height: var(--x-ctrl-sm, 28px);
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-sm, 6px);
  background: #ffffff;
  color: #52525b;
  font-size: var(--fs-xs, 12px);
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}.subaccount-row button:hover{
  border-color: #d4d4d8;
  background: #fafafa;
  color: #18181b;
}.subaccount-row button[data-account-action="permissions"]{
  border-color: #e5e5e5;
  background: #ffffff;
  color: #52525b;
}.subaccount-row button[data-account-action="permissions"]:hover{
  border-color: #d4d4d8;
  background: #fafafa;
  color: #18181b;
}.subaccount-row button[data-account-action="delete"]{
  border-color: #e5e5e5;
  background: #ffffff;
  color: #b42318;
}.subaccount-row button[data-account-action="delete"]:hover{
  border-color: #fecaca;
  background: #fff5f5;
  color: #b42318;
}.modal-form input:disabled{
  color: #a1a1aa;
  background: #f4f4f5;
  cursor: not-allowed;
}

@media (max-width: 760px) {.account-layout{
    grid-template-columns: 1fr;
  }.account-row,
.account-audit-row{
    grid-template-columns: 1fr;
  }.account-row-actions{
    justify-content: flex-start;
  }.account-audit-row time{
    white-space: normal;
  }.modal-body:has(.subaccount-modal-grid){
    overflow: auto;
  }.subaccount-modal-grid{
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
  }.subaccount-modal-grid > .modal-form{
    display: grid;
    gap: 12px;
  }.permission-block{
    grid-template-rows: auto auto;
    padding: 12px;
  }.permission-block-head{
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }.permission-employee-list{
    max-height: 154px;
  }.permission-switches{
    gap: 6px;
  }.subaccount-modal-grid .modal-actions{
    margin-top: 0;
    padding-top: 4px;
  }.subaccount-list{
    height: auto;
    max-height: 280px;
  }.subaccount-list-body{
    max-height: 220px;
  }.subaccount-row{
    grid-template-columns: minmax(0, 1fr);
  }.subaccount-row button{
    justify-self: stretch;
  }
}body.is-authenticated .app-shell{
  height: 100vh;
}

@media (max-width: 560px) {body.is-authenticated .app-shell{
    height: auto;
  }.modal-backdrop{
    padding: 10px;
  }.modal-panel{
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }.modal-head,
.modal-body{
    padding-left: 16px;
    padding-right: 16px;
  }.modal-form-grid{
    grid-template-columns: 1fr;
  }.modal-form .field-span-2{
    grid-column: auto;
  }
}

/* ─── Custom confirm dialog ─────────────────────────────────────────────── */
.x-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  animation: x-confirm-fade 0.12s ease;
}
@keyframes x-confirm-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.x-confirm-panel {
  width: min(360px, 100%);
  background: var(--panel, #fff);
  border: 1px solid var(--line-soft, #e5e5e7);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.08);
  overflow: hidden;
  animation: x-confirm-pop 0.15s cubic-bezier(.34,1.3,.64,1);
}
@keyframes x-confirm-pop {
  from { transform: scale(.90); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.x-confirm-body {
  padding: 22px 22px 18px;
}
.x-confirm-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong, #18181b);
  margin-bottom: 8px;
  line-height: 1.4;
}
.x-confirm-title-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}
.x-confirm-message {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted, #71717a);
  white-space: pre-line;
  margin: 0;
}
.x-confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line-soft, #e5e5e7);
  background: var(--surface, #fafafa);
}
.x-confirm-cancel-btn {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line-soft, #e5e5e7);
  border-radius: 8px;
  background: #fff;
  color: var(--text-body, #52525b);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s;
}
.x-confirm-cancel-btn:hover { background: var(--surface, #f4f4f5); }
.x-confirm-cancel-btn:focus-visible {
  outline: 2px solid var(--brand, #18181b);
  outline-offset: 2px;
}
.x-confirm-ok-btn {
  height: 34px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #18181b;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s;
}
.x-confirm-ok-btn:hover { background: #000; }
.x-confirm-ok-btn.is-danger {
  background: #e11d48;
  border-color: #e11d48;
}
.x-confirm-ok-btn.is-danger:hover {
  background: #be123c;
  border-color: #be123c;
}
.x-confirm-ok-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.upload-progress-modal {
  position: fixed;
  inset: 0;
  z-index: 215;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.upload-progress-panel {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid var(--line-soft, #e5e7eb);
  border-radius: 14px;
  background: var(--panel, #fff);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.upload-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.upload-progress-copy h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--text-strong, #111827);
}

.upload-progress-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted, #6b7280);
}

.upload-progress-count {
  flex-shrink: 0;
  min-width: 84px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text-body, #374151);
  font-size: 12px;
  text-align: center;
}

.upload-progress-rail {
  position: relative;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
}

.upload-progress-rail span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #111827 0%, #374151 100%);
  transition: width 0.18s ease;
}

.upload-progress-rail span.is-indeterminate {
  width: 40% !important;
  animation: upload-progress-slide 1.2s ease-in-out infinite;
}

@keyframes upload-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

.upload-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted, #6b7280);
}

.upload-progress-meta strong {
  color: var(--text-strong, #111827);
  font-size: 16px;
}
