@import url("https://unpkg.com/open-props@1.7.14/open-props.min.css");

@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap");

@font-face {
  font-family: "Satoshi";
  src: url("./assets/fonts/Satoshi.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}


/* ═══════════════════════════════════════
   AIDC
   DESIGN TOKENS
   ═══════════════════════════════════════ */

:root {
  --aidc-font-sans:
    "Satoshi",
    ui-sans-serif,
    system-ui,
    sans-serif;

  --aidc-font-display:
    "Instrument Serif",
    Georgia,
    serif;

  --aidc-font-mono:
    "Liberation Mono",
    monospace;

  --aidc-bg: #f7f7f5;
  --aidc-surface: #fff;
  --aidc-surface-soft: #f1f1ef;

  --aidc-border: #dededb;
  --aidc-border-soft: #e9e9e6;

  --aidc-text: #111110;
  --aidc-text-secondary: #3f3f3c;
  --aidc-muted: #777773;
  --aidc-disabled: #a5a5a0;

  --aidc-black: #0b0b0a;
  --aidc-white: #fff;

  --aidc-hover: #eeeeeb;
  --aidc-active: #e5e5e1;

  --aidc-danger: #641b1b;
  --aidc-danger-hover: #4d1111;
  --aidc-danger-soft: #f5eaea;

  --aidc-sidebar-width: 240px;
  --aidc-content-width: 1200px;

  --aidc-fast: 140ms ease;

  --aidc-normal:
    220ms cubic-bezier(.22, 1, .36, 1);

  --aidc-slow:
    320ms cubic-bezier(.22, 1, .36, 1);

  --aidc-shadow:
    0 1px 2px rgb(0 0 0 / .04),
    0 8px 24px rgb(0 0 0 / .05);

  --aidc-shadow-dialog:
    0 24px 70px rgb(0 0 0 / .16),
    0 4px 18px rgb(0 0 0 / .08);

  --aidc-shadow-toast:
    0 12px 40px rgb(0 0 0 / .12);
}


/* ═══════════════════════════════════════
   RESET
   ═══════════════════════════════════════ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;

  background:
    var(--aidc-bg);

  color-scheme: light;

  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;

  margin: 0;

  background:
    var(--aidc-bg);

  color:
    var(--aidc-text);

  font-family:
    var(--aidc-font-sans);

  font-size:
    1rem;

  line-height:
    1.5;

  text-rendering:
    optimizeLegibility;

  -webkit-font-smoothing:
    antialiased;

  -moz-osx-font-smoothing:
    grayscale;

  user-select: none;
  -webkit-user-select: none;

  -webkit-tap-highlight-color:
    transparent;

  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button,
[role="button"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

input,
textarea,
select {
  user-select: text;
  -webkit-user-select: text;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus {
  outline: none;
}

:focus-visible {
  outline:
    2px solid var(--aidc-text);

  outline-offset: 3px;
}


/* ═══════════════════════════════════════
   ROOT
   ═══════════════════════════════════════ */

aidc-app {
  display: block;
  min-height: 100dvh;
}


/* ═══════════════════════════════════════
   ICONS
   ═══════════════════════════════════════ */

.aidc-icon {
  display: inline-flex;

  width: 18px;
  height: 18px;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  font-size: 18px;

  line-height: 1;
}

.aidc-icon.large {
  width: 22px;
  height: 22px;

  font-size: 22px;
}


/* ═══════════════════════════════════════
   SHELL
   ═══════════════════════════════════════ */

.aidc-shell {
  display: flex;

  width: 100%;
  min-height: 100dvh;
}

.aidc-main {
  flex: 1;

  width: 100%;
  min-width: 0;

  transition:
    opacity var(--aidc-slow),
    filter var(--aidc-slow),
    transform var(--aidc-slow);
}

.aidc-content {
  width:
    min(
      var(--aidc-content-width),
      100%
    );

  min-width: 0;

  margin-inline: auto;

  padding:
    40px 32px 64px;

  overflow-wrap: anywhere;
}


/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */

.aidc-sidebar {
  position: sticky;
  top: 0;

  z-index: 50;

  display: flex;
  flex-direction: column;

  width:
    var(--aidc-sidebar-width);

  min-width:
    var(--aidc-sidebar-width);

  height: 100dvh;

  padding:
    20px;

  border-right:
    1px solid var(--aidc-border);

  background:
    var(--aidc-surface);
}

.aidc-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-width: 0;

  margin-bottom: 36px;
}

.aidc-brand {
  display: inline-flex;
  align-items: center;

  min-width: 0;

  gap: 10px;

  color:
    var(--aidc-text);

  text-decoration: none;
}

.aidc-brand-mark {
  width: 36px;
  height: 36px;

  display: block;
  flex: 0 0 36px;

  object-fit: contain;

  background: #f0f0ec;
  border-radius: 10px;

  padding: 6px;
  box-sizing: border-box;

  border: 1px solid rgba(0, 0, 0, 0.08);
}

.aidc-brand-copy {
  display: flex;
  flex-direction: column;

  min-width: 0;

  line-height: 1.05;
}

.aidc-brand-copy strong {
  font-size: 15px;
  font-weight: 700;

  letter-spacing: .02em;
}

.aidc-brand-copy small {
  margin-top: 3px;

  color:
    var(--aidc-muted);

  font-size: 10px;
  font-weight: 500;

  letter-spacing: .08em;
  text-transform: uppercase;
}

.aidc-nav {
  display: flex;
  flex-direction: column;

  gap: 3px;
}

.aidc-nav-item {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 40px;

  gap: 11px;

  padding:
    0 12px;

  border-radius: 10px;

  color:
    var(--aidc-muted);

  font-size: 14px;

  text-decoration: none;

  transition:
    background var(--aidc-fast),
    color var(--aidc-fast),
    transform var(--aidc-fast);
}

.aidc-nav-item:hover {
  background:
    var(--aidc-hover);

  color:
    var(--aidc-text);
}

.aidc-nav-item:active {
  background:
    var(--aidc-active);

  transform:
    scale(.985);
}

.aidc-nav-item.active {
  background:
    var(--aidc-hover);

  color:
    var(--aidc-text);

  font-weight: 650;
}

.aidc-nav-item.active::before {
  content: "";

  position: absolute;

  left: 0;
  top: 9px;
  bottom: 9px;

  width: 2px;

  border-radius: 999px;

  background:
    var(--aidc-text);
}

.aidc-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 21px;
  height: 21px;

  margin-left: auto;

  padding-inline: 5px;

  border-radius: 999px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-muted);

  font-family:
    var(--aidc-font-mono);

  font-size: 10px;
}

.aidc-sidebar-spacer {
  flex: 1;
}

.aidc-sidebar-bottom {
  display: flex;
  flex-direction: column;

  gap: 10px;

  padding-top: 20px;

  border-top:
    1px solid var(--aidc-border-soft);
}

.aidc-sidebar-meta {
  display: flex;
  align-items: center;

  gap: 8px;

  color:
    var(--aidc-muted);

  font-size: 12px;
}

.aidc-sidebar-version {
  color:
    var(--aidc-disabled);

  font-family:
    var(--aidc-font-mono);

  font-size: 10px;

  letter-spacing: .02em;
}

.aidc-sidebar .aidc-status-dot {
  width: 6px;
  height: 6px;

  color: #4d6b4d;

  background:
    currentColor;
}

.aidc-mobile-close {
  display: none;
}


/* ═══════════════════════════════════════
   MOBILE HEADER
   ═══════════════════════════════════════ */

.aidc-mobile-header {
  display: none;
}


/* ═══════════════════════════════════════
   PAGE
   ═══════════════════════════════════════ */

.aidc-page {
  width: 100%;
  min-width: 0;

  animation:
    aidc-page-enter
    280ms
    cubic-bezier(.22, 1, .36, 1)
    both;
}

@keyframes aidc-page-enter {
  from {
    opacity: 0;

    filter:
      blur(8px);

    transform:
      translateY(5px);
  }

  to {
    opacity: 1;

    filter:
      blur(0);

    transform:
      translateY(0);
  }
}

.aidc-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  min-width: 0;

  gap: 24px;

  margin-bottom: 36px;
}

.aidc-page-header > div {
  min-width: 0;
}

.aidc-eyebrow {
  display: block;

  margin-bottom: 8px;

  color:
    var(--aidc-muted);

  font-family:
    var(--aidc-font-mono);

  font-size: 10px;

  font-weight: 600;

  letter-spacing: .12em;

  text-transform: uppercase;
}

.aidc-page h1 {
  margin: 0;

  color:
    var(--aidc-text);

  font-family:
    var(--aidc-font-display);

  font-size:
    clamp(2.25rem, 5vw, 3.4rem);

  font-weight: 400;

  line-height: .98;

  letter-spacing: -.035em;
}

.aidc-page-header p {
  max-width: 580px;

  margin:
    10px 0 0;

  color:
    var(--aidc-muted);

  font-size: 14px;

  line-height: 1.6;
}


/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */

.aidc-button,
.aidc-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 40px;

  gap: 8px;

  padding:
    0 15px;

  border-radius: 10px;

  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;

  transition:
    background var(--aidc-fast),
    border-color var(--aidc-fast),
    color var(--aidc-fast),
    box-shadow var(--aidc-fast),
    transform var(--aidc-fast),
    opacity var(--aidc-fast);
}

.aidc-button-primary {
  border:
    1px solid var(--aidc-black);

  background:
    var(--aidc-black);

  color:
    var(--aidc-white);

  box-shadow:
    0 1px 1px rgb(0 0 0 / .08);
}

.aidc-button-primary:hover {
  background:
    #20201e;

  box-shadow:
    0 5px 16px rgb(0 0 0 / .09);

  transform:
    translateY(-1px);
}

.aidc-button-primary:active {
  transform:
    scale(.97);
}

.aidc-button-secondary {
  border:
    1px solid var(--aidc-border);

  background:
    var(--aidc-surface);

  color:
    var(--aidc-text);
}

.aidc-button-secondary:hover {
  background:
    var(--aidc-hover);

  border-color:
    #c5c5c1;
}

.aidc-button-secondary:active {
  background:
    var(--aidc-active);

  transform:
    scale(.97);
}

.aidc-button-ghost {
  border:
    1px solid transparent;

  background:
    transparent;

  color:
    var(--aidc-muted);
}

.aidc-button-ghost:hover {
  background:
    var(--aidc-hover);

  color:
    var(--aidc-text);
}

.aidc-button:disabled,
.aidc-danger-button:disabled {
  opacity: .45;

  pointer-events: none;
}

.aidc-button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;
}

.aidc-button-loading {
  display: none;
  align-items: center;

  gap: 8px;
}

.is-loading .aidc-button-content {
  display: none;
}

.is-loading .aidc-button-loading {
  display: inline-flex;
}


/* ═══════════════════════════════════════
   ICON BUTTON
   ═══════════════════════════════════════ */

.aidc-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  flex-shrink: 0;

  padding: 0;

  border:
    1px solid var(--aidc-border);

  border-radius: 9px;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-muted);

  transition:
    background var(--aidc-fast),
    border-color var(--aidc-fast),
    color var(--aidc-fast),
    transform var(--aidc-fast),
    box-shadow var(--aidc-fast);
}

.aidc-icon-button:hover {
  background:
    var(--aidc-hover);

  border-color:
    #c3c3bf;

  color:
    var(--aidc-text);

  box-shadow:
    0 2px 8px rgb(0 0 0 / .05);
}

.aidc-icon-button:active {
  background:
    var(--aidc-active);

  transform:
    scale(.91);

  box-shadow: none;
}


/* ═══════════════════════════════════════
   STAT GRID
   ═══════════════════════════════════════ */

.aidc-stat-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 14px;

  margin-bottom: 42px;
}

.aidc-stat-card {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 14px;

  padding: 20px;

  border:
    1px solid var(--aidc-border);

  border-radius: 14px;

  background:
    var(--aidc-surface);

  transition:
    border-color var(--aidc-normal),
    box-shadow var(--aidc-normal),
    transform var(--aidc-normal);
}

.aidc-stat-card:hover {
  border-color:
    #c8c8c4;

  box-shadow:
    var(--aidc-shadow);

  transform:
    translateY(-2px);
}

.aidc-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  flex-shrink: 0;

  border:
    1px solid var(--aidc-border);

  border-radius: 11px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-text);
}

.aidc-stat-card > div:last-child {
  min-width: 0;
}

.aidc-stat-card span {
  display: block;

  color:
    var(--aidc-muted);

  font-size: 12px;
}

.aidc-stat-card strong {
  display: block;

  margin-top: 3px;

  font-size: 21px;
  font-weight: 700;

  line-height: 1.1;
}


/* ═══════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════ */

.aidc-section {
  min-width: 0;
}

.aidc-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 15px;
}

.aidc-section-header > div {
  min-width: 0;
}

.aidc-section-header h2 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 25px;

  font-weight: 400;

  line-height: 1;
}

.aidc-section-header p {
  margin:
    7px 0 0;

  color:
    var(--aidc-muted);

  font-size: 13px;
}

.aidc-text-button {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  flex-shrink: 0;

  color:
    var(--aidc-muted);

  font-size: 12px;
  font-weight: 600;

  text-decoration: none;

  transition:
    color var(--aidc-fast),
    transform var(--aidc-fast);
}

.aidc-text-button:hover {
  color:
    var(--aidc-text);

  transform:
    translateX(2px);
}


/* ═══════════════════════════════════════
   APPLICATION LIST
   ═══════════════════════════════════════ */

.aidc-application-list {
  min-width: 0;

  overflow: hidden;

  border:
    1px solid var(--aidc-border);

  border-radius: 14px;

  background:
    var(--aidc-surface);
}

.aidc-application-row {
  display: grid;

  grid-template-columns:
    minmax(190px, 1.2fr)
    minmax(160px, 1fr)
    auto
    34px;

  align-items: center;

  min-width: 0;

  gap: 18px;

  min-height: 72px;

  padding:
    12px 16px;

  border-bottom:
    1px solid var(--aidc-border-soft);

  transition:
    background var(--aidc-fast);
}

.aidc-application-row:last-child {
  border-bottom: 0;
}

.aidc-application-row:hover {
  background:
    var(--aidc-surface-soft);
}

.aidc-row-main {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 12px;

  text-decoration: none;
}

.aidc-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  flex-shrink: 0;

  border:
    1px solid var(--aidc-border);

  border-radius: 9px;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-text);
}

.aidc-row-info {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.aidc-row-info strong {
  overflow: hidden;

  color:
    var(--aidc-text);

  font-size: 13px;
  font-weight: 650;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.aidc-row-info span {
  margin-top: 2px;

  overflow: hidden;

  color:
    var(--aidc-muted);

  font-size: 11px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.aidc-row-client {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 7px;
}

.aidc-row-client .aidc-mono {
  flex: 1;

  min-width: 0;
}

.aidc-row-open {
  border-color:
    transparent;

  background:
    transparent;
}

.aidc-row-open:hover {
  border-color:
    var(--aidc-border);
}


/* ═══════════════════════════════════════
   STATUS
   ═══════════════════════════════════════ */

.aidc-status {
  display: inline-flex;
  align-items: center;

  width: max-content;

  gap: 6px;

  color:
    var(--aidc-muted);

  font-size: 11px;
  font-weight: 600;

  text-transform: capitalize;

  white-space: nowrap;
}

.aidc-status-active {
  color:
    #466047;
}

.aidc-status-disabled {
  color:
    #8a6666;
}

.aidc-status-dot {
  width: 6px;
  height: 6px;

  flex-shrink: 0;

  border-radius: 50%;

  background:
    currentColor;
}


/* ═══════════════════════════════════════
   SEARCH TOOLBAR
   ═══════════════════════════════════════ */

.aidc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-width: 0;

  gap: 14px;

  margin-bottom: 16px;
}

.aidc-search {
  display: flex;
  align-items: center;

  width:
    min(420px, 100%);

  min-width: 0;

  height: 40px;

  gap: 9px;

  padding:
    0 11px;

  border:
    1px solid var(--aidc-border);

  border-radius: 10px;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-muted);

  transition:
    border-color var(--aidc-fast),
    box-shadow var(--aidc-fast);
}

.aidc-search:focus-within {
  border-color:
    var(--aidc-text);

  box-shadow:
    0 0 0 3px rgb(0 0 0 / .05);
}

.aidc-search input {
  width: 100%;
  min-width: 0;

  padding: 0;

  border: 0;
  outline: 0;

  background: transparent;

  color:
    var(--aidc-text);

  font-size: 13px;
}

.aidc-search input::placeholder {
  color:
    var(--aidc-disabled);
}

.aidc-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 25px;
  height: 25px;

  flex-shrink: 0;

  padding: 0;

  border-radius: 6px;

  background:
    transparent;

  color:
    var(--aidc-muted);
}

.aidc-search-clear:hover {
  background:
    var(--aidc-hover);

  color:
    var(--aidc-text);
}

.aidc-toolbar-count {
  flex-shrink: 0;

  color:
    var(--aidc-muted);

  font-family:
    var(--aidc-font-mono);

  font-size: 11px;
}


/* ═══════════════════════════════════════
   CLIENT IDS
   ═══════════════════════════════════════ */

.aidc-mono {
  display: block;

  min-width: 0;
  max-width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  color:
    var(--aidc-text-secondary);

  font-family:
    var(--aidc-font-mono);

  font-size: 11px;

  line-height: 1.5;

  white-space: nowrap;

  scrollbar-width: thin;

  scrollbar-color:
    var(--aidc-border)
    transparent;

  -webkit-overflow-scrolling: touch;
}

.aidc-mono::-webkit-scrollbar {
  height: 3px;
}

.aidc-mono::-webkit-scrollbar-track {
  background: transparent;
}

.aidc-mono::-webkit-scrollbar-thumb {
  background:
    var(--aidc-border);

  border-radius: 999px;
}

.aidc-copy-field {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 8px;
}

.aidc-copy-field .aidc-mono {
  flex: 1;

  width: 0;
}


/* ═══════════════════════════════════════
   APP SYMBOL
   ═══════════════════════════════════════ */

.aidc-app-symbol {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  flex-shrink: 0;

  border:
    1px solid var(--aidc-border);

  border-radius: 11px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-text);
}

.aidc-app-symbol.large {
  width: 52px;
  height: 52px;

  border-radius: 13px;
}


/* ═══════════════════════════════════════
   APPLICATION DETAILS
   ═══════════════════════════════════════ */

.aidc-detail-topbar {
  margin-bottom: 26px;
}

.aidc-back-link {
  display: inline-flex;
  align-items: center;

  gap: 6px;

  color:
    var(--aidc-muted);

  font-size: 12px;
  font-weight: 600;

  text-decoration: none;

  transition:
    color var(--aidc-fast),
    transform var(--aidc-fast);
}

.aidc-back-link:hover {
  color:
    var(--aidc-text);

  transform:
    translateX(-2px);
}

.aidc-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-width: 0;

  gap: 24px;
}

.aidc-detail-heading {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 15px;
}

.aidc-detail-heading > div:last-child {
  min-width: 0;
}

.aidc-detail-title-row {
  display: flex;
  align-items: center;

  flex-wrap: wrap;

  gap: 10px;
}

.aidc-detail-title-row h1 {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.aidc-detail-heading p {
  max-width: 650px;

  margin:
    7px 0 0;

  overflow: hidden;

  color:
    var(--aidc-muted);

  font-size: 13px;

  text-overflow: ellipsis;
}

.aidc-detail-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;

  margin-top: 26px;
}

.aidc-detail-grid .aidc-card {
  min-height: 0;
}

.aidc-card-section-header {
  padding-bottom: 18px;

  border-bottom:
    1px solid var(--aidc-border-soft);
}

.aidc-card-section-header h2 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 23px;

  font-weight: 400;

  line-height: 1;
}

.aidc-card-section-header p {
  margin:
    7px 0 0;

  color:
    var(--aidc-muted);

  font-size: 12px;

  line-height: 1.5;
}

.aidc-detail-fields {
  min-width: 0;
}

.aidc-detail-field {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 15px;

  padding:
    15px 0;

  border-bottom:
    1px solid var(--aidc-border-soft);
}

.aidc-detail-field:last-child {
  border-bottom: 0;
}

.aidc-detail-field > span:first-child {
  width: 105px;

  flex-shrink: 0;

  color:
    var(--aidc-muted);

  font-size: 11px;
  font-weight: 600;
}

.aidc-detail-field > .aidc-mono,
.aidc-detail-field > time {
  min-width: 0;

  color:
    var(--aidc-text-secondary);

  font-size: 11px;
}

.aidc-config-list {
  margin-top: 2px;
}

.aidc-config-item {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 12px;

  padding:
    14px 0;

  border-bottom:
    1px solid var(--aidc-border-soft);
}

.aidc-config-item:last-child {
  border-bottom: 0;
}

.aidc-config-item > .aidc-icon {
  color:
    var(--aidc-muted);
}

.aidc-config-item > div {
  display: flex;
  flex-direction: column;

  min-width: 0;

  flex: 1;
}

.aidc-config-item strong {
  font-size: 12px;
  font-weight: 650;
}

.aidc-config-item span {
  margin-top: 2px;

  color:
    var(--aidc-muted);

  font-size: 11px;
}

.aidc-config-value {
  flex-shrink: 0;

  color:
    var(--aidc-disabled) !important;

  font-family:
    var(--aidc-font-mono);
}


/* ═══════════════════════════════════════
   TABS
   ═══════════════════════════════════════ */

.aidc-tabs {
  display: flex;
  align-items: flex-end;

  min-width: 0;

  gap: 25px;

  margin-top: 28px;

  overflow-x: auto;

  border-bottom:
    1px solid var(--aidc-border);

  scrollbar-width: thin;

  scrollbar-color:
    var(--aidc-border)
    transparent;
}

.aidc-tabs::-webkit-scrollbar {
  height: 3px;
}

.aidc-tabs::-webkit-scrollbar-thumb {
  background:
    var(--aidc-border);

  border-radius: 999px;
}

.aidc-tab {
  position: relative;

  display: inline-flex;
  align-items: center;

  min-height: 40px;

  flex-shrink: 0;

  gap: 6px;

  padding:
    0 1px 11px;

  color:
    var(--aidc-muted);

  font-size: 12px;
  font-weight: 500;

  text-decoration: none;

  white-space: nowrap;

  transition:
    color var(--aidc-fast);
}

.aidc-tab::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -1px;

  height: 2px;

  border-radius: 999px;

  background:
    var(--aidc-text);

  transform:
    scaleX(0);

  transition:
    transform var(--aidc-normal);
}

.aidc-tab:hover {
  color:
    var(--aidc-text);
}

.aidc-tab.active {
  color:
    var(--aidc-text);

  font-weight: 650;
}

.aidc-tab.active::after {
  transform:
    scaleX(1);
}


/* ═══════════════════════════════════════
   LOADING
   ═══════════════════════════════════════ */

.aidc-loading-card {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 150px;

  gap: 10px;

  border:
    1px solid var(--aidc-border);

  border-radius: 14px;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-muted);

  font-size: 12px;
}

.aidc-spinner {
  display: inline-block;

  width: 15px;
  height: 15px;

  flex-shrink: 0;

  border:
    2px solid var(--aidc-border);

  border-top-color:
    var(--aidc-text);

  border-radius: 50%;

  animation:
    aidc-spin
    650ms
    linear
    infinite;
}

@keyframes aidc-spin {
  to {
    transform:
      rotate(360deg);
  }
}


/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */

.aidc-empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;

  min-height: 250px;

  padding:
    45px 24px;

  border:
    1px solid var(--aidc-border);

  border-radius: 14px;

  background:
    var(--aidc-surface);

  text-align: center;
}

.aidc-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  margin-bottom: 16px;

  border:
    1px solid var(--aidc-border);

  border-radius: 13px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-muted);
}

.aidc-empty-state h3 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 24px;

  font-weight: 400;
}

.aidc-empty-state p {
  max-width: 400px;

  margin:
    7px 0 18px;

  color:
    var(--aidc-muted);

  font-size: 12px;
}


/* ═══════════════════════════════════════
   PLACEHOLDER
   ═══════════════════════════════════════ */

.aidc-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  min-height: 420px;

  padding: 30px;

  text-align: center;
}

.aidc-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;

  margin-bottom: 18px;

  border:
    1px solid var(--aidc-border);

  border-radius: 15px;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-muted);
}

.aidc-placeholder h2,
.aidc-placeholder h1 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 30px;

  font-weight: 400;
}

.aidc-placeholder p {
  max-width: 460px;

  margin:
    8px 0 0;

  color:
    var(--aidc-muted);

  font-size: 13px;
}


/* ═══════════════════════════════════════
   CREATE DIALOG
   ═══════════════════════════════════════ */

.aidc-dialog-backdrop,
.aidc-delete-backdrop {
  position: fixed;
  inset: 0;

  z-index: 100;

  display: block;

  background:
    rgb(0 0 0 / .36);

  backdrop-filter:
    blur(9px);

  -webkit-backdrop-filter:
    blur(9px);

  animation:
    aidc-backdrop-in
    180ms
    ease
    both;
}

@keyframes aidc-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.aidc-dialog {
  position: fixed;

  top:
    max(
      24px,
      8vh
    );

  left: 50%;

  width:
    min(
      500px,
      calc(100vw - 32px)
    );

  max-height:
    calc(100dvh - 48px);

  overflow-y: auto;

  padding: 24px;

  border:
    1px solid var(--aidc-border);

  border-radius: 16px;

  background:
    var(--aidc-surface);

  box-shadow:
    var(--aidc-shadow-dialog);

  transform:
    translateX(-50%);

  animation:
    aidc-dialog-in
    240ms
    cubic-bezier(.22, 1, .36, 1)
    both;
}

@keyframes aidc-dialog-in {
  from {
    opacity: 0;

    filter:
      blur(10px);

    transform:
      translateX(-50%)
      translateY(14px)
      scale(.97);
  }

  to {
    opacity: 1;

    filter:
      blur(0);

    transform:
      translateX(-50%)
      translateY(0)
      scale(1);
  }
}

.aidc-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 18px;

  margin-bottom: 24px;
}

.aidc-dialog-header > div:first-child {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 12px;
}

.aidc-dialog-header h2 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 27px;

  font-weight: 400;

  line-height: 1;
}

.aidc-dialog-header p {
  margin:
    5px 0 0;

  color:
    var(--aidc-muted);

  font-size: 12px;
}

.aidc-dialog-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  flex-shrink: 0;

  border:
    1px solid var(--aidc-border);

  border-radius: 10px;

  background:
    var(--aidc-surface-soft);
}

.aidc-dialog-form {
  min-width: 0;
}

.aidc-field {
  display: block;

  margin-top: 17px;
}

.aidc-field:first-child {
  margin-top: 0;
}

.aidc-field > span {
  display: block;

  color:
    var(--aidc-text);

  font-size: 12px;
  font-weight: 650;
}

.aidc-field > span b {
  color:
    var(--aidc-danger);
}

.aidc-field input,
.aidc-field textarea {
  display: block;

  width: 100%;

  margin-top: 7px;

  padding:
    11px 12px;

  border:
    1px solid var(--aidc-border);

  border-radius: 9px;

  outline: 0;

  background:
    var(--aidc-surface);

  color:
    var(--aidc-text);

  font-size: 13px;

  transition:
    border-color var(--aidc-fast),
    box-shadow var(--aidc-fast);
}

.aidc-field input::placeholder,
.aidc-field textarea::placeholder {
  color:
    var(--aidc-disabled);
}

.aidc-field input:focus,
.aidc-field textarea:focus {
  border-color:
    var(--aidc-text);

  box-shadow:
    0 0 0 3px rgb(0 0 0 / .05);
}

.aidc-field textarea {
  min-height: 100px;

  resize: vertical;
}

.aidc-dialog-note {
  display: flex;
  align-items: flex-start;

  gap: 8px;

  margin-top: 15px;

  padding:
    10px 11px;

  border:
    1px solid var(--aidc-border-soft);

  border-radius: 9px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-muted);

  font-size: 11px;

  line-height: 1.45;
}

.aidc-dialog-actions {
  display: flex;
  justify-content: flex-end;

  gap: 8px;

  margin-top: 22px;
}


/* ═══════════════════════════════════════
   DELETE MODAL
   ═══════════════════════════════════════ */

.aidc-delete-modal {
  position: fixed;

  top: 50%;
  left: 50%;

  z-index: 201;

  width:
    min(
      450px,
      calc(100vw - 32px)
    );

  max-height:
    calc(100dvh - 32px);

  overflow-y: auto;

  padding: 24px;

  border:
    1px solid var(--aidc-border);

  border-radius: 16px;

  background:
    var(--aidc-surface);

  box-shadow:
    var(--aidc-shadow-dialog);

  transform:
    translate(-50%, -50%);

  animation:
    aidc-delete-in
    240ms
    cubic-bezier(.22, 1, .36, 1)
    both;
}

@keyframes aidc-delete-in {
  from {
    opacity: 0;

    filter:
      blur(10px);

    transform:
      translate(-50%, -50%)
      scale(.96);
  }

  to {
    opacity: 1;

    filter:
      blur(0);

    transform:
      translate(-50%, -50%)
      scale(1);
  }
}

.aidc-delete-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 44px;
  height: 44px;

  margin-bottom: 18px;

  border:
    1px solid #decaca;

  border-radius: 11px;

  background:
    var(--aidc-danger-soft);

  color:
    var(--aidc-danger);
}

.aidc-delete-modal h2 {
  margin: 0;

  font-family:
    var(--aidc-font-display);

  font-size: 28px;

  font-weight: 400;

  line-height: 1;
}

.aidc-delete-modal p {
  margin:
    9px 0 0;

  color:
    var(--aidc-muted);

  font-size: 12px;

  line-height: 1.6;
}

.aidc-delete-modal p strong {
  color:
    var(--aidc-text);
}

.aidc-delete-warning {
  display: flex;
  align-items: center;

  gap: 8px;

  margin-top: 17px;

  padding:
    10px 11px;

  border:
    1px solid #e1d2d2;

  border-radius: 9px;

  background:
    var(--aidc-danger-soft);

  color:
    var(--aidc-danger);

  font-size: 11px;
}

.aidc-delete-actions {
  display: flex;
  justify-content: flex-end;

  gap: 8px;

  margin-top: 22px;
}


/* ═══════════════════════════════════════
   DANGER
   ═══════════════════════════════════════ */

.aidc-danger-button {
  border:
    1px solid #c9a9a9;

  background:
    transparent;

  color:
    var(--aidc-danger);
}

.aidc-danger-button:hover {
  border-color:
    #a98282;

  background:
    var(--aidc-danger-soft);

  box-shadow:
    0 3px 10px rgb(70 20 20 / .06);
}

.aidc-danger-button:active {
  background:
    #eddddd;

  transform:
    scale(.97);
}


/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */

.aidc-toast {
  position: fixed;

  right:
    max(
      16px,
      env(safe-area-inset-right)
    );

  bottom:
    max(
      16px,
      env(safe-area-inset-bottom)
    );

  z-index: 1000;

  display: flex;
  align-items: center;

  width:
    min(
      390px,
      calc(100vw - 32px)
    );

  min-height: 48px;

  gap: 10px;

  padding:
    10px 11px;

  border:
    1px solid var(--aidc-border);

  border-radius: 12px;

  background:
    rgb(255 255 255 / .96);

  box-shadow:
    var(--aidc-shadow-toast);

  backdrop-filter:
    blur(16px);

  -webkit-backdrop-filter:
    blur(16px);

  color:
    var(--aidc-text);

  font-size: 12px;

  animation:
    aidc-toast-in
    260ms
    cubic-bezier(.22, 1, .36, 1)
    both;
}

@keyframes aidc-toast-in {
  from {
    opacity: 0;

    filter:
      blur(7px);

    transform:
      translateY(12px)
      scale(.97);
  }

  to {
    opacity: 1;

    filter:
      blur(0);

    transform:
      translateY(0)
      scale(1);
  }
}

.aidc-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  flex-shrink: 0;

  border-radius: 8px;

  background:
    var(--aidc-surface-soft);

  color:
    var(--aidc-text);
}

.aidc-toast-error {
  border-color:
    #ddc7c7;

  color:
    var(--aidc-danger);
}

.aidc-toast-error .aidc-toast-icon {
  background:
    var(--aidc-danger-soft);

  color:
    var(--aidc-danger);
}

.aidc-toast-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  flex-shrink: 0;

  margin-left: auto;

  padding: 0;

  border-radius: 7px;

  background:
    transparent;

  color:
    var(--aidc-muted);
}

.aidc-toast-close:hover {
  background:
    var(--aidc-hover);

  color:
    var(--aidc-text);
}


/* ═══════════════════════════════════════
   MODAL BODY LOCK
   ═══════════════════════════════════════ */

body:has(
  .aidc-dialog-backdrop,
  .aidc-delete-backdrop
) {
  overflow: hidden;
}


/* ═══════════════════════════════════════
   SIDEBAR OVERLAY
   ═══════════════════════════════════════ */

.aidc-sidebar-overlay {
  display: none;
}


/* ═══════════════════════════════════════
   TABLET
   ═══════════════════════════════════════ */

@media (max-width: 900px) {
  .aidc-sidebar {
    width: 210px;
    min-width: 210px;

    padding-inline: 15px;
  }

  .aidc-content {
    padding:
      32px 24px 50px;
  }

  .aidc-detail-grid {
    grid-template-columns:
      1fr;
  }

  .aidc-application-row {
    grid-template-columns:
      minmax(170px, 1fr)
      minmax(130px, 1fr)
      auto
      34px;

    gap: 12px;
  }
}


/* ═══════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════ */

@media (max-width: 760px) {
  .aidc-shell {
    display: block;
  }

  .aidc-sidebar {
    position: fixed;

    top: 0;
    left: 0;

    z-index: 200;

    width: min(290px, 86vw);
    min-width: 0;

    transform:
      translateX(-105%);

    box-shadow:
      20px 0 60px rgb(0 0 0 / .12);

    transition:
      transform var(--aidc-normal);
  }

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

  .aidc-sidebar-overlay {
    position: fixed;
    inset: 0;

    z-index: 150;

    display: block;

    padding: 0;

    background:
      rgb(0 0 0 / .28);

    backdrop-filter:
      blur(5px);

    -webkit-backdrop-filter:
      blur(5px);
  }

  .aidc-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    border-radius: 9px;

    background:
      transparent;

    color:
      var(--aidc-muted);
  }

  .aidc-mobile-close:hover {
    background:
      var(--aidc-hover);

    color:
      var(--aidc-text);
  }

  .aidc-mobile-header {
    position: sticky;
    top: 0;

    z-index: 100;

    display: flex;
    align-items: center;

    height: 56px;

    gap: 10px;

    padding:
      0 16px;

    border-bottom:
      1px solid var(--aidc-border);

    background:
      rgb(255 255 255 / .92);

    backdrop-filter:
      blur(14px);

    -webkit-backdrop-filter:
      blur(14px);
  }

  .aidc-mobile-brand {
    display: flex;
    align-items: baseline;

    gap: 5px;

    color:
      var(--aidc-text);

    font-weight: 700;

    text-decoration: none;
  }

  .aidc-mobile-brand img {
  width: 32px;
  height: 32px;

  display: block;
  flex: 0 0 32px;

  object-fit: contain;

  background: #f0f0ec;
  border-radius: 9px;

  padding: 5px;
  box-sizing: border-box;

  border: 1px solid rgba(0, 0, 0, 0.08);
}

  .aidc-mobile-brand span {
    font-size: 14px;
    letter-spacing: .03em;
  }

  .aidc-mobile-brand small {
    color:
      var(--aidc-muted);

    font-size: 9px;

    font-weight: 500;

    letter-spacing: .08em;

    text-transform: uppercase;
  }

  .aidc-mobile-spacer {
    flex: 1;
  }

  .aidc-content {
    padding:
      28px 18px 45px;
  }

  .aidc-page-header {
    align-items: flex-start;

    flex-direction: column;

    gap: 18px;

    margin-bottom: 28px;
  }

  .aidc-page-header .aidc-button {
    width: 100%;
  }

  .aidc-stat-grid {
    grid-template-columns:
      1fr;

    gap: 9px;

    margin-bottom: 30px;
  }

  .aidc-stat-card {
    padding: 15px;
  }

  .aidc-section-header {
    align-items: flex-start;
  }

  .aidc-toolbar {
    align-items: stretch;

    flex-direction: column;
  }

  .aidc-search {
    width: 100%;
  }

  .aidc-toolbar-count {
    align-self: flex-end;
  }

  .aidc-application-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;

    gap: 8px;

    padding:
      13px;
  }

  .aidc-row-client {
    grid-column:
      1 / -1;

    padding-left: 48px;
  }

  .aidc-row-open {
    grid-column: 2;
    grid-row: 1;

    align-self: center;
  }

  .aidc-application-row > .aidc-status {
    grid-column:
      1 / -1;

    margin-left: 48px;
  }

  .aidc-detail-header {
    align-items: flex-start;

    flex-direction: column;
  }

  .aidc-detail-header .aidc-danger-button {
    width: 100%;
  }

  .aidc-detail-heading {
    width: 100%;
  }

  .aidc-detail-title-row h1 {
    font-size: 34px;
  }

  .aidc-detail-grid {
    margin-top: 20px;
  }

  .aidc-detail-field {
    align-items: flex-start;

    flex-direction: column;

    gap: 6px;
  }

  .aidc-detail-field > span:first-child {
    width: auto;
  }

  .aidc-copy-field {
    width: 100%;
  }

  .aidc-dialog {
    top:
      max(
        12px,
        env(safe-area-inset-top)
      );

    width:
      calc(100vw - 24px);

    max-height:
      calc(100dvh - 24px);

    padding: 20px;
  }

  .aidc-delete-modal {
    width:
      calc(100vw - 24px);

    padding: 20px;
  }
}


/* ═══════════════════════════════════════
   SMALL MOBILE
   ═══════════════════════════════════════ */

@media (max-width: 480px) {
  .aidc-content {
    padding-inline: 14px;
  }

  .aidc-page h1 {
    font-size: 39px;
  }

  .aidc-section-header {
    flex-direction: column;
  }

  .aidc-text-button {
    align-self: flex-start;
  }

  .aidc-detail-title-row h1 {
    max-width: 100%;

    font-size: 32px;
  }

  .aidc-tabs {
    gap: 20px;
  }

  .aidc-dialog-actions,
  .aidc-delete-actions {
    flex-direction: column-reverse;
  }

  .aidc-dialog-actions .aidc-button,
  .aidc-delete-actions .aidc-button,
  .aidc-delete-actions .aidc-danger-button {
    width: 100%;
  }

  .aidc-toast {
    right: 10px;
    bottom: 10px;

    width:
      calc(100vw - 20px);
  }
}


/* ═══════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration:
      1ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      1ms !important;
  }
}