/* SADA License Center — Visual Redesign 2026-10-25 */
/* Professional enterprise interface with refined visual hierarchy */
/* Uses SADA design system accent colors, not hardcoded gold */

/* ============================================
   GLOBAL REFINEMENTS
   ============================================ */

:root {
  /* Enhanced spacing scale */
  --lc-space-xs: 4px;
  --lc-space-sm: 8px;
  --lc-space-md: 16px;
  --lc-space-lg: 24px;
  --lc-space-xl: 32px;
  --lc-space-2xl: 48px;
  
  /* Enhanced shadows */
  --lc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --lc-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --lc-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.08);
  --lc-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12), 0 12px 16px rgba(0, 0, 0, 0.08);
  
  /* Enhanced transitions */
  --lc-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --lc-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --lc-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   SHELL & LAYOUT
   ============================================ */

.shell {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: var(--lc-space-xl) 0 var(--lc-space-2xl);
}

@media (max-width: 700px) {
  .shell {
    width: calc(100% - 32px);
    padding: var(--lc-space-lg) 0 var(--lc-space-xl);
  }
}

/* ============================================
   HEADER
   ============================================ */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lc-space-lg);
  margin-bottom: var(--lc-space-xl);
  padding-bottom: var(--lc-space-lg);
  border-bottom: 2px solid var(--line, rgba(255, 255, 255, 0.11));
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--lc-space-md);
}

.mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  padding: 6px;
  background: var(--sada-logo-surface, #fff);
  border: 2px solid var(--accent, #059669);
  box-shadow: var(--lc-shadow-md);
  overflow: hidden;
  transition: transform var(--lc-transition-base);
}

.mark:hover {
  transform: scale(1.05);
}

.mark-symbol {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.2;
}

.brand .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #059669);
  margin-bottom: 4px;
}

.brand-controls {
  display: flex;
  align-items: center;
  gap: var(--lc-space-md);
  flex-wrap: wrap;
}

.accent-picker {
  display: flex;
  align-items: center;
  gap: var(--lc-space-sm);
  font-size: 13px;
  color: var(--quiet, #aeb3b8);
  font-weight: 600;
}

.accent-picker select,
.accent-picker input {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  /* --field is the theme-aware input surface. --surface has no light-mode
     value, so painting the picker with it left dark ink on a dark box. */
  background: var(--field, #111b1d);
  color: var(--text, #f5f5f5);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--lc-transition-fast);
}

.accent-picker select:hover,
.accent-picker input:hover {
  border-color: var(--accent, #059669);
}

.accent-picker select:focus,
.accent-picker input:focus {
  outline: none;
  border-color: var(--accent-light, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #059669) 22%, transparent);
}

.accent-picker input[type="color"] {
  width: 40px;
  height: 40px;
  padding: 4px;
  cursor: pointer;
}

#language {
  min-width: 130px;
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--lc-space-md);
  }
  
  .brand-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .mark {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
}

/* ============================================
   NAVIGATION RAIL
   ============================================ */

.area-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: 0 0 var(--lc-space-lg);
  padding: var(--lc-space-md) 0;
  background: color-mix(in srgb, var(--workspace, #101719) 92%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  box-shadow: var(--lc-shadow-sm);
}

.area-nav-in {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lc-space-sm);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line, rgba(255, 255, 255, 0.11)) transparent;
  padding-bottom: 4px;
}

.area-nav-in::-webkit-scrollbar {
  height: 6px;
}

.area-nav-in::-webkit-scrollbar-track {
  background: transparent;
}

.area-nav-in::-webkit-scrollbar-thumb {
  background: var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 10px;
}

.area-link {
  display: inline-flex;
  align-items: center;
  gap: var(--lc-space-sm);
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  background: var(--panel, #1b2527);
  color: var(--quiet, #aeb3b8);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: all var(--lc-transition-base);
  white-space: nowrap;
  user-select: none;
}

.area-link:hover {
  color: var(--text, #eff3f0);
  border-color: color-mix(in srgb, var(--accent, #059669) 50%, var(--line, rgba(255, 255, 255, 0.11)));
  background: color-mix(in srgb, var(--accent, #059669) 8%, var(--panel, #1b2527));
  transform: translateY(-2px);
  box-shadow: var(--lc-shadow-md);
}

.area-link:focus-visible {
  outline: 2px solid var(--accent-light, #10b981);
  outline-offset: 3px;
}

.area-link.active {
  color: var(--accent-ink, color-mix(in srgb, var(--accent, #059669) 64%, #ffffff));
  border-color: var(--accent, #059669);
  background: color-mix(in srgb, var(--accent, #059669) 15%, var(--panel, #1b2527));
  box-shadow: var(--lc-shadow-md);
}

.area-link .area-ico {
  font-size: 14px;
  opacity: 0.9;
}

.area-link.area-owner,
.area-link.area-website {
  border-style: dashed;
}

.area-link.area-owner.active,
.area-link.area-website.active {
  border-style: solid;
}

@media (max-width: 700px) {
  .area-nav {
    top: 0;
    padding: var(--lc-space-sm) 0;
  }
  
  .area-nav-in {
    gap: 6px;
  }
  
  .area-link {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--panel, #1b2527);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 20px;
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--lc-shadow-md);
  backdrop-filter: blur(12px);
  transition: box-shadow var(--lc-transition-base);
  margin-bottom: var(--lc-space-lg);
}

.card:hover {
  box-shadow: var(--lc-shadow-lg);
}

.card.section-card {
  border-radius: 24px;
  background: linear-gradient(145deg, var(--panel, #1b2527), color-mix(in srgb, var(--panel, #1b2527) 95%, transparent));
  position: relative;
  overflow: hidden;
}

.card.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent, #059669), var(--accent-light, #10b981));
  opacity: 0.6;
}

.card.section-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 var(--lc-space-md);
  color: var(--text, #eff3f0);
}

.card.section-card h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light, #10b981);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, #059669) 20%, transparent);
  flex: 0 0 auto;
}

.card h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 var(--lc-space-md);
  color: var(--text, #eff3f0);
}

.card p {
  color: var(--quiet, #aeb3b8);
  line-height: 1.6;
  font-size: 14px;
  margin: 0 0 var(--lc-space-md);
}

.login {
  width: min(480px, 100%);
  margin: clamp(40px, 10vh, 120px) auto 0;
}

.login h2 {
  font-size: 28px;
  margin-bottom: var(--lc-space-sm);
}

@media (max-width: 700px) {
  .card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .card.section-card {
    border-radius: 18px;
  }
}

/* ============================================
   HERO CARD
   ============================================ */

.license-center-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--lc-space-lg);
  margin: 0 0 var(--lc-space-lg);
  padding: clamp(28px, 3.5vw, 36px);
  border: 1px solid color-mix(in srgb, var(--accent, #059669) 30%, var(--line, rgba(255, 255, 255, 0.11)));
  border-left: 4px solid var(--accent, #059669);
  border-radius: 24px;
  background: 
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--accent, #059669) 15%, transparent), transparent 40%),
    linear-gradient(135deg, var(--panel, #1b2527), color-mix(in srgb, var(--panel, #1b2527) 90%, var(--workspace, #101719)));
  box-shadow: var(--lc-shadow-lg);
  position: relative;
  overflow: hidden;
}

/* The hero emblem is the shared Imigongo lattice (css/imigongo.css) so the
   accent-following artwork lives in one place. A diagonal stripe used to sit
   here and outrank that file; the artwork replaces it. */

.license-center-hero > * {
  position: relative;
  z-index: 1;
}

.license-center-hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 3.5vw, 36px);
  letter-spacing: -0.04em;
  font-weight: 700;
  line-height: 1.2;
}

.license-center-hero p {
  max-width: 640px;
  color: var(--quiet, #aeb3b8);
  line-height: 1.65;
  font-size: 15px;
  margin: 0;
}

.license-center-hero .hero-kicker {
  color: var(--accent-light, #10b981);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

@media (max-width: 800px) {
  .license-center-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

label {
  display: grid;
  gap: 8px;
  color: var(--text, #eff3f0);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

label small,
label .muted {
  font-weight: 400;
  color: var(--quiet, #aeb3b8);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  background: var(--field, #111b1d);
  color: var(--text, #eff3f0);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: all var(--lc-transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: var(--quiet, #aeb3b8);
  opacity: 0.7;
}

input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--accent, #059669) 40%, var(--line, rgba(255, 255, 255, 0.11)));
  background: color-mix(in srgb, var(--field, #111b1d) 95%, var(--accent, #059669));
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-light, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-light, #10b981) 18%, transparent);
  background: var(--field, #111b1d);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--lc-space-md) var(--lc-space-lg);
}

.full {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .full {
    grid-column: auto;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

button,
a.secondary {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-light, #10b981), var(--accent-dark, #047857));
  color: var(--accent-contrast, #17130a);
  box-shadow: var(--lc-shadow-md);
  transition: all var(--lc-transition-base);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}

button:hover,
a.secondary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: var(--lc-shadow-lg);
}

button:active,
a.secondary:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

button:focus-visible {
  outline: 2px solid var(--accent-light, #10b981);
  outline-offset: 3px;
}

button.secondary,
a.secondary {
  background: var(--panel-raised, #222d2f);
  color: var(--text, #eff3f0);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  box-shadow: none;
}

button.secondary:hover,
a.secondary:hover {
  background: color-mix(in srgb, var(--accent, #059669) 10%, var(--panel-raised, #222d2f));
  border-color: color-mix(in srgb, var(--accent, #059669) 40%, var(--line, rgba(255, 255, 255, 0.11)));
  color: var(--accent-light, #10b981);
  filter: none;
}

button.danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

button.danger:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lc-space-md);
  margin-top: var(--lc-space-lg);
  flex-wrap: wrap;
}

.actions-right {
  display: flex;
  gap: var(--lc-space-sm);
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .actions {
    align-items: stretch;
    flex-direction: column;
  }
  
  .actions > button,
  .actions > .actions-right,
  .actions-right > button {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* ============================================
   TABLES
   ============================================ */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 16px;
  background: var(--panel, #1b2527);
  box-shadow: var(--lc-shadow-sm);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

th,
td {
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.09));
  text-align: left;
  padding: 14px 16px;
  line-height: 1.5;
  vertical-align: middle;
}

th {
  color: var(--quiet, #aeb3b8);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--panel-raised, #222d2f);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

td {
  color: var(--text, #eff3f0);
}

tbody tr {
  transition: background var(--lc-transition-fast);
}

tbody tr:hover {
  background: color-mix(in srgb, var(--accent, #059669) 6%, var(--panel, #1b2527));
}

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

code {
  color: var(--accent-light, #10b981);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-scroll,
.device-scroll {
  max-height: 400px;
  overflow: auto;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 16px;
  background: var(--panel, #1b2527);
}

.history-scroll table,
.device-scroll table {
  min-width: 800px;
}

/* ============================================
   STATUS PILLS
   ============================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, #45d483 15%, var(--panel, #1b2527));
  color: #8fe0bb;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  border: 1px solid color-mix(in srgb, #45d483 35%, var(--line, rgba(255, 255, 255, 0.11)));
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* ============================================
   NOTICES
   ============================================ */

.notice {
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: var(--lc-space-md);
  font-size: 14px;
  line-height: 1.55;
  background: var(--panel-raised, #222d2f);
  color: var(--text, #eff3f0);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
}

.notice.error {
  background: color-mix(in srgb, #dc2626 15%, var(--panel-raised, #222d2f));
  color: #ffd2d2;
  border-color: color-mix(in srgb, #dc2626 40%, var(--line, rgba(255, 255, 255, 0.11)));
}

.notice.success {
  background: color-mix(in srgb, #059669 15%, var(--panel-raised, #222d2f));
  color: #c8f1d8;
  border-color: color-mix(in srgb, #059669 40%, var(--line, rgba(255, 255, 255, 0.11)));
}

/* ============================================
   TOOLBAR
   ============================================ */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--lc-space-lg);
  margin-bottom: var(--lc-space-lg);
  flex-wrap: wrap;
}

.toolbar h2 {
  margin-bottom: 8px;
}

.toolbar p {
  margin: 0;
}

#dashboard > .toolbar {
  margin-bottom: var(--lc-space-xl);
}

#dashboard > .toolbar h2 {
  margin: 6px 0;
  font-size: 28px;
}

@media (max-width: 980px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  #dashboard > .toolbar .actions-right {
    justify-content: flex-start;
  }
}

/* ============================================
   SEARCH / FILTER PANEL
   ============================================ */

.license-search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 0.7fr)) auto;
  gap: var(--lc-space-md);
  align-items: end;
  margin: 0 0 var(--lc-space-lg);
  padding: var(--lc-space-md);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 16px;
  background: var(--panel-raised, #222d2f);
}

.license-search-panel label {
  gap: 6px;
  font-size: 12px;
  color: var(--quiet, #aeb3b8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.license-search-panel input,
.license-search-panel select {
  padding: 11px 13px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.license-search-panel .search-reset {
  height: 44px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .license-search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .license-search-panel label:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .license-search-panel {
    grid-template-columns: 1fr;
  }
  
  .license-search-panel label:first-child {
    grid-column: auto;
  }
}

/* ============================================
   STAT CARDS
   ============================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--lc-space-md);
  margin-bottom: var(--lc-space-lg);
}

.stat {
  padding: 20px 24px;
  background: var(--panel-raised, #222d2f);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-radius: 16px;
  transition: all var(--lc-transition-base);
}

.stat:hover {
  border-color: color-mix(in srgb, var(--accent, #059669) 30%, var(--line, rgba(255, 255, 255, 0.11)));
  box-shadow: var(--lc-shadow-md);
}

.stat strong {
  display: block;
  font-size: 32px;
  margin-top: 8px;
  color: var(--text, #eff3f0);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.stat .stat-label {
  color: var(--quiet, #aeb3b8);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

#authority-toast-stack {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 12px;
  width: min(400px, calc(100% - 48px));
  pointer-events: none;
}

.authority-toast {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.11));
  border-left: 4px solid var(--accent, #059669);
  border-radius: 16px;
  background: var(--panel-raised, #222d2f);
  color: var(--text, #eff3f0);
  box-shadow: var(--lc-shadow-xl);
  animation: authority-toast-in 0.25s ease-out;
  pointer-events: none;
}

.authority-toast.success {
  border-left-color: #45d483;
}

.authority-toast.error {
  border-left-color: #ff7777;
}

.authority-toast .toast-symbol {
  color: var(--accent-light, #10b981);
  font-weight: 900;
  font-size: 16px;
}

.authority-toast.success .toast-symbol {
  color: #45d483;
}

.authority-toast.error .toast-symbol {
  color: #ff9b9b;
}

.authority-toast button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  margin: -7px -8px -7px 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--quiet, #aeb3b8);
  box-shadow: none;
  font-size: 15px;
  line-height: 1;
  pointer-events: auto;
}

.authority-toast button:hover {
  background: color-mix(in srgb, var(--accent, #059669) 16%, transparent);
  color: var(--text, #eff3f0);
}

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

/* ============================================
   DIALOGS / MODALS
   ============================================ */

#authority-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
}

#authority-dialog-root[hidden] {
  display: none;
}

.authority-dialog {
  width: min(720px, 100%);
  max-height: min(800px, calc(100vh - 48px));
  overflow: auto;
  padding: 32px;
  border: 1px solid color-mix(in srgb, var(--accent, #059669) 35%, var(--line, rgba(255, 255, 255, 0.11)));
  border-radius: 24px;
  background: linear-gradient(155deg, var(--panel, #1b2527), var(--workspace, #101719) 75%);
  box-shadow: var(--lc-shadow-xl);
  animation: authority-dialog-in 0.3s ease-out;
}

@keyframes authority-dialog-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.authority-dialog h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.authority-dialog p {
  color: var(--quiet, #aeb3b8);
  line-height: 1.6;
  font-size: 14px;
}

.authority-dialog-fields {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.authority-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 700px) {
  .authority-dialog {
    padding: 24px 20px;
    max-height: calc(100dvh - 32px);
  }
  
  .authority-dialog-actions {
    flex-wrap: wrap;
  }
  
  .authority-dialog-actions button {
    flex: 1 1 auto;
  }
}

/* ============================================
   LIGHT MODE
   ============================================ */

@media (prefers-color-scheme: light) {
  :root {
    --workspace: #f4f6f3;
    --panel: #ffffff;
    --panel-raised: #f8faf7;
    --field: #ffffff;
    --text: #1a2423;
    --quiet: #526461;
    --line: rgba(0, 0, 0, 0.09);
  }
  
  .card {
    box-shadow: var(--lc-shadow-md);
  }
  
  .card:hover {
    box-shadow: var(--lc-shadow-lg);
  }
  
  .license-center-hero {
    background: linear-gradient(135deg, #e8ede6, #f4f6f3);
  }
  
  .status-pill {
    color: #1a6a4a;
    background: #e1f2e9;
    border-color: #b5dac3;
  }
  
  .notice.error {
    background: #fff0ee;
    color: #872c37;
    border-color: #e9b8b7;
  }
  
  .notice.success {
    background: #e5f5ea;
    color: #205d3c;
    border-color: #aad2b9;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
