:root {
  color-scheme: light;
  --page: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: #f0f1f4;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e4e7eb;
  --line-strong: #cdd1d8;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #eff6ff;
  --teal: #0d9488;
  --blue: #3b5998;
  --yellow: #d97706;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.10);
  --sidebar-width: 248px;
  font-family: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  letter-spacing: -0.01em;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
}

.auth-screen {
  min-height: 100vh;
  padding: 24px;
  background: #e9ebef;
}

.auth-layout {
  display: grid;
  width: min(1160px, 100%);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  grid-template-columns: minmax(360px, 0.92fr) minmax(440px, 1.08fr);
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: white;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 38px 42px;
  flex-direction: column;
  color: white;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #172554 100%);
  overflow: hidden;
}

.auth-brand-panel::before,
.auth-brand-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-brand-panel::before {
  inset: 100px auto auto -28px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
}

.auth-brand-panel::after {
  right: -40px;
  bottom: 80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.15) 0%, transparent 70%);
}

.auth-brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-mark {
  color: #2563eb;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
}

.auth-brand-lockup strong,
.auth-brand-lockup span {
  display: block;
}

.auth-brand-lockup strong {
  font-size: 16px;
  font-weight: 700;
}

.auth-brand-lockup span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.auth-brand-copy {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: auto 0;
  padding: 72px 0 60px;
}

.auth-eyebrow,
.auth-kicker {
  display: block;
  color: #60a5fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-brand-copy h1 {
  max-width: 360px;
  margin: 17px 0 18px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.auth-brand-copy p {
  max-width: 350px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.85;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  padding-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
}

.auth-form-panel {
  display: flex;
  min-width: 0;
  padding: 52px 60px 28px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
}

.auth-card {
  width: min(410px, 100%);
}

.auth-card-head {
  margin-bottom: 24px;
}

.auth-mobile-brand {
  display: none;
}

.auth-card-head h2 {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.auth-card-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.auth-tabs {
  display: grid;
  height: 42px;
  margin-bottom: 20px;
  padding: 3px;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f3f5;
}

.auth-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  transition: all 160ms ease;
}

.auth-tabs button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.auth-alert {
  margin-bottom: 15px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 10px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-field {
  display: block;
  min-width: 0;
}

.auth-field > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #374151;
  font-size: 10px;
  font-weight: 700;
}

.auth-field > input,
.password-control {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field > input,
.password-control input {
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  cursor: text;
}

.auth-field > input {
  display: block;
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
}

.auth-field > input:focus,
.password-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.password-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
}

.remember-control,
.agreement-control {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.remember-control input,
.agreement-control input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.auth-text-button {
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.auth-submit {
  height: 42px;
  margin-top: 2px;
  border: 0;
  border-radius: 7px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

.auth-submit:hover:not(:disabled) {
  background: var(--accent-dark);
}

.auth-submit:disabled {
  color: #cbd5e1;
  background: #94a3b8;
  cursor: wait;
}

.auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-support {
  margin: auto 0 0;
  padding-top: 28px;
  color: #94a3b8;
  text-align: center;
  font-size: 9px;
}

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

button {
  color: inherit;
}

button:not(:disabled),
select,
label,
input[type="file"] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar-width);
  padding: 24px 14px 16px;
  flex-direction: column;
  background: #fafbfc;
  border-right: 1px solid var(--line);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.main-nav {
  margin-top: 27px;
  overflow-y: auto;
}

.nav-label {
  margin: 18px 10px 7px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-item {
  display: grid;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  text-align: left;
  font-size: 13px;
  transition: background 150ms ease, color 150ms ease;
}

.nav-item:hover {
  background: #f0f2f5;
  color: var(--ink);
}

.nav-item.active {
  background: #e8edf5;
  color: #0f172a;
  font-weight: 700;
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #64748b;
  font-size: 17px;
}

.nav-item.active .nav-icon {
  color: var(--accent);
}

.nav-count {
  min-width: 20px;
  color: #94a3b8;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
}

.alert-count:not(:empty) {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.user-switch {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 52px;
  margin-top: auto;
  padding: 8px;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}

.user-switch:hover {
  background: #f0f2f5;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.20);
}

.user-copy {
  min-width: 0;
}

.user-copy strong,
.user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy strong {
  font-size: 12px;
}

.user-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.chevron {
  color: var(--muted);
  transform: rotate(0deg);
}

.user-menu {
  position: absolute;
  right: 14px;
  bottom: 69px;
  left: 14px;
  z-index: 40;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
}

.user-menu::after {
  display: none;
}

.account-option {
  display: grid;
  width: 100%;
  padding: 8px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.account-option:hover,
.account-option.active {
  background: #f0f2ef;
}

.account-option .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.account-option strong,
.account-option small {
  display: block;
}

.account-option strong {
  font-size: 12px;
}

.account-option small,
.account-check {
  color: var(--muted);
  font-size: 10px;
}

.profile-menu-head {
  display: grid;
  padding: 10px 8px 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.profile-menu-head .avatar {
  width: 34px;
  height: 34px;
}

.profile-menu-head strong,
.profile-menu-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-head strong {
  font-size: 11px;
}

.profile-menu-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.profile-menu-meta {
  padding: 9px 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.logout-option {
  display: flex;
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 5px;
  color: var(--danger);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.logout-option:hover {
  background: #fff0ee;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  min-height: 72px;
  padding: 0 34px;
  grid-template-columns: minmax(280px, 560px) 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(205, 209, 216, 0.70);
  background: rgba(243, 244, 246, 0.92);
  backdrop-filter: blur(16px);
}

.search-box {
  display: grid;
  height: 40px;
  padding: 0 11px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.search-box > span {
  font-size: 22px;
  line-height: 1;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  cursor: text;
}

.search-box input::placeholder {
  color: #94a3b8;
}

kbd {
  min-width: 43px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-color: #c4cac3;
  border-radius: 4px;
  color: #94a3b8;
  background: #f8fafc;
  text-align: center;
  font-family: inherit;
  font-size: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button,
.primary-button,
.secondary-button,
.text-button {
  border: 0;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 19px;
}

.icon-button:hover {
  background: #f1f3f5;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid white;
  border-radius: 50%;
  background: var(--accent);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 38px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.16);
}

.primary-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.24);
}

.primary-button:active,
.secondary-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: white;
  color: #374151;
}

.secondary-button:hover:not(:disabled) {
  border-color: #9ca3af;
  background: #f8fafc;
}

.secondary-button:disabled {
  color: #9ca3af;
  background: #f3f4f6;
  cursor: not-allowed;
}

.text-button {
  padding: 4px 6px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.mobile-menu {
  display: none;
}

.content-wrap {
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 31px 36px 64px;
}

.page-heading {
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow,
.dialog-kicker,
.drawer-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-heading h1,
.dialog-header h2,
.drawer-header h2 {
  margin: 0;
  color: var(--ink);
}

.page-heading h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.22;
}

.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.heading-meta {
  display: flex;
  margin-top: 20px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.dashboard-strip {
  display: grid;
  margin: 27px 0 26px;
  padding: 18px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 3px 24px;
  border-left: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.metric span,
.metric small {
  display: block;
}

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

.metric strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.metric small {
  color: #94a3b8;
  font-size: 10px;
}

.asset-toolbar {
  display: flex;
  min-height: 42px;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filter-row,
.view-controls,
.segmented {
  display: flex;
  align-items: center;
}

.filter-row {
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  transition: all 150ms ease;
}

.filter-chip:hover {
  background: #e4e7eb;
}

.filter-chip.active {
  border-color: var(--line-strong);
  background: white;
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.view-controls {
  gap: 9px;
}

.select-control select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: #475569;
  font-size: 11px;
}

.segmented {
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
}

.segmented button {
  display: grid;
  width: 30px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  transition: all 150ms ease;
}

.segmented button.active {
  color: var(--ink);
  background: #e4e7eb;
}

.asset-section {
  min-height: 360px;
}

.selection-bar {
  display: flex;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 8px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
}

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

.asset-grid.list-layout {
  display: block;
}

.asset-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.asset-card:hover {
  border-color: #bcc4d0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.asset-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.asset-card-main {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.asset-media {
  position: relative;
  display: grid;
  width: 100%;
  place-items: center;
  overflow: hidden;
  background: #e6e9e4;
}

.asset-media img,
.asset-media video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.asset-media video {
  pointer-events: none;
}

.media-watermark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.asset-media .watermark-image,
.detail-preview .watermark-image {
  width: 42%;
  height: auto;
  max-height: 64%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.62));
  opacity: var(--watermark-opacity, 0.48);
  user-select: none;
}

.watermark-notice {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  width: 100%;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  transform: none;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(16, 21, 20, 0.38);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(2px);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  border-radius: 0 0 4px 4px;
}

.file-placeholder {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  color: #4d5956;
  background: #e9ece8;
}

.file-placeholder::before,
.file-placeholder::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.34);
}

.file-placeholder::before {
  width: 42%;
  height: 58%;
  transform: rotate(-7deg) translate(-22%, 4%);
}

.file-placeholder::after {
  width: 46%;
  height: 62%;
  transform: rotate(5deg) translate(24%, -2%);
}

.file-placeholder.case_image {
  background: #dbe7e5;
}

.file-placeholder.case_video {
  color: white;
  background: #343d3b;
}

.placeholder-symbol {
  position: relative;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 22px;
}

.media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  border-radius: 5px;
  color: white;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  font-size: 9px;
  font-weight: 700;
}

.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}

.status-badge.pending {
  color: #92400e;
  background: #fef3c7;
}

.status-badge.rejected {
  color: #991b1b;
  background: #fee2e2;
}

.favorite-button,
.select-button {
  position: absolute;
  z-index: 5;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.60);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
}

.favorite-button {
  right: 9px;
  bottom: 72px;
  font-size: 16px;
}

.select-button {
  left: 9px;
  bottom: 72px;
  font-size: 13px;
}

.asset-card:hover .favorite-button,
.asset-card:hover .select-button,
.favorite-button.active,
.asset-card.selected .select-button {
  opacity: 1;
}

.favorite-button.active {
  color: white;
  background: #ef4444;
}

.asset-card.selected .select-button {
  background: var(--accent);
}

.asset-card-copy {
  padding: 12px 12px 11px;
}

.asset-card-copy h3 {
  margin: 0;
  overflow: hidden;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-meta {
  display: flex;
  margin-top: 7px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #94a3b8;
  font-size: 9px;
}

.asset-tags {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.tag {
  display: inline-flex;
  max-width: 90px;
  min-height: 19px;
  padding: 0 6px;
  align-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f1f5;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 600;
}

.list-layout .asset-card {
  display: grid;
  min-height: 82px;
  margin-bottom: 8px;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: center;
}

.list-layout .asset-card-main {
  display: contents;
}

.list-layout .asset-media {
  width: 116px;
  height: 80px;
  aspect-ratio: auto;
}

.list-layout .asset-card-copy {
  padding: 12px 16px;
}

.list-layout .asset-card-copy h3 {
  font-size: 13px;
}

.list-layout .favorite-button,
.list-layout .select-button {
  position: static;
  margin-right: 10px;
  color: var(--muted);
  background: #f0f2ef;
  opacity: 1;
}

.list-layout .select-button {
  display: none;
}

.empty-state {
  display: flex;
  min-height: 420px;
  padding: 40px 20px 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-visual {
  position: relative;
  width: 122px;
  height: 98px;
  margin-bottom: 23px;
}

.empty-sheet {
  position: absolute;
  display: block;
  width: 72px;
  height: 86px;
  border: 1px solid #bfc7c0;
  border-radius: 4px;
  background: #fdfefd;
}

.sheet-one {
  left: 17px;
  top: 8px;
  transform: rotate(-8deg);
}

.sheet-two {
  top: 2px;
  left: 39px;
  transform: rotate(7deg);
}

.empty-plus {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 4px solid var(--page);
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-size: 19px;
}

.empty-state h2 {
  margin: 0;
  font-size: 16px;
}

.empty-state p {
  max-width: 390px;
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.section-actions {
  display: flex;
  margin: 26px 0 14px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.section-actions h2 {
  margin: 0;
  font-size: 17px;
}

.section-actions p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.data-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.table-row {
  display: grid;
  min-height: 58px;
  padding: 0 18px;
  grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) 110px;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.table-row:first-child {
  border-top: 0;
}

.table-head {
  min-height: 40px;
  color: var(--muted);
  background: #f4f6f3;
  font-size: 10px;
  font-weight: 700;
}

.member-cell {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.member-cell .avatar {
  width: 32px;
  height: 32px;
}

.member-cell strong,
.member-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-cell strong {
  font-size: 11px;
}

.member-cell small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.role-pill,
.active-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
}

.role-pill {
  color: #31534f;
  background: #e1efec;
}

.active-pill {
  color: #4e6b42;
  background: #e8f1e2;
}

.activity-list {
  border-top: 1px solid var(--line);
}

.activity-item {
  display: grid;
  min-height: 62px;
  padding: 12px 4px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.activity-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #40504c;
  background: #e6eae5;
  font-size: 13px;
}

.activity-copy strong {
  display: block;
  font-size: 11px;
}

.activity-copy span,
.activity-time {
  color: var(--muted);
  font-size: 9px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  background: rgba(18, 23, 22, 0.28);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 60;
  width: min(520px, 100%);
  overflow-y: auto;
  background: white;
  box-shadow: -20px 0 50px rgba(15, 23, 42, 0.12);
  transform: translateX(105%);
  transition: transform 240ms ease;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-header,
.dialog-header {
  display: flex;
  padding: 22px 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2,
.dialog-header h2 {
  max-width: 390px;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 700;
}

.drawer-title-area {
  min-width: 0;
  flex: 1;
}

.drawer-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.detail-title-editor {
  display: grid;
  width: min(100%, 390px);
  grid-template-columns: minmax(0, 1fr) 34px 34px;
  align-items: center;
  gap: 6px;
}

.detail-title-editor input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  outline: none;
  color: var(--ink);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.detail-title-editor .icon-button {
  width: 34px;
  height: 34px;
}

.detail-body {
  padding: 22px 24px 34px;
}

.detail-preview {
  position: relative;
  display: grid;
  width: 100%;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #e8ebe7;
}

.detail-watermark {
  padding: 5%;
}

.detail-preview .detail-watermark .watermark-image {
  width: 34%;
  max-height: 70%;
}

.detail-watermark .watermark-notice {
  width: 100%;
  padding: 7px 12px;
  font-size: 14px;
  border-radius: 0 0 6px 6px;
}

.detail-preview img,
.detail-preview video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #171c1b;
}

.detail-actions {
  display: grid;
  margin: 15px 0 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.detail-status-actions {
  display: flex;
  margin-bottom: 22px;
  gap: 8px;
}

.approve-button,
.reject-button,
.delete-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  transition: all 150ms ease;
}

.approve-button {
  border: 0;
  color: white;
  background: var(--teal);
}

.approve-button:hover {
  background: #0f766e;
}

.reject-button,
.delete-button {
  border: 1px solid var(--line-strong);
  background: white;
}

.reject-button:hover {
  background: #f8fafc;
}

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

.delete-button:hover {
  background: #fef2f2;
}

.detail-section {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 20px;
}

.detail-field span,
.detail-field strong {
  display: block;
}

.detail-field span {
  color: var(--muted);
  font-size: 9px;
}

.detail-field strong {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.55;
}

.detail-description {
  color: #475569;
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.upload-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow);
}

.upload-dialog::backdrop {
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(4px);
}

.upload-dialog form {
  display: flex;
  max-height: min(880px, calc(100vh - 32px));
  flex-direction: column;
}

.dialog-content {
  padding: 22px 24px;
  overflow-y: auto;
}

.drop-zone {
  display: flex;
  min-height: 168px;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b0b8c4;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 11px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: white;
  font-size: 19px;
}

.drop-zone strong {
  font-size: 12px;
}

.drop-zone > span:not(.upload-symbol),
.drop-zone small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.file-preview {
  display: grid;
  min-height: 64px;
  margin-bottom: 18px;
  padding: 8px;
  grid-template-columns: 52px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f8f6;
}

.file-preview-media {
  display: grid;
  width: 52px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  color: var(--muted);
  background: #dfe4de;
}

.file-preview-media img,
.file-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview.batch {
  grid-template-columns: 112px minmax(0, 1fr) 34px;
}

.file-preview.batch .file-preview-media {
  width: 112px;
  height: 68px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: transparent;
}

.file-preview.batch .file-preview-media img,
.file-preview.batch .file-preview-media video {
  min-width: 0;
  min-height: 0;
  border-radius: 3px;
}

.file-preview strong,
.file-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview strong {
  font-size: 11px;
}

.file-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.upload-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid #e8aaa2;
  border-radius: 5px;
  color: #8d2d24;
  background: #fff1ef;
  font-size: 10px;
  line-height: 1.55;
}

.upload-error.success {
  border-color: #9dcfc3;
  color: #245d55;
  background: #edf8f5;
}

.asset-card.just-uploaded {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 125, 117, 0.16);
  animation: uploaded-highlight 1.8s ease both;
}

@keyframes uploaded-highlight {
  0%, 35% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 14px;
}

.field {
  display: block;
  min-width: 0;
}

.field.span-two {
  grid-column: span 2;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  color: #424a48;
  font-size: 10px;
  font-weight: 700;
}

.field b {
  color: var(--accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: white;
  color: var(--ink);
  font-size: 11px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input,
.field select {
  height: 38px;
  padding: 0 10px;
}

.field textarea {
  min-height: 78px;
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.field input:disabled {
  color: var(--muted);
  background: #f3f4f6;
  cursor: not-allowed;
}

.dialog-footer {
  display: flex;
  min-height: 72px;
  padding: 14px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.dialog-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.dialog-footer > div {
  display: flex;
  gap: 8px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  width: min(340px, calc(100vw - 36px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: grid;
  min-height: 52px;
  padding: 11px 13px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: white;
  background: #0f172a;
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in 180ms ease both;
}

.toast.error {
  border-color: #dc2626;
  background: #991b1b;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .asset-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: minmax(260px, 500px) 1fr;
  }
}

@media (max-width: 900px) {
  .auth-screen {
    padding: 0;
    background: white;
  }

  .auth-layout {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 36px 28px 24px;
  }

  .auth-mobile-brand {
    display: flex;
    margin-bottom: 46px;
    align-items: center;
    gap: 10px;
  }

  .auth-mobile-brand strong {
    font-size: 13px;
  }

  :root {
    --sidebar-width: 228px;
  }

  .sidebar {
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    transition: transform 200ms ease;
  }

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

  .workspace {
    margin-left: 0;
  }

  .topbar {
    padding: 0 20px;
    grid-template-columns: 38px minmax(220px, 1fr) auto;
    gap: 10px;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .dashboard-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .metric:nth-child(n + 3) {
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .auth-form-panel {
    padding: 24px 20px 18px;
    justify-content: flex-start;
  }

  .auth-card {
    width: 100%;
  }

  .auth-card-head {
    margin-bottom: 20px;
  }

  .auth-mobile-brand {
    margin-bottom: 36px;
  }

  .auth-card-head h2 {
    font-size: 23px;
  }

  .auth-field-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .auth-support {
    margin-top: auto;
  }

  body {
    padding-bottom: 64px;
  }

  .topbar {
    min-height: 62px;
    padding: 0 14px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .search-box {
    height: 36px;
  }

  .search-box kbd,
  .top-actions .icon-button,
  .top-actions .primary-button span + * {
    display: none;
  }

  .top-actions .primary-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0;
  }

  .top-actions .primary-button span {
    font-size: 18px;
  }

  .content-wrap {
    padding: 23px 14px 30px;
  }

  .page-heading {
    min-height: 66px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .page-heading p {
    max-width: 270px;
    font-size: 10px;
    line-height: 1.6;
  }

  .heading-meta {
    display: none;
  }

  .dashboard-strip {
    margin: 20px 0;
    padding: 14px 0;
  }

  .metric {
    padding: 3px 15px;
  }

  .metric strong {
    font-size: 20px;
  }

  .asset-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .filter-row {
    width: 100%;
  }

  .view-controls {
    width: 100%;
    justify-content: space-between;
  }

  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .asset-card-copy {
    padding: 9px;
  }

  .asset-card-copy h3 {
    font-size: 11px;
  }

  .asset-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .favorite-button,
  .select-button {
    bottom: 82px;
    opacity: 1;
  }

  .favorite-button {
    right: 7px;
  }

  .select-button {
    left: 7px;
  }

  .list-layout .asset-card {
    grid-template-columns: 92px minmax(0, 1fr) 36px;
  }

  .list-layout .asset-media {
    width: 92px;
    height: 76px;
  }

  .list-layout .asset-card-copy {
    padding: 9px 11px;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 28;
    display: grid;
    height: 64px;
    padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(253, 254, 253, 0.97);
    backdrop-filter: blur(12px);
  }

  .mobile-nav button {
    display: flex;
    min-width: 0;
    padding: 3px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 9px;
  }

  .mobile-nav button span {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-nav button.active {
    color: var(--accent);
    font-weight: 700;
  }

  .table-row {
    padding: 0 12px;
    grid-template-columns: minmax(150px, 1fr) 80px;
  }

  .table-row > :nth-child(2),
  .table-row > :nth-child(3) {
    display: none;
  }

  .dialog-header,
  .drawer-header {
    padding: 18px;
  }

  .dialog-content,
  .detail-body {
    padding: 18px;
  }

  .drop-zone {
    min-height: 145px;
    padding: 18px;
  }

  .file-preview.batch {
    grid-template-columns: 88px minmax(0, 1fr) 34px;
  }

  .file-preview.batch .file-preview-media {
    width: 88px;
    height: 60px;
  }

  .form-grid {
    display: block;
  }

  .field {
    margin-bottom: 13px;
  }

  .dialog-footer {
    padding: 12px 18px;
  }

  .dialog-footer p {
    display: none;
  }

  .dialog-footer > div {
    width: 100%;
  }

  .dialog-footer button {
    flex: 1;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .toast-region {
    bottom: 76px;
  }
}

@media (max-width: 390px) {
  .search-box input::placeholder {
    color: transparent;
  }

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