@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --primary:        #2563EB;
  --primary-hover:  #1D4ED8;
  --primary-light:  #DBEAFE;
  --secondary:      #7C3AED;
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #06B6D4;

  --bg:             #F1F5F9;
  --bg-card:        #FFFFFF;
  --bg-sidebar:     #FFFFFF;
  --bg-header:      #FFFFFF;
  --bg-hover:       #F8FAFC;
  --bg-input:       #FFFFFF;

  --text:           #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --text-inverse:   #FFFFFF;

  --border:         #E2E8F0;
  --border-input:   #CBD5E1;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05);
  --shadow:         0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:      0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:      0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl:      0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);

  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --radius-full:    9999px;

  --header-h:       64px;
  --sidebar-w:      260px;
  --transition:     0.2s ease;

  /* Item type colors */
  --c-table:     #2563EB;
  --c-view:      #7C3AED;
  --c-dashboard: #059669;
  --c-kpi:       #D97706;
  --c-report:    #DC2626;
  --c-dataset:   #0891B2;
}

[data-theme="dark"] {
  --bg:             #0F172A;
  --bg-card:        #1E293B;
  --bg-sidebar:     #1E293B;
  --bg-header:      #1E293B;
  --bg-hover:       #334155;
  --bg-input:       #0F172A;

  --text:           #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted:     #64748B;

  --border:         #334155;
  --border-input:   #475569;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.3);
  --shadow:         0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:      0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg:      0 10px 15px rgba(0,0,0,0.4);
  --shadow-xl:      0 20px 25px rgba(0,0,0,0.5);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  min-height: 100vh;
}

.app-layout.no-sidebar {
  grid-template-areas: "header header" "main main";
  grid-template-columns: 1fr;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.app-header {
  grid-area: header;
  height: var(--header-h);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }

/* ── Top navigation links (Catalog / Data Management / Administration) ── */
.app-nav { display: flex; align-items: center; gap: 0.125rem; margin-left: 1rem; }

.app-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
}
.app-nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.app-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.header-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.75rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-full);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.header-search input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

.user-menu {
  position: relative;
}

/* ── Language Switcher ──────────────────────────────────────────────────────── */
.lang-switcher { position: relative; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.05em;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.lang-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
[data-theme="dark"] .lang-btn:hover { background: rgba(37,99,235,0.18); }

.lang-flag-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.15);
}
.lang-flag-circle svg { width: 100%; height: 100%; display: block; }

.lang-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.lang-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  padding: 5px;
  min-width: 175px;
  z-index: 300;
  display: none;
}
[data-theme="dark"] .lang-menu { box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3); }
.lang-menu.open { display: block; animation: fadeIn 0.15s ease; }

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  transition: background var(--transition);
  text-align: left;
}
.lang-menu-item:hover { background: var(--bg-hover); }
.lang-menu-item .lang-name { font-size: 0.775rem; font-weight: 400; color: var(--text-muted); margin-left: auto; }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--transition);
}
.user-avatar:hover { opacity: 0.85; }

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 200px;
  z-index: 200;
  display: none;
}
.dropdown.open { display: block; animation: fadeIn 0.15s ease; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.375rem 0; }

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.app-sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  transition: background var(--transition), border-color var(--transition);
}

.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.375rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.filter-item:hover { background: var(--bg-hover); color: var(--text); }
.filter-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; }
[data-theme="dark"] .filter-item.active { background: rgba(37,99,235,0.2); }

.filter-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.filter-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--bg);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.1rem 0.5rem;
  min-width: 22px;
  text-align: center;
  font-weight: 500;
}
.filter-item.active .filter-count { background: var(--primary); color: white; }

/* Type icon colors */
.type-table    { background: rgba(37,99,235,0.12); color: var(--c-table); }
.type-view     { background: rgba(124,58,237,0.12); color: var(--c-view); }
.type-dashboard{ background: rgba(5,150,105,0.12); color: var(--c-dashboard); }
.type-kpi      { background: rgba(217,119,6,0.12); color: var(--c-kpi); }
.type-report   { background: rgba(220,38,38,0.12); color: var(--c-report); }
.type-dataset  { background: rgba(8,145,178,0.12); color: var(--c-dataset); }

/* ── Main Content ───────────────────────────────────────────────────────────── */
.app-main {
  grid-area: main;
  padding: 1.5rem;
  overflow-y: auto;
  min-height: 0;
}

/* ── Toolbar ────────────────────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.results-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.results-count strong { color: var(--text); }

.toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.view-toggle button {
  padding: 0.375rem 0.625rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
}
.view-toggle button.active { background: var(--primary); color: white; }
.view-toggle button:hover:not(.active) { background: var(--bg-hover); color: var(--text); }

.sort-select {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}

/* ── Cards Grid ─────────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.card-type-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.card-title-area { flex: 1; min-width: 0; }
.card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
}
.card-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.875rem;
  min-height: 2.5em;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.775rem;
  color: var(--text-muted);
}
.card-meta svg { flex-shrink: 0; }

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

/* ── List View ──────────────────────────────────────────────────────────────── */
.items-list { display: flex; flex-direction: column; gap: 0.5rem; }

.list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.list-item:hover { box-shadow: var(--shadow-sm); border-color: var(--primary); }

.list-item-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.list-item-name { font-weight: 600; font-size: 0.9rem; min-width: 180px; }
.list-item-desc {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-owner { font-size: 0.8rem; color: var(--text-muted); min-width: 120px; text-align: right; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-active     { background: #D1FAE5; color: #065F46; }
.badge-draft      { background: #FEF3C7; color: #92400E; }
.badge-deprecated { background: #FEE2E2; color: #991B1B; }
.badge-archived   { background: #F1F5F9; color: #475569; }

[data-theme="dark"] .badge-active     { background: rgba(16,185,129,0.2); color: #6EE7B7; }
[data-theme="dark"] .badge-draft      { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .badge-deprecated { background: rgba(239,68,68,0.2); color: #FCA5A5; }
[data-theme="dark"] .badge-archived   { background: rgba(148,163,184,0.1); color: #94A3B8; }

.badge-public       { background: #D1FAE5; color: #065F46; }
.badge-internal     { background: #DBEAFE; color: #1E40AF; }
.badge-confidential { background: #FEF3C7; color: #92400E; }
.badge-restricted   { background: #FEE2E2; color: #991B1B; }

[data-theme="dark"] .badge-internal   { background: rgba(37,99,235,0.2); color: #93C5FD; }

/* ── Tags ───────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--border);
}
[data-theme="dark"] .tag { background: var(--bg-hover); }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-sm); }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.375rem;
}
.form-label span.required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-control::placeholder { color: var(--text-muted); }

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

.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.25rem; }
.form-control.is-invalid { border-color: var(--danger); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Tag input */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  background: var(--bg-input);
  min-height: 42px;
  cursor: text;
  transition: border-color var(--transition);
}
.tag-input-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.tag-input-container .tag { cursor: default; }
.tag-input-container .tag button {
  background: none; border: none; cursor: pointer;
  color: inherit; padding: 0; margin-left: 2px;
  font-size: 0.75rem; line-height: 1;
}
.tag-input-container input {
  border: none; outline: none; background: transparent;
  color: var(--text); font-size: 0.875rem; font-family: inherit;
  flex: 1; min-width: 80px;
}

/* ── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
  position: relative;
}

.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1100px; }

.modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.modal-title { font-size: 1.125rem; font-weight: 700; flex: 1; }
.modal-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.125rem; }
.modal-close {
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--text-muted); border-radius: var(--radius);
  cursor: pointer; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text); }

.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Quick view modal specifics */
.qv-header {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem;
}
.qv-type-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.qv-name { font-size: 1.25rem; font-weight: 700; }
.qv-path { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.qv-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.875rem;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--primary);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
.meta-item label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}
.meta-item value {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
  display: block;
}
.meta-item value.empty { color: var(--text-muted); font-weight: 400; font-style: italic; }

/* ── Tabs ───────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Table ──────────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .monospace { font-family: 'Courier New', monospace; font-size: 0.8rem; }
.data-table .text-muted { color: var(--text-muted); }
.data-table .icon-check { color: var(--success); }
.data-table .icon-x { color: var(--text-muted); }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.5rem;
}
.page-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-family: inherit;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Cards Stats ─────────────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-content {}
.stat-value { font-size: 1.625rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Admin Sidebar ───────────────────────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.admin-nav-item:hover { background: var(--bg-hover); color: var(--text); }
.admin-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
[data-theme="dark"] .admin-nav-item.active { background: rgba(37,99,235,0.2); }
.admin-nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.admin-nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-content { flex: 1; padding: 2rem; overflow-y: auto; }
.admin-page { display: none; }
.admin-page.active { display: block; }
.admin-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.admin-page-title { font-size: 1.25rem; font-weight: 700; }

/* ── Lineage Graph ───────────────────────────────────────────────────────────── */
.lineage-graph {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow-x: auto;
  min-height: 200px;
  position: relative;
}

.lineage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: var(--text-muted);
  font-size: 0.9rem;
  gap: 0.75rem;
}
.lineage-empty .big-icon { font-size: 2.5rem; }

.lineage-columns {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: fit-content;
  padding: 1rem 0;
}
.lineage-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 200px;
}
.lineage-col-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.25rem;
}
.lineage-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.lineage-node:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }
.lineage-node.current { border-color: var(--primary); border-width: 2px; }
.lineage-node-name { font-size: 0.8rem; font-weight: 600; }
.lineage-node-path { font-size: 0.7rem; color: var(--text-muted); }

.lineage-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
  flex-shrink: 0;
  align-self: center;
}

/* ── Detail page ─────────────────────────────────────────────────────────────── */
.detail-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-type-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.detail-title { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.detail-badges { display: flex; gap: 0.5rem; margin-top: 0.625rem; flex-wrap: wrap; }
.detail-actions { margin-left: auto; display: flex; gap: 0.5rem; }

.detail-owners {
  display: flex;
  gap: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.owner-block label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}
.owner-block .owner-name { font-weight: 600; font-size: 0.9rem; }
.owner-block .owner-email { font-size: 0.8rem; color: var(--text-muted); }

/* ── Empty State ─────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-title { font-size: 1.125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-desc { font-size: 0.875rem; max-width: 320px; }

/* ── Toast ──────────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 400px;
  font-size: 0.875rem;
  animation: slideLeft 0.3s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info    { border-left: 4px solid var(--primary); }
.toast-icon { font-size: 1.125rem; flex-shrink: 0; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; padding: 0; }

/* ── Loading ─────────────────────────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 16px; height: 16px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--bg-hover) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 500; }

/* ── Section card ─────────────────────────────────────────────────────────────── */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Login page ──────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
  padding: 1.5rem;
}
[data-theme="dark"] .login-page {
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
}
.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.login-logo {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 2rem; text-align: center;
}
.login-logo-icon {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.5rem;
  margin-bottom: 1rem;
}
.login-logo h1 { font-size: 1.375rem; }
.login-logo p { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }
.login-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  position: relative;
  margin: 1rem 0;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.btn-azure {
  background: #0078D4;
  color: white;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.9rem;
}
.btn-azure:hover { background: #006AC1; }

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideLeft { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "main";
  }
  .app-sidebar { display: none; }
  .app-sidebar.open {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .cards-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; display: flex; overflow-x: auto; padding: 0.75rem; }
  .admin-nav-item { min-width: 120px; }
}

@media (max-width: 640px) {
  .detail-title { font-size: 1.25rem; }
  .detail-title-row { flex-direction: column; gap: 1rem; }
  .detail-actions { margin-left: 0; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; align-self: flex-end; max-height: 95vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }

/* ── Data Quality Score ─────────────────────────────────────────────────────── */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  vertical-align: middle;
}
.quality-badge.excellent { background: rgba(16,185,129,0.13); color: #059669; }
.quality-badge.good      { background: rgba(37,99,235,0.12);  color: #2563EB; }
.quality-badge.fair      { background: rgba(245,158,11,0.13); color: #D97706; }
.quality-badge.poor      { background: rgba(239,68,68,0.12);  color: #DC2626; }
[data-theme="dark"] .quality-badge.excellent { background: rgba(16,185,129,0.2); color: #34D399; }
[data-theme="dark"] .quality-badge.good      { background: rgba(37,99,235,0.2);  color: #60A5FA; }
[data-theme="dark"] .quality-badge.fair      { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .quality-badge.poor      { background: rgba(239,68,68,0.2);  color: #F87171; }

.quality-bar-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}
.quality-bar-label {
  font-size: 0.75rem;
  width: 80px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.quality-bar-track {
  flex: 1;
  height: 7px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.quality-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(.4,0,.2,1);
}
.quality-bar-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 22px;
  text-align: right;
}

.quality-score-ring {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.quality-score-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.quality-score-circle.excellent { background: rgba(16,185,129,0.13); color: #059669; }
.quality-score-circle.good      { background: rgba(37,99,235,0.12);  color: #2563EB; }
.quality-score-circle.fair      { background: rgba(245,158,11,0.13); color: #D97706; }
.quality-score-circle.poor      { background: rgba(239,68,68,0.12);  color: #DC2626; }
[data-theme="dark"] .quality-score-circle.excellent { background: rgba(16,185,129,0.2); color: #34D399; }
[data-theme="dark"] .quality-score-circle.good      { background: rgba(37,99,235,0.2);  color: #60A5FA; }
[data-theme="dark"] .quality-score-circle.fair      { background: rgba(245,158,11,0.2); color: #FCD34D; }
[data-theme="dark"] .quality-score-circle.poor      { background: rgba(239,68,68,0.2);  color: #F87171; }

.quality-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.625rem;
  margin-top: 0.875rem;
}
.quality-dim-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
}
.quality-dim-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.quality-dim-score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.quality-dim-max {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.15rem;
}
.quality-dim-bar {
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.35rem;
}
.quality-dim-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.quality-low-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.quality-low-item:last-child { border-bottom: none; }
.quality-low-name {
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  text-decoration: none;
}
.quality-low-name:hover { text-decoration: underline; }

/* ── Plan upgrade badges on nav items ──────────────────────────────────── */
.plan-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  margin-left: auto;
  flex-shrink: 0;
  pointer-events: none;
}
.plan-badge-starter {
  background: rgba(16,185,129,0.12);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}
.plan-badge-pro {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.3);
}
.plan-badge-enterprise {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.3);
}

/* locked nav item — still visible, slightly muted */
.admin-nav-item.plan-locked {
  opacity: 0.7;
}
.admin-nav-item.plan-locked:hover {
  opacity: 1;
}

/* full-page plan gate card */
.plan-gate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  margin-top: 1rem;
}
.plan-gate-card .gate-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.plan-gate-card .gate-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.plan-gate-card .gate-desc { font-size: 0.875rem; color: var(--text-muted); max-width: 380px; margin-bottom: 1.5rem; line-height: 1.6; }

/* AI FAB upgrade badge */
.ai-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
  pointer-events: none;
}

/* Agent locked card */
.agent-locked-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.agent-locked-banner strong { color: #fbbf24; }
