[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

.admin-page {
  min-height: 100vh;
  background: #f1f5f9;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-shell {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 24px 0;
}

h1,
h2,
h3,
p,
td,
th {
  overflow-wrap: anywhere;
}

.ui-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-card {
  width: min(100%, 448px);
  margin: 96px auto 0;
}

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

.admin-actions {
  display: flex;
  gap: 12px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 20px;
  margin-top: 20px;
}

.ui-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ui-form {
  display: grid;
  gap: 20px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.ui-field {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

.ui-input,
.ui-select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

.ui-input:focus,
.ui-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.ui-file {
  display: block;
  width: 100%;
  color: #475569;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.ui-file::file-selector-button {
  min-height: 44px;
  margin-right: 14px;
  padding: 0 16px;
  color: #334155;
  font-weight: 700;
  background: #f1f5f9;
  border: 0;
  border-right: 1px solid #cbd5e1;
}

.ui-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ui-btn-nowrap {
  width: max-content;
  white-space: nowrap;
}

.ui-btn-sm {
  min-height: 40px;
  padding: 0 14px;
}

.ui-btn-primary {
  color: #ffffff;
  background: #0f766e;
}

.ui-btn-primary:hover {
  background: #115e59;
}

.ui-btn-secondary {
  color: #ffffff;
  background: #334155;
}

.ui-btn-secondary:hover {
  background: #1e293b;
}

.ui-btn-danger {
  color: #ffffff;
  background: #dc2626;
}

.ui-btn-danger:hover {
  background: #b91c1c;
}

.ui-alert {
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.ui-alert-danger {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.ui-eyebrow {
  margin: 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ui-title {
  margin: 8px 0 0;
  color: #020617;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.ui-page-title {
  margin: 8px 0 0;
  color: #020617;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.ui-section-title {
  margin: 0;
  color: #020617;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.ui-subtitle {
  margin: 0;
  color: #020617;
  font-size: 18px;
  font-weight: 800;
}

.ui-muted,
.ui-help {
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.ui-error {
  min-height: 20px;
  margin: 0;
  color: #dc2626;
  font-size: 14px;
  font-weight: 600;
}

.manual-hot-video-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.manual-hot-video-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.manual-hot-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.manual-hot-video-list {
  display: grid;
  gap: 12px;
}

.manual-hot-video-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.manual-hot-video-order {
  display: grid;
  gap: 6px;
}

.manual-hot-video-fields {
  display: grid;
  gap: 10px;
}

.manual-hot-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
}

.manual-hot-video-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.manual-hot-video-empty {
  padding: 12px;
  color: #64748b;
  font-size: 14px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}

.process-list {
  display: grid;
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  color: #475569;
  font-size: 14px;
  list-style: none;
}

.process-item {
  display: flex;
  gap: 12px;
}

.process-index {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #0f766e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.report-list {
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: 640px;
  margin-top: 16px;
  overflow-y: auto;
  padding-right: 4px;
}

.report-card {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.report-card-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.report-card-main {
  min-width: 0;
}

.report-card-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #020617;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-card-meta {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.report-card-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.section {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.section h2 {
  margin: 0 0 14px;
  color: #020617;
  font-size: 20px;
  font-weight: 700;
}

.meta {
  margin: 10px 0 0;
  color: #64748b;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.kpi-label {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.kpi-value {
  margin: 8px 0 0;
  color: #020617;
  font-size: 26px;
  font-weight: 800;
}

.kpi-change {
  margin: 6px 0 0;
  color: #0f766e;
  font-size: 13px;
}

.trend-list {
  display: grid;
  gap: 10px;
}

.trend-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
}

.bar {
  height: 12px;
  background: #ccfbf1;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: #0f766e;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  overflow-x: auto;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  color: #64748b;
  font-size: 13px;
}

a {
  color: inherit;
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 20px, 1280px);
    padding: 16px 0;
  }

  .admin-header,
  .admin-actions,
  .workspace-grid,
  .report-card-inner {
    display: grid;
    width: 100%;
  }

  .report-card-actions {
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .trend-item {
    grid-template-columns: 1fr;
  }
}
