
/* MIIGO_ADMIN_R1_2_FULL_ADMIN_SHELL_AND_COMPONENT_SYSTEM_V1 */
:root {
  --admin-yellow: #ffd400;
  --admin-yellow-soft: #fff8d8;
  --admin-black: #111;
  --admin-text: #1b1d20;
  --admin-muted: #6f747b;
  --admin-bg: #f4f5f7;
  --admin-panel: #fff;
  --admin-border: #e3e6ea;
  --admin-danger: #b42318;
  --admin-danger-soft: #fff1f0;
  --admin-success: #16803c;
  --admin-success-soft: #eaf8ef;
  --admin-info: #2457d6;
  --admin-info-soft: #eef3ff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--admin-bg);
}

body {
  margin: 0;
  background: var(--admin-bg);
  color: var(--admin-text);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.admin-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 228px;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #252525;
  padding: 18px 13px;
  background: #111;
  color: #fff;
}

.sidebar-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px 15px;
}

.sidebar-brand > div {
  display: grid;
  gap: 5px;
}

.sidebar-brand strong {
  font-size: 15px;
  line-height: 1.25;
}

.sidebar-brand span {
  color: var(--admin-yellow);
  font-size: 11px;
  font-weight: 800;
}

.sidebar-mobile-close {
  display: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.sidebar-group-label {
  margin: 15px 10px 5px;
  color: #737373;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  padding: 9px 10px;
  color: #d7d7d7;
  text-decoration: none;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.sidebar-nav a:hover {
  background: #222;
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--admin-yellow);
  color: #111;
  font-weight: 900;
}

.sidebar-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 10px;
  font-weight: 900;
}

.sidebar-nav a.active .sidebar-icon {
  background: rgba(17, 17, 17, 0.12);
}

.sidebar-foot {
  display: grid;
  gap: 6px;
  margin: 20px 8px 0;
  border-top: 1px solid #2b2b2b;
  padding-top: 14px;
  color: #858585;
  font-size: 11px;
  line-height: 1.55;
}

.sidebar-foot strong {
  color: #c7c7c7;
}

.sidebar-mobile-open {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.main {
  min-width: 0;
  padding: 22px 24px 44px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.page-header h1 {
  margin: 3px 0 7px;
  font-size: 26px;
  line-height: 1.25;
}

.page-header p {
  margin: 0;
  color: var(--admin-muted);
  line-height: 1.65;
}

.page-eyebrow {
  color: #8a7000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button-primary {
  background: var(--admin-black);
  color: #fff;
}

.button-primary:hover:not(:disabled) {
  background: #2a2a2a;
}

.button-secondary {
  border-color: var(--admin-border);
  background: #fff;
  color: var(--admin-text);
}

.button-secondary:hover:not(:disabled) {
  border-color: #b9bec5;
  background: #fafafa;
}

.button-danger {
  border-color: #d92d20;
  background: #d92d20;
  color: #fff;
}

.button-danger:hover:not(:disabled) {
  background: #b42318;
}

.help-panel {
  overflow: hidden;
  margin-top: 17px;
  border: 1px solid #eed368;
  border-radius: 12px;
  background: var(--admin-yellow-soft);
}

.help-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--admin-text);
  text-align: left;
  cursor: pointer;
}

.help-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

.help-toggle strong {
  font-size: 13px;
}

.help-toggle small {
  color: #766a32;
  font-size: 11px;
}

.help-toggle-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.08);
  font-size: 18px;
  font-weight: 800;
}

.help-content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #eed368;
  background: #fffdf1;
}

.help-content > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border-right: 1px solid #eee2a7;
  padding: 12px 14px;
}

.help-content > div:last-child {
  border-right: 0;
}

.help-content strong {
  font-size: 12px;
}

.help-content span {
  color: #5f6267;
  font-size: 12px;
  line-height: 1.55;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 11px;
  background: #fff;
}

.status-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border-right: 1px solid var(--admin-border);
  padding: 11px 13px;
}

.status-strip > div:last-child {
  border-right: 0;
}

.status-strip span {
  color: var(--admin-muted);
  font-size: 11px;
}

.status-strip strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  margin-top: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  padding: 15px;
  background: var(--admin-panel);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 16px;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.55;
}

.panel-heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-bar {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.5fr)
    minmax(150px, 0.7fr)
    minmax(150px, 0.7fr)
    auto;
  gap: 10px;
  align-items: end;
}

.filter-bar label,
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-bar label > span,
.field > span {
  color: #555b62;
  font-size: 12px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7dbe0;
  border-radius: 9px;
  padding: 9px 11px;
  background: #fff;
  color: var(--admin-text);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #9c8500;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.2);
}

.filter-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.bulk-bar {
  position: sticky;
  top: 10px;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid #d8ba18;
  border-radius: 11px;
  padding: 9px 11px;
  background: #fff8cd;
}

.bulk-bar[hidden] {
  display: none;
}

.bulk-bar-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #eceef1;
  padding: 10px 9px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.data-table th {
  background: #fafafa;
  color: #555b62;
  font-size: 11px;
  font-weight: 900;
}

.data-table tbody tr:hover {
  background: #fcfcfc;
}

.check-column {
  width: 42px;
  text-align: center !important;
}

.actions-column {
  width: 120px;
  text-align: right !important;
}

.table-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-yellow);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #2b5ab6;
  font-weight: 800;
  cursor: pointer;
}

.text-button.danger {
  color: var(--admin-danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.badge-success {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.badge-warning {
  background: #fff4d5;
  color: #875b00;
}

.badge-danger {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  margin-top: 12px;
  color: var(--admin-muted);
  font-size: 12px;
}

.pagination-bar > div {
  display: flex;
  gap: 6px;
}

.page-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
}

.page-button.active {
  border-color: var(--admin-yellow);
  background: var(--admin-yellow);
  font-weight: 900;
}

.feature-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
}

.feature-list > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--admin-border);
}

.feature-list > div:last-child {
  border-bottom: 0;
}

.feature-list span {
  display: grid;
  place-items: center;
  align-self: stretch;
  background: #fafafa;
  color: #8a7600;
  font-size: 11px;
  font-weight: 900;
}

.feature-list strong {
  padding: 11px 13px;
  font-size: 13px;
}

.next-step {
  margin-top: 14px;
  border-left: 4px solid var(--admin-yellow);
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
}

.next-step p {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.6;
}

.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.42);
}

.drawer-backdrop[hidden],
.modal-backdrop[hidden] {
  display: none;
}

.edit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(430px, 100%);
  height: 100vh;
  border-left: 1px solid var(--admin-border);
  background: #fff;
}

.edit-drawer[hidden] {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  border-bottom: 1px solid var(--admin-border);
  padding: 18px;
}

.drawer-header span {
  color: var(--admin-muted);
  font-size: 11px;
}

.drawer-header h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.drawer-close {
  border: 0;
  padding: 0;
  background: transparent;
  color: #555;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.drawer-body {
  display: grid;
  align-content: start;
  gap: 15px;
  overflow-y: auto;
  padding: 18px;
}

.drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--admin-border);
  padding: 14px 18px;
  background: #fafafa;
}

.confirm-modal {
  width: min(430px, calc(100% - 28px));
  margin: 18vh auto 0;
  border-radius: 15px;
  padding: 22px;
  background: #fff;
  text-align: center;
}

.confirm-modal-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
  font-size: 24px;
  font-weight: 900;
}

.confirm-modal h2 {
  margin: 0;
  font-size: 20px;
}

.confirm-modal p {
  margin: 9px 0 0;
  color: var(--admin-muted);
  line-height: 1.65;
}

.confirm-modal-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 36px));
}

.toast-item {
  border-radius: 10px;
  padding: 11px 13px;
  background: #111;
  color: #fff;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .help-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-content > div:nth-child(2) {
    border-right: 0;
  }

  .help-content > div:nth-child(-n + 2) {
    border-bottom: 1px solid #eee2a7;
  }

  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .admin-shell {
    display: block;
  }

  .sidebar-mobile-open {
    position: sticky;
    top: 0;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #252525;
    padding: 11px 14px;
    background: #111;
    color: #fff;
    font-weight: 900;
    text-align: left;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(0, 0, 0, 0.48);
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(300px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-mobile-close {
    display: block;
  }

  .main {
    padding: 16px 13px 34px;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .page-header h1 {
    font-size: 23px;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .help-content,
  .status-strip,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .help-content > div {
    border-right: 0;
    border-bottom: 1px solid #eee2a7;
  }

  .help-content > div:last-child {
    border-bottom: 0;
  }

  .status-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .status-strip > div:last-child {
    border-bottom: 0;
  }

  .filter-actions,
  .panel-heading-actions,
  .page-header-actions {
    width: 100%;
  }

  .filter-actions .button,
  .panel-heading-actions .button,
  .page-header-actions .button {
    flex: 1 1 auto;
  }

  .bulk-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .confirm-modal-actions {
    flex-direction: column-reverse;
  }

  .confirm-modal-actions .button {
    width: 100%;
  }
}
/* END MIIGO_ADMIN_R1_2_FULL_ADMIN_SHELL_AND_COMPONENT_SYSTEM_V1 */
