.ui-card {
  background: rgba(255, 251, 246, .92);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}
.ui-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  background: #fffaf3;
  font-weight: 700;
}
.ui-btn:hover { filter: brightness(.995); }
.ui-btn--primary {
  color: #fffaf1;
  border-color: #0a4d4b;
  background: var(--admin-teal);
}
.ui-btn--gold {
  color: #875217;
  border-color: #d9a661;
  background: #fff9ee;
}
.ui-btn--danger-subtle {
  color: var(--admin-brick);
  border-color: rgba(184,78,69,.42);
  background: #fffaf8;
}
.ui-btn[disabled] { opacity: .48; cursor: not-allowed; }
.ui-icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  background: #fffaf4;
}
.ui-icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.ui-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.ui-badge--success { color: #3c7845; background: #e6f2e2; border: 1px solid #cee3c8; }
.ui-badge--warning { color: #a35c11; background: #fff0dd; border: 1px solid #f0d2a7; }
.ui-badge--danger { color: #a9423a; background: #fbe8e4; border: 1px solid #efc5bf; }
.ui-badge--neutral { color: #6f6960; background: #f1eee9; border: 1px solid #dfd9d0; }
.ui-badge--gold { color: #8b5b1f; background: #fff3de; border: 1px solid #edd1a4; }

.ui-search { position: relative; min-width: 210px; }
.ui-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #758081; }
.ui-input, .ui-select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #decfbd;
  border-radius: 8px;
  outline: none;
  color: var(--admin-text);
  background: rgba(255,251,246,.92);
  font-weight: 600;
}
.ui-input { padding: 8px 12px; }
.ui-search .ui-input { padding-left: 38px; }
.ui-select { padding: 7px 34px 7px 11px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,#677575 50%),linear-gradient(135deg,#677575 50%,transparent 50%); background-position: calc(100% - 15px) 17px,calc(100% - 11px) 17px; background-size:4px 4px,4px 4px; background-repeat:no-repeat; }
.ui-input:focus, .ui-select:focus { border-color: #bd935d; box-shadow: 0 0 0 2px rgba(214,154,66,.12); }

.ui-filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 13px;
}
.ui-filter-field { min-width: 140px; }
.ui-filter-field__label { display:block; margin:0 0 5px; color:#485456; font-size:12px; font-weight:700; }

.ui-table-wrap { overflow-x: auto; }
.ui-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ui-table th {
  height: 38px;
  padding: 7px 12px;
  text-align: left;
  color: #4b5554;
  background: rgba(248,239,228,.72);
  border-bottom: 1px solid var(--admin-border);
  font-size: 13px;
  font-weight: 800;
}
.ui-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #efe4d8;
  color: #253a3b;
  font-size: 14px;
  font-weight: 550;
  vertical-align: middle;
}
.ui-table tr:last-child td { border-bottom: 0; }

.ui-pagination { display:flex; align-items:center; justify-content:center; gap:7px; margin-top:14px; }
.ui-page-btn { min-width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--admin-border); border-radius:7px; background:#fffaf4; color:#334647; font-weight:700; }
.ui-page-btn.is-current { color:#fff9ed; background:var(--admin-teal); border-color:var(--admin-teal); }

.ui-segmented {
  display: inline-flex;
  border: 1px solid #ddc8aa;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,250,244,.94);
}
.ui-segmented button {
  min-width: 86px;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-right: 1px solid #eadcc8;
  color: #334547;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}
.ui-segmented button:last-child { border-right: 0; }
.ui-segmented button.is-active { color:#fffaf2; background:var(--admin-teal); }

.ui-modal-backdrop, .ui-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,33,34,.22);
  z-index: 600;
}
.ui-modal {
  position: fixed;
  left: 50%; top: 50%;
  width: min(480px, calc(100vw - 48px));
  transform: translate(-50%,-50%);
  padding: 22px;
  z-index: 610;
}
.ui-modal__title { margin:0 0 8px; font-size:20px; font-weight:800; color:#0d4142; }
.ui-modal__body { margin:0 0 18px; color:#60635f; line-height:1.7; }
.ui-modal__actions { display:flex; justify-content:flex-end; gap:8px; }

.ui-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(390px, 92vw);
  padding: 22px;
  background: #fffaf4;
  border-left: 1px solid var(--admin-border);
  box-shadow: -14px 0 34px rgba(29,25,21,.1);
  z-index: 610;
  overflow-y: auto;
}
.ui-drawer__header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:18px; }
.ui-drawer__title { margin:0; font-size:21px; color:#0d4142; font-weight:800; }

.ui-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #6b6a65;
}
.ui-state__title { margin:8px 0 3px; color:#274243; font-weight:800; }
.ui-state__text { margin:0; font-size:13px; }
.ui-spinner {
  width: 28px; height: 28px;
  border: 3px solid #eadcc8;
  border-top-color: var(--admin-teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ui-toast {
  position: fixed;
  right: 24px; bottom: 24px;
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid #d7c6ae;
  border-radius: 9px;
  color: #294041;
  background: #fffaf3;
  box-shadow: 0 12px 28px rgba(31,30,24,.12);
  font-size: 13px;
  font-weight: 650;
  z-index: 800;
}
