* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1419;
  color: #e7e9ea;
  min-height: 100vh;
}
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
}
.login-box {
  background: #1e2732;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  border: 1px solid #38444d;
}
.login-box h1 {
  color: #ff6b35;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.5rem;
}
input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #38444d;
  border-radius: 8px;
  font-size: 14px;
  background: #0f1419;
  color: #e7e9ea;
}
button {
  width: 100%;
  padding: 12px;
  background: #ff6b35;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
button:hover {
  background: #e55a2b;
}
.error {
  color: #f4212e;
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
}
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
nav.sidebar {
  background: #1e2732;
  border-right: 1px solid #38444d;
  padding: 1rem;
}
nav.sidebar a {
  display: block;
  color: #8b98a5;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
}
nav.sidebar a:hover,
nav.sidebar a.active {
  background: #263340;
  color: #ff6b35;
}
main {
  padding: 1.5rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card {
  background: #1e2732;
  border: 1px solid #38444d;
  border-radius: 10px;
  padding: 1rem;
}
.card h3 {
  font-size: 0.85rem;
  color: #8b98a5;
  font-weight: 500;
}
.card .val {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #38444d;
}
th {
  color: #8b98a5;
  font-weight: 500;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #263340;
}
.toolbar {
  margin-bottom: 1rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f1419;
  padding-bottom: 8px;
}
.toolbar input,
.toolbar select {
  width: auto;
  margin: 0;
}
header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
header.top h1 {
  font-size: 1.35rem;
}
.order-panels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.orders-list-wrap {
  overflow: auto;
  border: 1px solid #38444d;
  border-radius: 10px;
}
.orders-list {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
.orders-list th,
.orders-list td {
  padding: 10px 10px;
  border-bottom: 1px solid #38444d;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}
.orders-list th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1e2732;
  color: #8b98a5;
  font-weight: 600;
}
.orders-list tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.orders-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.orders-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}
.kpi-card .val {
  font-size: 1.3rem;
}
.orders-quick-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.quick-chip {
  width: auto;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: #1e2732;
  border: 1px solid #38444d;
}
.quick-chip.active {
  background: #ff6b35;
  border-color: #ff6b35;
}
.order-panel {
  background: #1e2732;
  border: 1px solid #38444d;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.order-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #38444d;
}
.order-panel__num {
  font-weight: 700;
  font-size: 1.05rem;
  color: #e7e9ea;
  word-break: break-word;
}
.order-panel__id {
  font-size: 12px;
  color: #8b98a5;
  flex-shrink: 0;
}
.order-panel__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 13px;
}
.order-panel__label {
  color: #8b98a5;
  flex-shrink: 0;
}
.order-panel__value {
  text-align: right;
  word-break: break-word;
}
.order-panel__actions {
  margin-top: 6px;
  border-top: 1px solid #38444d;
  padding-top: 10px;
  display: flex;
  gap: 8px;
}
.mini-btn {
  width: auto;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #263340;
}
.mini-btn:hover {
  background: #354758;
}
.order-empty {
  color: #8b98a5;
  font-size: 14px;
  margin-top: 0.5rem;
}
.admin-request-error {
  color: #f7d4d6;
  background: rgba(244, 33, 46, 0.14);
  border: 1px solid rgba(244, 33, 46, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1rem;
  font-size: 14px;
  line-height: 1.45;
}
.cell-muted {
  color: #8b98a5;
  font-size: 12px;
  margin-right: 4px;
}
.badge--ok {
  background: rgba(33, 186, 69, 0.2);
  color: #8ef6aa;
}
.badge--info {
  background: rgba(0, 136, 255, 0.2);
  color: #9bd0ff;
}
.badge--warn {
  background: rgba(255, 145, 0, 0.2);
  color: #ffd08a;
}

/* Creators table: optional columns + deep metadata */
.creators-table-wrap {
  overflow-x: auto;
}
table.creators-admin {
  min-width: 720px;
}
table.creators-admin th.col-detail,
table.creators-admin td.col-detail {
  display: table-cell;
}
table.creators-admin.creators-compact th.col-detail,
table.creators-admin.creators-compact td.col-detail {
  display: none;
}
.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.toolbar-toggle button {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  background: #263340;
  color: #e7e9ea;
  border: 1px solid #38444d;
}
.toolbar-toggle button:hover {
  background: #38444d;
  color: #ff6b35;
}
.creators-detail-hint {
  font-size: 12px;
  color: #8b98a5;
  margin: 0 0 10px;
}
table.creators-admin td.cell-mono {
  font-size: 12px;
  font-family: ui-monospace, monospace;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.creators-admin td.cell-mono[title] {
  cursor: help;
}

/* Slender creators list (details on separate page) */
table.creators-admin.creators-slender {
  min-width: 640px;
}
.compact-hint {
  margin-top: -4px;
}
a.creator-detail-link {
  display: inline-block;
  padding: 8px 14px;
  background: #ff6b35;
  color: #fff !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
a.creator-detail-link:hover {
  background: #e55a2b;
}

/* Creator detail page */
header.creator-detail-top .creators-back {
  display: inline-block;
  margin-bottom: 8px;
  color: #8b98a5;
  text-decoration: none;
  font-size: 14px;
}
header.creator-detail-top .creators-back:hover {
  color: #ff6b35;
}
.detail-card {
  background: #1e2732;
  border: 1px solid #38444d;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
}
.detail-card h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
  color: #e7e9ea;
}
.detail-note {
  font-size: 12px;
  color: #8b98a5;
  margin: 0 0 12px;
  line-height: 1.45;
}
.detail-dl {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 6px 16px;
  font-size: 14px;
}
.detail-dl dt {
  color: #8b98a5;
  font-weight: 500;
}
.detail-dl dd {
  overflow-wrap: anywhere;
}
.detail-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.detail-link-list li {
  padding: 6px 0;
  border-bottom: 1px solid #2f3d4d;
}
.detail-link-list li:last-child {
  border-bottom: none;
}
.table-scroll {
  overflow-x: auto;
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.detail-table th,
.detail-table td {
  border-bottom: 1px solid #38444d;
  padding: 8px;
  vertical-align: top;
}
.detail-table td.cell-bio-snippet {
  max-width: 220px;
  font-size: 12px;
  color: #c8cdd2;
}
.detail-actions button {
  width: auto;
}
.detail-action-group {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #38444d;
}
.detail-action-label {
  display: block;
  font-size: 12px;
  color: #8b98a5;
  margin-bottom: 6px;
}
.portfolio-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.portfolio-add-row input {
  flex: 1 1 160px;
  width: auto;
  margin-bottom: 0;
}
button.btn-inline {
  width: auto;
  padding: 10px 16px;
  font-size: 14px;
}
button.btn-remove-link {
  width: auto;
  margin-left: 10px;
  padding: 6px 12px;
  font-size: 12px;
  background: #263340;
  color: #f4212e;
  border: 1px solid #38444d;
}
button.btn-remove-link:hover {
  background: #3d1a1a;
  color: #ff6b6b;
}
