/* Administration window (admin.js) */
.modal.admin-modal {
  width: min(640px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 48px));
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
}
.adm { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.adm-head { display: flex; align-items: center; gap: 10px; padding: 20px 18px 8px 22px; }
.adm-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.adm-head h3 svg.i { width: 18px; height: 18px; }
.adm-sub { flex: 1; min-width: 0; color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tabs { display: flex; gap: 4px; padding: 4px 18px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.adm-tab {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px 10px; border-radius: 9px 9px 0 0;
  color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent; transition: color .15s, box-shadow .15s, background-color .15s;
}
.adm-tab svg.i { width: 15px; height: 15px; }
.adm-tab:hover { color: var(--text); background: var(--hover); }
.adm-tab.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.adm-body { flex: 1; overflow: auto; padding: 16px 22px 22px; }
.adm-body .sh-sec:first-child { margin-top: 0; }
.adm-note { margin: 0 0 14px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.adm-empty { padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); font-size: 13px; text-align: center; }
.adm-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.adm-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--surface-2); }
.adm-ic { display: grid; place-items: center; color: var(--text-3); }
.adm-ic svg.i { width: 16px; height: 16px; }
.adm-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.adm-name { flex: 1; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; }
.adm-name:hover { border-color: var(--border); }
.adm-name:focus { outline: none; border-color: var(--text); background: var(--surface); }
.adm-kind, .adm-use { color: var(--text-3); font-size: 12px; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.adm-add { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-add input, .adm-add select, .adm-ask input {
  height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px;
}
.adm-add input { flex: 1; min-width: 180px; }
.adm-add input:focus, .adm-add select:focus, .adm-ask input:focus { outline: 2px solid var(--text); outline-offset: 1px; }
.adm-ask { display: grid; gap: 14px; margin-top: 14px; }
.adm-ask input { width: 100%; }
.adm-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-bottom: 14px; }
.adm-icon { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 8px 10px; border-radius: 12px; background: var(--surface-2); font-size: 11.5px; color: var(--text-3); text-align: center; }
.adm-icon img { width: 44px; height: 44px; object-fit: contain; }
.adm-icon .adm-del { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity .15s; }
.adm-icon:hover .adm-del, .adm-icon .adm-del:focus-visible { opacity: 1; }

/* own fields in the note card (renderCustomField in app.js) */
.custom-field .cf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: text; }
.custom-field.is-check .cf-main { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; cursor: pointer; }
.cf-input { width: 100%; min-width: 0; height: 26px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; }
.cf-input:focus { outline: none; }
.cf-input::placeholder { color: var(--text-3); }
.cf-input.invalid { color: var(--danger, #e45565); }
.cf-check { width: 18px; height: 18px; accent-color: var(--text); }
.custom-field .f-label { font-size: 11px; color: var(--text-3); line-height: 1.2; }
