/* ============================================================
   Profil Aset NTT — Dashboard Admin
   Palet mengikuti style.css (cokelat hangat Profil Aset NTT)
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: #3b2a1a;
  background: #f7f1e7;
}

button, input, select, textarea { font-family: inherit; }

/* ---- Gate Login ---- */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(184, 118, 47, .18), transparent 60%),
    radial-gradient(800px 500px at 90% 110%, rgba(107, 68, 35, .16), transparent 60%),
    #f7f1e7;
}
.login-gate[hidden] { display: none; }

.gate-card {
  width: 100%;
  max-width: 380px;
  background: #fffdf8;
  border: 1px solid rgba(139, 96, 48, .28);
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: 0 24px 60px rgba(90, 60, 25, .22);
  text-align: center;
}

.gate-logo { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; }
.gate-kicker {
  margin: 12px 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #b8762f;
}
.gate-title { margin: 0 0 6px; font-size: 22px; color: #5b3a1e; }
.gate-sub { margin: 0 0 18px; font-size: 12px; line-height: 1.5; color: #8a6539; }

.gate-label {
  display: block;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #6b4423;
  margin: 10px 0 5px;
}
.gate-input {
  width: 100%;
  height: 42px;
  border: 1px solid #ddd2c0;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.gate-input:focus { border-color: #b8762f; box-shadow: 0 0 0 3px rgba(184, 118, 47, .15); }

.gate-error { min-height: 16px; margin: 10px 0 4px; font-size: 12px; color: #c1552d; text-align: left; }

.gate-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #6b4423;
  color: #f7ecd9;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.gate-btn:hover { background: #57361b; transform: translateY(-1px); }
.gate-btn:disabled { opacity: .6; cursor: wait; transform: none; }

.gate-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  color: #8a6539;
  text-decoration: none;
}
.gate-link:hover { color: #6b4423; text-decoration: underline; }

/* ---- Shell ---- */
.admin-app { display: flex; flex-direction: column; min-height: 100vh; }
.admin-app[hidden] { display: none; }

.sidebar-hamburger {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 92;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(108, 68, 35, .35);
  border-radius: 10px;
  background: #fffdf8;
  color: #6b4423;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(90, 60, 25, .25);
}
.sidebar-hamburger:hover { background: #f6ecdd; }

/* ---- Layout: sidebar kiri + konten ---- */
.admin-layout { display: flex; align-items: stretch; flex: 1; min-height: 0; }

.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: #fffdf8;
  border-right: 1px solid rgba(122, 79, 38, .22);
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #efe3d0;
}
.sidebar-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.sidebar-head-text { min-width: 0; }
.sidebar-head-text strong { display: block; font-size: 13.5px; color: #5b3a1e; line-height: 1.2; }
.sidebar-head-text span {
  display: block;
  font-size: 10.5px;
  color: #a1805a;
  margin-top: 1px;
}
.sidebar-close {
  display: none;
  border: 0;
  background: transparent;
  color: #8a6539;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.sidebar-close:hover { background: #f3e7d2; }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #6b4423;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover { background: #f6ecdd; }
.sidebar-link.active {
  background: #6b4423;
  color: #f7ecd9;
}

.sidebar-foot {
  border-top: 1px solid #efe3d0;
  padding: 8px 10px;
}
.sidebar-chip {
  background: #f7f0e3;
  border: 1px solid #eadcbf;
  border-radius: 9px;
  padding: 6px 10px;
  line-height: 1.3;
}
.sidebar-chip b { display: block; font-size: 12px; color: #5b3a1e; }
.sidebar-chip small {
  display: block;
  font-size: 9.5px;
  color: #b8762f;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  margin-top: 1px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 84;
  background: rgba(40, 26, 12, .4);
}
.sidebar-backdrop[hidden] { display: none; }

.sidebar-logout {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #e8c3b5;
  border-radius: 8px;
  background: #fff;
  color: #c1552d;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  text-align: center;
  transition: background .15s ease;
}
.sidebar-logout:hover { background: #fbe4dc; }

/* ---- Konten ---- */
.content {
  flex: 1;
  min-width: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

/* ---- Kartu ringkasan ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.card {
  border: 1px solid rgba(122, 79, 38, .22);
  background: #fffdf8;
  border-radius: 12px;
  padding: 12px 14px 10px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(90, 60, 25, .07);
  transition: transform .2s ease;
}
.card:hover { transform: translateY(-2px); }

.card-num {
  display: block;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.card-label {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a6539;
}

.card-total .card-num { color: #5b3a1e; }
.card-aktif .card-num { color: #b8762f; }
.card-kosong .card-num { color: #8a5a33; }
.card-prioritas .card-num { color: #c1552d; }
.card-prioritas { border-color: rgba(193, 85, 45, .35); }

/* ---- Panel & grafik ---- */
.charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  background: #fffdf8;
  border: 1px solid rgba(122, 79, 38, .2);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(90, 60, 25, .06);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.panel-head h2 { margin: 0; font-size: 13.5px; color: #5b3a1e; }
.panel-note { font-size: 11px; color: #a1805a; }

.bars { display: flex; flex-direction: column; gap: 6px; }

.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.bar-label {
  grid-column: 1 / -1;
  font-size: 11px;
  color: #5b4a37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  height: 10px;
  background: #f1e7d7;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8762f, #6b4423);
  transition: width .6s ease;
}
.bar-fill.green { background: linear-gradient(90deg, #5cb85c, #2f7d32); }
.bar-fill.blue  { background: linear-gradient(90deg, #5aa7ef, #2988e8); }
.bar-fill.orange{ background: linear-gradient(90deg, #ffb257, #e07b1f); }
.bar-fill.red   { background: linear-gradient(90deg, #e07a5f, #c1552d); }
.bar-value { font-size: 11px; font-weight: 800; color: #6b4423; font-variant-numeric: tabular-nums; }

/* ---- Toolbar tabel ---- */
.panel-table { padding-bottom: 8px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tool-input {
  height: 36px;
  border: 1px solid #ddd2c0;
  border-radius: 8px;
  padding: 0 11px;
  font-size: 12.5px;
  background: #fff;
  outline: none;
  min-width: 140px;
}
.tool-input:focus { border-color: #b8762f; box-shadow: 0 0 0 3px rgba(184, 118, 47, .14); }
.tool-input[type="search"] { flex: 1; min-width: 180px; }

.tool-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d8c9b4;
  border-radius: 8px;
  background: #fff;
  color: #6b4423;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.tool-btn:hover { background: #f6ecdd; }
.tool-btn:disabled { opacity: .45; cursor: not-allowed; }

.tool-btn-primary {
  background: #6b4423;
  border-color: #6b4423;
  color: #f7ecd9;
}
.tool-btn-primary:hover { background: #57361b; }

/* ---- Tabel ---- */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8a6539;
  padding: 7px 8px;
  border-bottom: 2px solid #efe3d0;
  white-space: nowrap;
}

.table td {
  padding: 8px 8px;
  border-bottom: 1px solid #f1e8da;
  vertical-align: top;
  color: #453528;
}

.table tbody tr:hover { background: #fbf6ec; }

.th-id { width: 40px; }
.th-aksi { width: 120px; text-align: right; }
.table td.td-aksi { text-align: right; white-space: nowrap; }

.td-nama b { display: block; color: #3b2a1a; }
.td-nama small { display: block; color: #8a6539; font-size: 11px; margin-top: 1px; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  background: #eee;
  color: #555;
  white-space: nowrap;
}
.badge-dimanfaatkan, .badge-kerjasama { background: #e3f0fd; color: #1c6cb8; }
.badge-belum-dimanfaatkan { background: #e5f4e5; color: #2f7d32; }
.badge-sewa { background: #fdeed9; color: #b06a10; }
.badge-prioritas { background: #fbe4dc; color: #c1552d; }
.badge-role-admin { background: #fbe4dc; color: #c1552d; }
.badge-role-operator { background: #e3f0fd; color: #1c6cb8; }
.badge-role-viewer { background: #f0e6d7; color: #6b5a41; }
.badge-on { background: #e5f4e5; color: #2f7d32; }
.badge-off { background: #f4e6e3; color: #a05532; }

/* Galeri, dokumen & riwayat di dialog aset */
.media-section { margin-top: 18px; border-top: 1px dashed #e2d2ba; padding-top: 14px; }
.media-section h3 {
  font-size: 13.5px;
  font-weight: 800;
  color: #6b4423;
  margin: 14px 0 8px;
  letter-spacing: .04em;
}
.media-section h3:first-child { margin-top: 0; }
.media-list { display: grid; gap: 8px; }
.media-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbf7ee;
  border: 1px solid #eadcc6;
  border-radius: 8px;
  padding: 8px;
}
.gallery-list .media-item { flex-wrap: wrap; }
.media-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex: 0 0 auto;
}
.media-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 220px;
}
.media-caption {
  font-size: 12.5px;
  color: #5b3a1e;
  word-break: break-all;
}
.media-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.media-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.media-add .tool-input { flex: 1 1 160px; }
.doc-item { align-items: center; }
.doc-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fdeed9;
  color: #b06a10;
  font-size: 10px;
  font-weight: 800;
  border-radius: 8px;
  letter-spacing: .02em;
}
.history-list { display: grid; gap: 6px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: #fbf7ee;
  border-left: 3px solid #dab77f;
  border-radius: 6px;
  font-size: 12.5px;
}
.history-time { color: #8a7558; font-size: 11.5px; }
.history-note { color: #6b5a41; font-size: 11.5px; }

.row-btn {
  border: 1px solid #d8c9b4;
  border-radius: 6px;
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
}
.row-btn:hover { background: #f6ecdd; }
.row-btn-edit { color: #6b4423; }
.row-btn-hapus { color: #c1552d; border-color: #e8c3b5; }
.row-btn-hapus:hover { background: #fbe4dc; }

.table-empty { text-align: center; color: #8a6539; font-size: 13px; padding: 16px 0 4px; }

.table th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background .15s ease;
}
.table th.sortable:hover { background: #efe4cd; color: #5b3a1e; }
.sort-mark {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  color: #b8762f;
  min-width: 10px;
}

/* ---- Pager ---- */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}
.pager-info { font-size: 12px; color: #8a6539; }
.pager-nav { display: flex; gap: 8px; }

/* ---- Dialog form ---- */
.asset-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #fffdf8;
  color: #3b2a1a;
  box-shadow: 0 24px 70px rgba(45, 30, 12, .4);
  overflow: auto;
}
.asset-dialog::backdrop { background: rgba(40, 26, 12, .45); }

.asset-form { padding: 0 0 12px; }

.asset-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(180deg, #6b4423, #5b3a1e);
  color: #f7ecd9;
}
.asset-dialog-head h2 { margin: 0; font-size: 15px; }
.asset-dialog-close {
  border: 0;
  background: transparent;
  color: #f7ecd9;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
}
.asset-dialog-close:hover { background: rgba(255, 255, 255, .15); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  padding: 14px 20px 4px;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field-wide { grid-column: 1 / -1; }
.field span { font-size: 11px; font-weight: 700; color: #6b4423; }

.field input,
.field select,
.field textarea {
  border: 1px solid #ddd2c0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
  outline: none;
  color: #3b2a1a;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #b8762f;
  box-shadow: 0 0 0 3px rgba(184, 118, 47, .14);
}
.field textarea { resize: vertical; }

/* Gambar aset: unggah + pratinjau */
.image-field { display: flex; gap: 8px; }
.image-field input[type="text"] { flex: 1; min-width: 0; }
.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  margin: 0;
}
.image-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: 10px;
  border: 1px solid #ddd2c0;
  background: #fff;
  padding: 4px;
  object-fit: contain;
}
.field-hint { font-size: 11px; color: #8a7a61; min-height: 14px; }

/* Teks bantuan di dalam .field — jangan ikut gaya label (lihat .field span) */
.field .field-hint {
  font-size: 11px;
  font-weight: 400;
  color: #8a7a61;
}

.field .field-note {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  color: #8a7a61;
}

.field .field-note b { color: #6b4423; }
.field .field-note .note-red { color: #cc0000; }

/* Tanda kecil di samping label field */
.field .field-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f6ecdd;
  color: #a1805a;
  font-size: 10px;
  font-weight: 600;
}

/* Titik warna pada keterangan status kelas */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.status-dot--prioritas { background: #cc0000; }

.form-error { min-height: 18px; margin: 4px 20px 0; font-size: 12.5px; color: #c1552d; }

.asset-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 20px 2px;
}

/* ---- Bidang / polygon dalam form aset ---- */
.polygon-wrap { grid-column: 1 / -1; }

.polygon-map {
  height: 240px;
  border: 1px solid #ddd2c0;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef5;
  z-index: 0;
}

.polygon-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.polygon-info {
  font-size: 12px;
  font-weight: 700;
  color: #6b4423;
  background: #f6ecdd;
  border: 1px solid #e4d5bb;
  padding: 6px 12px;
  border-radius: 999px;
}
.polygon-info.ok { background: #e5f4e5; color: #2f7d32; border-color: #bfe0bf; }

.polygon-wrap textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #ddd2c0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: Menlo, Consolas, monospace;
  background: #fff;
  outline: none;
  resize: vertical;
  color: #3b2a1a;
}
.polygon-wrap textarea:focus { border-color: #b8762f; box-shadow: 0 0 0 3px rgba(184, 118, 47, .14); }

.polygon-marker {
  display: block;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
  background: #e07b1f;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

/* ---- Sidebar Data Master ---- */
.master-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(40, 26, 12, .4);
}
.master-backdrop[hidden] { display: none; }

.master-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 160;
  width: min(360px, 92vw);
  background: #fdfaf3;
  border-left: 1px solid rgba(122, 79, 38, .25);
  box-shadow: -18px 0 50px rgba(45, 30, 12, .3);
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  transform: translateX(102%);
  transition: transform .3s ease;
}
.master-sidebar.open { transform: translateX(0); }

.master-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #efe3d0;
  margin-bottom: 8px;
}
.master-head .about-kicker {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #b8762f;
}
.master-head h2 { margin: 0; font-size: 15px; color: #5b3a1e; }
.master-sub { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: #8a6539; }

.master-close {
  border: 0;
  background: transparent;
  color: #6b4423;
  font-size: 17px;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.master-close:hover { background: #f3e7d2; }

.master-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.master-tab {
  flex: 1;
  border: 1px solid #d8c9b4;
  border-radius: 999px;
  background: #fff;
  color: #6b4423;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.master-tab:hover { background: #f6ecdd; }
.master-tab.active { background: #6b4423; border-color: #6b4423; color: #f7ecd9; }

.master-add {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.master-add .tool-input { flex: 1; min-width: 0; }

.master-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 6px;
}
.master-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #efe3d0;
  border-radius: 8px;
  background: #fff;
  padding: 6px 10px;
  font-size: 12.5px;
  color: #3b2a1a;
}
.master-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.master-item small { color: #a1805a; font-size: 11px; margin-left: 6px; }
.master-del {
  border: 1px solid #e8c3b5;
  border-radius: 6px;
  background: #fff;
  color: #c1552d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 10px;
  flex-shrink: 0;
}
.master-del:hover { background: #fbe4dc; }
.master-del:disabled { opacity: .4; cursor: not-allowed; }

.master-hint {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.4;
  color: #a1805a;
  border-top: 1px dashed #e6d9c2;
  padding-top: 6px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 200;
  background: #3b2a1a;
  color: #f7ecd9;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  animation: toast-in .25s ease;
}
.toast[hidden] { display: none; }
.toast.error { background: #a33f1d; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---- Responsif ---- */
@media (max-width: 1020px) {
  .charts { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }

  .sidebar-hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar-close { display: block; }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 272px;
    min-width: 272px;
    transform: translateX(-105%);
    transition: transform .3s ease;
    box-shadow: 18px 0 50px rgba(45, 30, 12, .3);
  }
  .admin-sidebar.open { transform: translateX(0); }
}

@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .tool-input, .tool-input[type="search"] { min-width: 0; width: 100%; }
  .toolbar .tool-btn { width: 100%; }
}
