/* DAMS — Premium Design System v2 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Core Brand Palette */
  --primary:       hsl(215, 88%, 46%);
  --primary-light: hsl(215, 88%, 58%);
  --primary-bg:    hsl(215, 100%, 97%);
  --primary-glow:  hsla(215, 88%, 46%, 0.15);

  --accent:        hsl(262, 68%, 52%);
  --accent-bg:     hsl(262, 100%, 97%);
  --accent-glow:   hsla(262, 68%, 52%, 0.12);

  /* Backgrounds */
  --bg-page:    hsl(220, 22%, 94%);
  --bg-sidebar: hsl(222, 28%, 8%);
  --bg-card:    hsl(0, 0%, 100%);
  --bg-hover:   hsl(220, 30%, 98%);
  --bg-inset:   hsl(220, 18%, 95%);
  --bg-glass:   rgba(255,255,255,0.80);

  /* Text */
  --text-primary:   hsl(222, 28%, 10%);
  --text-secondary: hsl(222, 14%, 42%);
  --text-muted:     hsl(222, 10%, 62%);
  --text-white:     hsl(0, 0%, 100%);
  --text-sidebar:   hsl(220, 20%, 70%);
  --text-sidebar-active: hsl(0, 0%, 100%);

  /* Sidebar accent */
  --sidebar-accent: hsl(215, 88%, 56%);
  --sidebar-active-bg: rgba(255,255,255,0.10);

  /* Borders */
  --border:        hsl(220, 14%, 88%);
  --border-strong: hsl(220, 14%, 80%);
  --border-focus:  var(--primary);

  /* Semantic Colors */
  --success:        hsl(151, 60%, 28%);
  --success-bg:     hsl(151, 60%, 94%);
  --success-border: hsl(151, 55%, 80%);

  --warning:        hsl(34, 88%, 35%);
  --warning-bg:     hsl(40, 100%, 94%);
  --warning-border: hsl(40, 90%, 80%);

  --danger:         hsl(0, 72%, 43%);
  --danger-bg:      hsl(0, 90%, 96%);
  --danger-border:  hsl(0, 72%, 82%);

  /* Layout */
  --sidebar-width:  250px;
  --header-height:  64px;

  /* Elevation */
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.14), 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 32px 64px rgba(15, 23, 42, 0.18), 0 12px 32px rgba(15, 23, 42, 0.10);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --speed: 0.18s;
}

/* ─── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── App Layout ────────────────────────────────────────────── */
.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar (dark premium) ─────────────────────────────────── */
aside.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.brand-section {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-sidebar);
  letter-spacing: 0.02em;
  margin-top: 1px;
}

nav.nav-menu {
  flex-grow: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.28);
  padding: 14px 12px 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-sidebar);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--speed) ease;
  position: relative;
  user-select: none;
}

.nav-item:hover {
  color: var(--text-sidebar-active);
  background: var(--sidebar-active-bg);
}

.nav-item.active {
  color: var(--text-sidebar-active);
  background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 62%;
  background: var(--sidebar-accent);
  border-radius: 0 3px 3px 0;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity var(--speed);
}

.nav-item:hover svg, .nav-item.active svg { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  line-height: 1.6;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  transition: background var(--speed);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.user-info { display: flex; flex-direction: column; overflow: hidden; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sidebar-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-lbl {
  font-size: 10px;
  color: var(--sidebar-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}

/* ─── Main Content ──────────────────────────────────────────── */
main.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
}

/* ─── Header (glassmorphism) ─────────────────────────────────── */
header.top-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  z-index: 90;
  position: relative;
}

.header-left { display: flex; align-items: center; gap: 16px; }

.search-container { position: relative; width: 380px; }

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 16px 9px 40px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: all 0.25s ease;
  font-family: inherit;
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--speed) ease;
  box-shadow: var(--shadow-xs);
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

/* ─── Notifications ──────────────────────────────────────────── */
.notifications-dropdown {
  position: absolute;
  top: 70px;
  right: 28px;
  width: 340px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 300;
  max-height: 420px;
  overflow-y: auto;
  animation: dropIn 0.2s var(--ease-out);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notifications-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}

.notifications-list { padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.notification-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-hover);
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.4;
  transition: background var(--speed);
}

.notification-item:hover { background: var(--primary-bg); }

.notification-time {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── View Container ─────────────────────────────────────────── */
.view-container {
  flex-grow: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

.view-section { display: none; }
.view-section.active {
  display: block;
  animation: fadeSlide 0.28s var(--ease-out);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Section Header ─────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.section-title h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.section-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
  line-height: 1.5;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--speed) ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px hsla(215, 88%, 46%, 0.28), inset 0 1px 0 rgba(255,255,255,0.15);
  filter: brightness(1.06);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.btn-danger:hover { background: var(--danger); color: white; transform: translateY(-1px); }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 7px;
}

/* ─── Stats Grid ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  transition: all 0.24s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0,0,0,0.012));
  pointer-events: none;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.stat-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  margin-top: 5px;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue   { background: var(--primary-bg); color: var(--primary); }
.stat-icon-purple { background: var(--accent-bg);  color: var(--accent); }
.stat-icon-green  { background: var(--success-bg); color: var(--success); }
.stat-icon-amber  { background: var(--warning-bg); color: var(--warning); }

/* ─── Dashboard Panels ───────────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

/* ─── Library Controls ───────────────────────────────────────── */
.library-controls {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-xs);
}

.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.select-input {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  cursor: pointer;
  transition: border var(--speed);
  font-family: inherit;
}

.select-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* ─── Tag Filter Chips ───────────────────────────────────────── */
.search-tags-box {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}

.filter-tag {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed) var(--ease-spring);
  user-select: none;
  box-shadow: var(--shadow-xs);
}

.filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.filter-tag.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ─── Asset Grid ─────────────────────────────────────────────── */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 20px;
}

/* ─── Asset Card ─────────────────────────────────────────────── */
.asset-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.24s var(--ease-out);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.asset-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.15);
}

.asset-preview {
  position: relative;
  height: 164px;
  overflow: hidden;
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.asset-card:hover .asset-preview img { transform: scale(1.05); }

/* Premium shimmer on hover */
.asset-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.04));
  border-radius: 16px;
  pointer-events: none;
}

.asset-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255,255,255,0.95);
  color: var(--text-primary);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.asset-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.status-approved { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.status-pending  { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.status-rejected { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border);  }

.asset-content {
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.asset-category {
  font-size: 10px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.asset-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.01em;
}

.asset-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.asset-tag-chip {
  background: var(--primary-bg);
  border: 1px solid rgba(37, 99, 235, 0.15);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.asset-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}

.asset-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

/* ─── Upload ─────────────────────────────────────────────────── */
.upload-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  background: white;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.dropzone-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--bg-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid var(--border);
}

.dropzone-icon svg { width: 28px; height: 28px; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 13px;
  border-radius: 9px;
  outline: none;
  font-size: 13.5px;
  transition: all var(--speed) ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control { resize: vertical; min-height: 90px; }

/* ─── Tables ─────────────────────────────────────────────────── */
.workflow-table, .audit-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 13px;
  overflow: hidden;
}

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-inset);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 2px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

td { font-size: 13.5px; }

.approval-asset-info { display: flex; align-items: center; gap: 12px; }

.approval-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── Admin Layout ───────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.permission-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.permission-checkbox-card {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--speed);
}

.permission-checkbox-card:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.permission-checkbox-card input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  width: 900px;
  max-width: 92vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.90) translateY(20px);
  transition: transform 0.3s var(--ease-out);
}

.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.close-btn {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--speed);
}

.close-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

.modal-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.modal-preview-area {
  background: var(--bg-inset);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 300px;
  border: 1px solid var(--border);
  position: relative;
}

.modal-preview-area img, .modal-preview-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info-area {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-row { display: flex; flex-direction: column; gap: 3px; }

.detail-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.detail-val { font-size: 13.5px; color: var(--text-primary); line-height: 1.5; }

.embed-code-box {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 9px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10.5px;
  color: var(--primary);
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
  margin-top: 6px;
}

/* ─── Audit Logs ─────────────────────────────────────────────── */
.audit-action-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.action-login      { background: hsl(200,80%,94%); color: hsl(200,80%,30%); }
.action-upload     { background: var(--accent-bg); color: var(--accent); }
.action-approve    { background: var(--success-bg); color: var(--success); }
.action-reject     { background: var(--danger-bg); color: var(--danger); }
.action-permission { background: var(--warning-bg); color: var(--warning); }

/* ─── SVG Charts ─────────────────────────────────────────────── */
.svg-chart { width: 100%; height: 100%; }

.svg-chart text {
  fill: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.svg-chart line { stroke: var(--border); stroke-dasharray: 3 3; }

/* ─── Inline category chip (used in tables) ──────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(37,99,235,0.14);
  white-space: nowrap;
}

/* ─── Premium micro-animations ───────────────────────────────── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

.btn-primary:focus { animation: pulse-glow 1.5s ease; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .dashboard-layout, .upload-layout, .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  aside.sidebar { width: 60px; }
  .brand-name, .brand-sub, .user-info, .sidebar-footer { display: none; }
  .nav-item span { display: none; }
  .nav-item { padding: 10px; justify-content: center; }
  header.top-header { padding: 0 16px; }
  .search-container { width: 180px; }
  .view-container { padding: 16px; }
}
