:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #f3f6fb;
  --line: #dfe5ef;
  --line-strong: #cbd5e4;
  --text: #152039;
  --muted: #66738a;
  --faint: #8b97aa;
  --blue: #246bfe;
  --blue-dark: #1549c7;
  --green: #168a45;
  --green-bg: #e9f8ef;
  --orange: #c77700;
  --orange-bg: #fff3df;
  --red: #d33a2c;
  --red-bg: #fff0ee;
  --ink: #07132d;
  --shadow: 0 18px 50px rgba(24, 42, 74, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1120px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 249, 252, 0.96)),
    var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(480px, 1fr) 460px;
  background:
    linear-gradient(rgba(10, 25, 55, 0.42), rgba(10, 25, 55, 0.18)),
    url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1800&q=80")
      center/cover;
}

.login-copy {
  color: #fff;
  align-self: end;
  padding: 76px;
  max-width: 760px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  margin-right: 14px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  display: inline-block;
  flex: 0 0 38px;
  margin-right: 14px;
  border-radius: 8px;
  object-fit: cover;
  vertical-align: middle;
}

.login-copy > div:first-child {
  display: flex;
  align-items: center;
}

.login-copy h1 {
  margin: 22px 0 10px;
  font-size: 52px;
  line-height: 1;
}

.login-copy p {
  margin: 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

.login-panel {
  align-self: center;
  margin-right: 72px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-panel h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.login-panel .muted {
  margin-bottom: 26px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  outline: 0;
}

.input,
.select {
  height: 42px;
  padding: 0 13px;
}

.textarea {
  min-height: 88px;
  padding: 12px 13px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.12);
}

.btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.primary:hover {
  background: var(--blue-dark);
}

.btn.dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn.danger {
  border-color: #ffd2cc;
  background: var(--red-bg);
  color: var(--red);
}

.btn.full {
  width: 100%;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.icon-btn:hover {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar .brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 17px;
}

.nav-tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  height: 100%;
}

.nav-tab {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  background: transparent;
  font-weight: 650;
}

.nav-tab.active {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.top-spacer {
  flex: 1;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
}

.avatar {
  width: 0px;
  height: 0px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.staff-stats {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.metric-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.metric-inline strong {
  color: var(--text);
  font-size: 15px;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 330px;
  min-height: calc(100vh - 114px);
}

.staff-main {
  padding: 28px 34px 44px;
  border-right: 1px solid var(--line);
}

.staff-side {
  padding: 28px 28px;
  background: rgba(255, 255, 255, 0.54);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2,
.section-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.batch-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.batch-label strong {
  color: var(--text);
}

.upload-tabs,
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfe;
}

.upload-tab,
.segment {
  height: 32px;
  padding: 0 13px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.upload-tab.active,
.segment.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 5px rgba(20, 40, 80, 0.08);
}

.filter-chip {
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(36, 107, 254, 0.18);
  border-radius: 999px;
  background: rgba(36, 107, 254, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: rgba(36, 107, 254, 0.32);
  background: rgba(36, 107, 254, 0.12);
  outline: none;
}

.dropzone {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  margin: 16px 0 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.dropzone.dragging {
  border-color: var(--blue);
  background: rgba(36, 107, 254, 0.06);
}

.drop-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drop-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.upload-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.upload-row {
  display: grid;
  grid-template-columns: 44px 1fr auto 34px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.thumb {
  width: 42px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(36, 107, 254, 0.25), rgba(22, 138, 69, 0.2)),
    #edf3fb;
}

.file-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}

.progress {
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  transition: width 0.2s ease;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 10px;
}

.search {
  width: 280px;
  position: relative;
}

.search .input {
  padding-left: 35px;
}

.search::before {
  content: "⌕";
  position: absolute;
  left: 13px;
  top: 9px;
  color: var(--muted);
}

.table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

td {
  color: var(--text);
}

tr:last-child td {
  border-bottom: 0;
}

.asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.asset-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.asset-row-actions .btn,
.asset-row-actions .icon-btn {
  flex: 0 0 auto;
}

.video-management-table {
  overflow-x: auto;
}

.video-management-table table {
  min-width: 1320px;
}

.video-management-table .asset-cell {
  gap: 12px;
}

.large-video-thumb {
  width: 220px;
  height: 124px;
  flex: 0 0 220px;
  border-radius: 6px;
  background: #101827;
}

.video-thumb.large-video-thumb img {
  object-fit: contain;
  background: #101827;
}

.large-video-thumb.video-thumb > span {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.badge.pending {
  background: var(--orange-bg);
  color: var(--orange);
}

.badge.available {
  background: var(--green-bg);
  color: var(--green);
}

.badge.unavailable,
.badge.deleted {
  background: var(--red-bg);
  color: var(--red);
}

.side-block {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.side-block:last-child {
  border-bottom: 0;
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 800;
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--blue);
  outline: none;
}

.status-list,
.quick-list,
.log-list {
  display: grid;
  gap: 12px;
}

.status-item,
.quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.quick-item {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.quick-item:hover {
  background: #f3f6fb;
  color: var(--text);
}

.quick-item:focus-visible {
  outline: 2px solid rgba(36, 107, 254, 0.28);
  outline-offset: 2px;
}

.quick-item strong {
  color: var(--text);
}

.status-left,
.quick-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
}

.dot.pending {
  color: var(--orange);
  background: var(--orange-bg);
}

.dot.available {
  color: var(--green);
  background: var(--green-bg);
}

.dot.unavailable {
  color: var(--red);
  background: var(--red-bg);
}

.dot.today {
  color: var(--blue);
  background: rgba(36, 107, 254, 0.1);
}

.status-link {
  width: 100%;
  min-height: 28px;
  padding: 2px 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.status-link:hover,
.status-link:focus-visible {
  color: var(--text);
  background: rgba(243, 246, 251, 0.7);
  outline: none;
}

.ceo-shell {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  padding: 18px 12px 20px;
  background:
    radial-gradient(circle at 35% 14%, rgba(255, 255, 255, 0.92), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #f8fafc 100%);
  box-shadow:
    inset -1px 0 0 #e8eef6,
    12px 0 34px rgba(20, 35, 66, 0.04);
}

.side-brand {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  margin: 0 0 20px 4px;
}

.side-brand .brand-logo {
  display: block;
  margin-right: 0;
}

.side-nav {
  display: grid;
  gap: 9px;
}

.side-nav-item,
.side-action {
  width: 100%;
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border-radius: 6px;
  background: transparent;
  color: #7b8798;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.side-nav-item:hover,
.side-action:hover {
  background: rgba(238, 243, 251, 0.74);
  color: #243047;
}

.side-nav-item.active {
  background: #eef3fb;
  color: #0b1733;
  box-shadow: 0 8px 18px rgba(31, 50, 84, 0.05);
}

.side-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
}

.side-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.side-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.side-divider {
  height: 1px;
  margin: 0 10px 12px;
  background: #e3e9f2;
}

.side-action {
  color: #768294;
  font-size: 13px;
  font-weight: 700;
}

.side-bottom .side-nav-item {
  color: #768294;
  font-size: 13px;
}

.side-bottom .side-nav-item.active {
  color: #0b1733;
}

.ceo-main {
  padding: 26px 34px 44px;
  min-width: 0;
}

.ceo-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
}

.ceo-head h1 {
  margin: 0 0 5px;
  font-size: 24px;
}

.ceo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ceo-search {
  width: 300px;
}

.kpi-row {
  display: flex;
  gap: 18px;
  padding: 12px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.kpi {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.kpi strong {
  color: var(--text);
  font-size: 16px;
}

.asset-section {
  margin-bottom: 32px;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 16px;
}

.asset-card {
  min-width: 0;
  cursor: pointer;
}

.media-box {
  height: 150px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(36, 107, 254, 0.18), rgba(7, 19, 45, 0.26)),
    #dbe5f3;
}

.media-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-box.video {
  background:
    linear-gradient(135deg, #a6c3d8, #183d5a 52%, #061226),
    #dbe5f3;
}

.play {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
}

.video-thumb {
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-thumb span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(7, 19, 45, 0.64);
  color: #fff;
  font-size: 10px;
}

.card-meta {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
}

.card-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.filters .input,
.filters .select {
  width: 180px;
}

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settings-panel {
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.settings-panel .section-head {
  margin-bottom: 0;
}

.employee-create-panel .section-head {
  margin-bottom: 16px;
}

.employee-create-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.employee-create-form .field {
  margin-bottom: 0;
}

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

.employees-table table {
  min-width: 1180px;
}

.employee-table-input {
  height: 34px;
  padding: 8px 10px;
}

.employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.employee-password-reset {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto auto;
  gap: 8px;
  width: 100%;
}

.asset-management-tools {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
}

.asset-management-tools .bulk-bar {
  flex: 1;
  margin-bottom: 0;
}

.asset-view-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.select-all-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.asset-view-toggle .segment {
  min-width: 56px;
}

.asset-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.asset-management-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.asset-management-card.selected {
  border-color: rgba(36, 107, 254, 0.55);
  box-shadow: 0 0 0 2px rgba(36, 107, 254, 0.1);
}

.management-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
}

.management-card-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.management-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  background: #101827;
  color: #fff;
}

.management-card-media.cover {
  background: #f8fafc;
  color: var(--text);
}

.management-card-media:focus-visible {
  outline: 3px solid rgba(36, 107, 254, 0.32);
  outline-offset: -3px;
}

.management-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #101827;
}

.management-card-media.cover img {
  background: #f8fafc;
}

.management-card-media .play {
  width: 48px;
  height: 48px;
  font-size: 15px;
}

.management-card-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.management-card-title {
  min-height: 40px;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.management-card-meta-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 10px;
  font-size: 13px;
}

.management-card-meta-grid span {
  color: var(--muted);
}

.management-card-meta-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
  margin-top: auto;
}

.split-grid {
  display: grid;
  grid-template-columns: 20% 44% 1fr;
  gap: 20px;
  align-items: start;
}

.panel {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.status-panel .section-head,
.logs-panel .section-head,
.trash-panel .section-head {
  margin-bottom: 16px;
}

.status-panel .status-list {
  gap: 8px;
}

.status-panel .status-item {
  min-height: 28px;
}

.status-panel .status-item strong {
  min-width: 36px;
  color: var(--text);
  text-align: right;
  font-size: 15px;
}

.dashboard-log-list {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.dashboard-log-item {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-log-text {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 620px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-log-time {
  flex: 0 0 auto;
  color: var(--muted);
  text-align: left;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trash-copy {
  max-width: 360px;
  margin: 0 0 16px;
  line-height: 1.8;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  min-width: 320px;
  max-width: min(720px, calc(100vw - 48px));
  padding: 15px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(7, 19, 45, 0.22);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.toast.show {
  display: block;
}

.toast.ok {
  border-color: #bde9cc;
  background: #effbf3;
  color: #0b6b34;
}

.toast.error {
  border-color: #ffbdb4;
  background: #fff0ee;
  color: var(--red);
}

.pending-refresh-notice {
  margin-top: 18px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 32px);
  background: rgba(7, 19, 45, 0.42);
}

.detail-modal {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 90px rgba(7, 19, 45, 0.22);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
}

.detail-media {
  min-height: min(520px, calc(100vh - 24px));
  display: grid;
  place-items: center;
  background: #101827;
}

.detail-image,
.detail-video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 24px);
  object-fit: contain;
  background: #101827;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 34px 30px;
  overflow: auto;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-title > div {
  min-width: 0;
}

.detail-title .badge {
  flex: 0 0 auto;
}

.detail-title h2 {
  margin: 5px 0 0;
  font-size: 21px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: normal;
}

.detail-alert {
  padding: 11px 12px;
  border: 1px solid #ffd2cc;
  border-radius: var(--radius);
  background: var(--red-bg);
  color: var(--red);
  font-size: 13px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin: 0;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.rename-form,
.thumbnail-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.rename-form label,
.thumbnail-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rename-row,
.thumbnail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.thumbnail-row input[type="file"] {
  height: auto;
  padding: 7px 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

@media (max-width: 1180px) {
  body {
    min-width: 960px;
  }

  .card-row {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .asset-management-tools {
    flex-direction: column;
  }

  .asset-view-tools {
    justify-content: space-between;
  }

  .staff-layout {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 960px) {
  body {
    min-width: 0;
  }

  .ceo-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar {
    min-height: 0;
    padding: 14px 10px;
  }

  .side-brand {
    margin-left: 6px;
  }

  .side-nav-item,
  .side-action {
    justify-content: center;
    padding: 0;
  }

  .side-label {
    display: none;
  }

  .ceo-main {
    padding: 18px 16px 34px;
  }

  .ceo-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ceo-actions,
  .filters,
  .bulk-bar {
    flex-wrap: wrap;
  }

  .ceo-search,
  .filters .input,
  .filters .select {
    width: 100%;
  }

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

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

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

  table {
    min-width: 760px;
  }

  .video-management-table table {
    min-width: 1080px;
  }

  .detail-modal {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .detail-media {
    min-height: 260px;
    max-height: 46vh;
  }

  .detail-image,
  .detail-video {
    max-height: 46vh;
  }

  .detail-body {
    padding: 24px 20px;
    overflow: visible;
  }

  .detail-actions {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .ceo-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .side-brand,
  .side-divider {
    display: none;
  }

  .side-nav,
  .side-bottom {
    display: flex;
    gap: 8px;
  }

  .side-bottom {
    margin-top: 0;
  }

  .side-nav-item,
  .side-action {
    width: 42px;
    flex: 0 0 42px;
  }

  .card-row,
  .asset-management-grid,
  .detail-grid,
  .rename-row,
  .thumbnail-row {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: start;
  }
}


input#filterQ {
    width: 220px;
}
