/* Ghost / Outline button styling for dashboard */
.btn-ghost {
  background: transparent;
  border-radius: .375rem;
  box-shadow: none;
  padding: .35rem .6rem;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, transform .06s ease;
}

.btn-ghost:hover {
  background-color: rgba(0,0,0,0.04);
}

.btn-ghost:active {
  background-color: rgba(0,0,0,0.06);
  transform: translateY(1px);
}

.btn-ghost .bi {
  font-size: 1rem;
  vertical-align: -0.12em;
}

/* Optional smaller spacing for icons */
.btn-ghost.ms-2 { margin-left: .5rem; }
/* Dashboard scoped ThoughtStream styles (moved from inline in Dashboard.cshtml) */

/* Import fonts used by the dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Libre+Baskerville:wght@400;700&display=swap');

/* --- Theme tokens (kept, adjusted) --- */
:root{
  --ts-primary: #78716C;
  --ts-secondary: #A8A29E;
  --ts-tertiary: #1C1917;
  --ts-bg: #FAFAF9;
  --ts-surface: #FFFFFF; /* use white surfaces for card panels */
  --ts-surface-muted: #F7F6F4;
  --ts-surface-raised: #F5F5F4;
  --ts-text-primary: #1C1917;
  --ts-text-secondary: #6b6b67;
  --ts-border-subtle: #E7E5E4;
  --ts-border-medium: #D6D3D1;
  --ts-focus-ring: 0 0 0 2px rgba(55,65,81,0.06);
}

/* Page baseline */
.ts-root {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px;
  background: var(--ts-bg);
  color: var(--ts-text-primary);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  box-sizing: border-box;
}

/* Headings */
.hero-full-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--ts-tertiary);
}
.section-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 20px;
  margin: 0 0 12px 0;
  color: var(--ts-tertiary);
  font-weight: 600;
}

/* Card surface adjustments to match screenshot (light, subtle shadow) */
.card-style {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border-subtle);
  padding: 28px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 0 rgba(16,24,40,0.02);
}

/* Icon (ghost/outline) button used in lists */
.ts-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ts-primary);
  border-radius: 0;
  cursor: pointer;
}
.ts-icon-btn:hover {
  background: var(--ts-surface-raised);
  border-color: var(--ts-border-medium);
}

/* Button token classes (optionally used) */
.ts-btn { border-radius: 0; font-family: Inter, system-ui, -apple-system; cursor: pointer; display:inline-flex; align-items:center; gap:8px; }
.ts-btn--primary {
  background: var(--ts-primary);
  color: var(--ts-bg);
  border: 1px solid var(--ts-primary);
  padding: 12px 24px;
  font-weight: 600;
}
.ts-btn--primary:hover { background: #57534E; }
.ts-btn--secondary {
  background: transparent;
  color: var(--ts-primary);
  border: 1px solid var(--ts-border-medium);
  padding: 12px 24px;
  font-weight: 600;
}
.ts-btn--ghost {
  background: transparent;
  color: var(--ts-primary);
  border: none;
  padding: 12px 24px;
  font-weight: 600;
}

/* Product table */
.product-table { width: 100%; border-collapse: collapse; }
.product-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 8px 12px 14px 0;
  color: var(--ts-text-primary);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.product-table td {
  padding: 14px 0;
  vertical-align: middle;
  color: var(--ts-text-secondary);
  font-size: 14px;
}
.product-table tbody tr {
  border-bottom: 1px solid var(--ts-border-subtle);
}
.product-table tbody tr:hover {
  background: var(--ts-surface-muted);
}

/* Make ID / key cells lighter */
.product-table td strong {
  color: var(--ts-text-primary);
  font-weight: 600;
  display: inline-block;
}

/* Status badges styled like the screenshot */
.badge {
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.02em;
}

/* Specific status tokens */
.badge--draft {
  color: #6b6b67;
  background: transparent;
  border: 1px solid var(--ts-border-subtle);
}
.badge--completed {
  color: #15803d;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}
.badge--failed {
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fecaca;
}

/* Override: remove Bootstrap .bg-info background when used with .badge
   Keeps a subtle border and text color consistent with design.
*/
.badge.bg-info {
  background: transparent !important;
  color: var(--ts-text-secondary) !important;
  border: 1px solid var(--ts-border-subtle) !important;
  box-shadow: none !important;
}

/* Project list right-aligned actions */
.text-center { text-align: center; }

/* Upload / Drop zone */
.upload-container {
  border: 1px dashed var(--ts-border-subtle);
  padding: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(250,250,250,0.8), rgba(255,255,255,0.6));
}
.upload-container .upload-icon { font-size: 28px; color: var(--ts-border-medium); }
.upload-container h3 { margin: 0 0 4px; font-size: 16px; color: var(--ts-text-primary); }
.upload-container p { margin: 0; color: var(--ts-text-secondary); font-size: 13px; }

/* File list small table tweaks */
.table-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }

/* Credit card block (right-hand resource panel look) */
.credit-card {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border-subtle);
  padding: 12px 14px;
  border-radius: 8px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-width: 220px;
}
.credit-label { display:block; font-size: 12px; color: var(--ts-text-secondary); }
.credit-value { font-size: 20px; font-weight: 700; color: var(--ts-tertiary); }

/* Modal adjustments */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0,0,0,0.45); /* dark backdrop */
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 20px; /* space for small screens */
  box-sizing: border-box;
}

.modal.is-open {
  display: flex; /* show as centered flex container */
}

/* Modal content card */
.modal .modal-content {
  width: 100%;
  max-width: 900px;
  background: var(--ts-surface, #fff);
  border: 1px solid var(--ts-border-subtle, #e7e5e4);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

/* Ensure close button is positioned inside header and not affecting layout */
.modal .modal-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }

/* Small helpers left in place */
.flex-center { display: flex; gap: 8px; align-items: center; justify-content: center; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }

/* Header layout: ensure left/right spacing */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* header-right layout */
.dashboard-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Token summary: place to the right of the credit card */
.token-summary {
    display: none; /* hidden by default; JS toggles .is-visible */
    align-items: center;
    gap: 12px;
    /* keep it visually separated from credit-card */
    margin-left: 12px;
}
.token-summary.is-visible {
    display: flex;
}

/* token circle styling */
.token-summary .token-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #000;
    color: #ffd400; /* yellow */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.token-summary .token-label {
    color: #222;
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 768px) {
    .token-summary { gap: 8px; }
    .token-summary .token-circle { width: 52px; height: 52px; font-size:16px; }
}