/* ============================================================
   liquid-glass.css  –  eyeCodeHub Liquid Glass Design System
   Core glassmorphism tokens, surfaces, and components.
   ============================================================ */

/* ----------------------------------------------------------
   1. DESIGN TOKENS  (Custom Properties)
   ---------------------------------------------------------- */
:root {
  /* ---- Glass Surface ---- */
  --glass-bg:             rgba(255, 255, 255, 0.06);
  --glass-bg-strong:      rgba(255, 255, 255, 0.12);
  --glass-bg-sidebar:     rgba(15, 25, 35, 0.72);
  --glass-border:         rgba(255, 255, 255, 0.12);
  --glass-border-strong:  rgba(255, 255, 255, 0.22);
  --glass-shadow:         0 8px 32px rgba(0, 0, 0, 0.35);
  --glass-shadow-hover:   0 12px 40px rgba(0, 0, 0, 0.45);
  --glass-blur:           18px;
  --glass-blur-strong:    26px;

  /* ---- Droplet / Shine Highlight ---- */
  --shine-top:  linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.00) 60%
  );
  --shine-edge: inset 0 1px 0 rgba(255, 255, 255, 0.15);

  /* ---- Radius ---- */
  --radius-panel:    18px;
  --radius-card:     16px;
  --radius-btn-pill: 999px;
  --radius-input:    12px;
  --radius-badge:    8px;
  --radius-sm:       8px;
  --radius-xs:       4px;

  /* ---- Motion ---- */
  --transition-fast:   140ms ease;
  --transition-normal: 200ms ease;
  --transition-slow:   300ms ease;

  /* ---- Typography ---- */
  --font-primary: "Pretendard", -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "Fira Code", "SF Mono",
                  "Cascadia Code", Consolas, monospace;
  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.8125rem; /* 13px */
  --fs-base: 0.9375rem; /* 15px */
  --fs-md:   1.0625rem; /* 17px */
  --fs-lg:   1.25rem;   /* 20px */
  --fs-xl:   1.625rem;  /* 26px */
  --fs-2xl:  2rem;      /* 32px */
  --fs-3xl:  2.5rem;    /* 40px */
  --lh-tight:  1.25;
  --lh-normal: 1.55;
  --lh-loose:  1.75;

  /* ---- Body / Background Colors ---- */
  --color-bg-body:        #0f1923;
  --color-bg-body-end:    #162231;
  --color-text-primary:   rgba(255, 255, 255, 0.92);
  --color-text-secondary: rgba(255, 255, 255, 0.58);
  --color-text-tertiary:  rgba(255, 255, 255, 0.36);
  --color-text-inverse:   #0f1923;

  /* ---- Status Colors ---- */
  --color-ok:   #34d399;
  --color-warn: #fbbf24;
  --color-fail: #f87171;
  --color-info: #60a5fa;

  /* ---- Accent ---- */
  --color-accent:       #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-soft:  rgba(59, 130, 246, 0.18);
  --color-accent-glow:  rgba(59, 130, 246, 0.35);

  /* ---- Sidebar Dimensions ---- */
  --sidebar-width:          260px;
  --sidebar-collapsed-width: 0px;
}

/* ----------------------------------------------------------
   1a. Reduce-Transparency Mode
   ---------------------------------------------------------- */
body[data-reduce-transparency="true"] {
  --glass-bg:          rgba(20, 32, 46, 0.95);
  --glass-bg-strong:   rgba(20, 32, 46, 0.98);
  --glass-bg-sidebar:  rgba(12, 20, 30, 0.97);
  --glass-border:      rgba(255, 255, 255, 0.18);
  --glass-blur:        0px;
  --glass-blur-strong: 0px;
  --shine-top: none;
  --shine-edge: none;
}

/* ----------------------------------------------------------
   2. BASE / BODY
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(
    160deg,
    var(--color-bg-body) 0%,
    var(--color-bg-body-end) 100%
  );
  background-attachment: fixed;
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-accent-hover);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

/* ----------------------------------------------------------
   3. .glass-card  –  Primary Surface
   ---------------------------------------------------------- */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
  overflow: hidden;
}

/* Shine overlay */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shine-top);
  box-shadow: var(--shine-edge);
  pointer-events: none;
  z-index: 0;
}

/* Content sits above shine */
.glass-card > * {
  position: relative;
  z-index: 1;
}

/* Hover lift */
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

/* Static variant: no hover lift */
.glass-card--static:hover {
  transform: none;
  box-shadow: var(--glass-shadow);
}

/* ----------------------------------------------------------
   4. .btn-droplet  –  Pill-shaped CTA
   ---------------------------------------------------------- */
.btn-droplet {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: var(--radius-btn-pill);
  font-family: var(--font-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-accent-hover) 100%
  );
  box-shadow:
    0 2px 8px var(--color-accent-glow),
    var(--shine-edge);
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}

/* Shine */
.btn-droplet::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shine-top);
  pointer-events: none;
}

.btn-droplet:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 16px var(--color-accent-glow),
    var(--shine-edge);
  color: #fff;
}

.btn-droplet:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 1px 4px var(--color-accent-glow);
}

.btn-droplet:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Size: small */
.btn-droplet--sm {
  padding: 0.375rem 1rem;
  font-size: var(--fs-xs);
}

/* Variant: Success */
.btn-droplet--success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3), var(--shine-edge);
}
.btn-droplet--success:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4), var(--shine-edge);
}

/* Variant: Danger */
.btn-droplet--danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3), var(--shine-edge);
}
.btn-droplet--danger:hover {
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), var(--shine-edge);
}

/* Variant: Ghost */
.btn-droplet--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  box-shadow: none;
  border: 1px solid var(--glass-border);
}
.btn-droplet--ghost::before {
  background: none;
}
.btn-droplet--ghost:hover {
  background: var(--glass-bg);
  color: var(--color-text-primary);
  box-shadow: none;
  transform: none;
}
.btn-droplet--ghost:active {
  background: var(--glass-bg-strong);
  box-shadow: none;
}

/* ----------------------------------------------------------
   5. .glass-sidebar  –  Fixed Left Navigation
   ---------------------------------------------------------- */
.glass-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-sidebar);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-slow);
}

.glass-sidebar::-webkit-scrollbar {
  width: 4px;
}
.glass-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

/* ---- Sidebar nav items ---- */
.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  flex: 1;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  margin: 2px 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
  cursor: pointer;
}

.sidebar-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-text-primary);
}

.sidebar-menu-item.active,
.sidebar-menu-item[aria-current="page"] {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}

.sidebar-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-size: 1.125rem;
}

.sidebar-section-label {
  display: block;
  padding: 1rem 1.25rem 0.375rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

/* ----------------------------------------------------------
   6. .glass-table  –  Data Tables
   ---------------------------------------------------------- */
.glass-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-card);
}

.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: var(--fs-sm);
}

.glass-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--glass-border);
}

.glass-table tbody tr {
  transition: background var(--transition-fast);
}

.glass-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.glass-table tbody td {
  padding: 0.625rem 1rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

/* Path cell: truncate long paths */
.glass-table .path-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
}

/* ----------------------------------------------------------
   7. .status-badge  –  Status Pill Badges
   ---------------------------------------------------------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-btn-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.status-badge--ok {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-ok);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-badge--warn {
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warn);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.status-badge--fail {
  background: rgba(248, 113, 113, 0.15);
  color: var(--color-fail);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.status-badge--info {
  background: rgba(96, 165, 250, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(96, 165, 250, 0.25);
}

/* Small dot variant */
.status-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   8. .kpi-card  –  Key Performance Indicator
   ---------------------------------------------------------- */
.kpi-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
}

.kpi-card__value {
  display: block;
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.kpi-card__label {
  display: block;
  margin-top: 0.375rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.kpi-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.kpi-card__trend--up {
  color: var(--color-ok);
}

.kpi-card__trend--down {
  color: var(--color-fail);
}

/* ----------------------------------------------------------
   9. .glass-form  –  Form Controls
   ---------------------------------------------------------- */
.glass-form label,
.glass-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.glass-input,
.glass-select,
.glass-textarea {
  width: 100%;
  padding: 0.6rem 0.875rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-input);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  outline: none;
}

.glass-input::placeholder,
.glass-textarea::placeholder {
  color: var(--color-text-tertiary);
}

.glass-input:hover,
.glass-select:hover,
.glass-textarea:hover {
  border-color: var(--glass-border-strong);
}

.glass-input:focus,
.glass-select:focus,
.glass-textarea:focus {
  border-color: var(--color-accent);
  background: var(--glass-bg-strong);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.glass-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.glass-textarea {
  resize: vertical;
  min-height: 6rem;
}

.glass-form__group {
  margin-bottom: 1.25rem;
}

.glass-form__row {
  display: flex;
  gap: 1rem;
}

.glass-form__row > * {
  flex: 1;
}

.glass-form__error {
  margin-top: 0.25rem;
  font-size: var(--fs-xs);
  color: var(--color-fail);
}

/* Checkbox / radio wrapper */
.glass-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.glass-check input {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
}

/* ----------------------------------------------------------
   10. JOURNAL STYLES
   ---------------------------------------------------------- */
.journal-timeline {
  position: relative;
  padding-left: 2rem;
}

.journal-timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--color-accent) 0%,
    rgba(59, 130, 246, 0.1) 100%
  );
  border-radius: 1px;
}

.timeline-date-marker {
  position: relative;
  margin: 1.5rem 0 0.75rem -2rem;
  padding: 0.35rem 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-btn-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent);
  z-index: 1;
}

.timeline-date-marker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent-glow);
  flex-shrink: 0;
}

.journal-card {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.journal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shine-top);
  box-shadow: var(--shine-edge);
  pointer-events: none;
}

.journal-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow-hover);
}

.journal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.journal-card__time {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
  font-family: var(--font-mono);
}

.journal-card__body {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-loose);
}

/* Progress bar inside journal cards */
.progress-glass {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.progress-glass__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-ok) 100%);
  transition: width var(--transition-slow);
}

/* ----------------------------------------------------------
   11. MILESTONE CARD
   ---------------------------------------------------------- */
.milestone-card {
  position: relative;
  padding: 1.25rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.milestone-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shine-top);
  box-shadow: var(--shine-edge);
  pointer-events: none;
}

.milestone-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow-hover);
}

.milestone-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 1.125rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.milestone-card__content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.milestone-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.25rem;
}

.milestone-card__meta {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.milestone-card--complete .milestone-card__icon {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-ok);
}

/* ----------------------------------------------------------
   12. CALENDAR CELL STYLES
   ---------------------------------------------------------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.calendar-cell:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
}

.calendar-cell--today {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.calendar-cell--selected {
  background: var(--color-accent);
  color: #fff;
}

.calendar-cell--dimmed {
  color: var(--color-text-tertiary);
  opacity: 0.5;
}

.calendar-cell__indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 2px;
}

.calendar-day-label {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.375rem;
}

/* ----------------------------------------------------------
   13. CLAUDE TERMINAL
   ---------------------------------------------------------- */
.claude-terminal {
  position: relative;
  background: rgba(10, 16, 24, 0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

.claude-terminal__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--glass-border);
}

.claude-terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-tertiary);
}
.claude-terminal__dot--red    { background: #ef4444; }
.claude-terminal__dot--yellow { background: #eab308; }
.claude-terminal__dot--green  { background: #22c55e; }

.claude-terminal__title {
  margin-left: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
}

.claude-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--glass-border);
}

.claude-input-bar__prompt {
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.claude-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  caret-color: var(--color-accent);
}

.claude-output {
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  line-height: var(--lh-loose);
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.claude-output::-webkit-scrollbar {
  width: 4px;
}
.claude-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.claude-output .cmd-line {
  color: var(--color-ok);
}

.claude-output .error-line {
  color: var(--color-fail);
}

.claude-output .info-line {
  color: var(--color-info);
}

.claude-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
}

/* ----------------------------------------------------------
   14. DEVHUB STYLES
   ---------------------------------------------------------- */
.category-card {
  position: relative;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--shine-top);
  box-shadow: var(--shine-edge);
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

.category-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 1.375rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.category-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.category-card__count {
  font-size: var(--fs-xs);
  color: var(--color-text-tertiary);
  position: relative;
  z-index: 1;
}

/* Info card */
.info-card {
  padding: 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-loose);
}

.info-card__title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-btn-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.tag-pill:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: rgba(59, 130, 246, 0.3);
}

.tag-pill.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.tag-pill__count {
  font-size: 0.625rem;
  opacity: 0.6;
}

/* Markdown rendered content */
.md-rendered {
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
  color: var(--color-text-secondary);
}

.md-rendered h1,
.md-rendered h2,
.md-rendered h3,
.md-rendered h4,
.md-rendered h5,
.md-rendered h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  line-height: var(--lh-tight);
}

.md-rendered h1 { font-size: var(--fs-xl); }
.md-rendered h2 { font-size: var(--fs-lg); }
.md-rendered h3 { font-size: var(--fs-md); }

.md-rendered p {
  margin: 0.75em 0;
}

.md-rendered code {
  padding: 0.15em 0.4em;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  font-size: 0.875em;
  color: var(--color-accent);
}

.md-rendered pre {
  margin: 1em 0;
  padding: 1rem;
  background: rgba(10, 16, 24, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: var(--fs-xs);
  line-height: var(--lh-loose);
}

.md-rendered pre code {
  background: none;
  padding: 0;
  color: var(--color-text-secondary);
}

.md-rendered blockquote {
  margin: 1em 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--color-accent);
  background: rgba(59, 130, 246, 0.06);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--color-text-secondary);
}

.md-rendered ul,
.md-rendered ol {
  padding-left: 1.5rem;
  margin: 0.75em 0;
}

.md-rendered li {
  margin: 0.25em 0;
}

.md-rendered a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md-rendered img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.md-rendered table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.md-rendered table th,
.md-rendered table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.md-rendered table th {
  font-weight: 600;
  color: var(--color-text-primary);
}

.md-rendered hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 1.5em 0;
}

/* Diff view */
.diff-view {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: var(--lh-loose);
  background: rgba(10, 16, 24, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  padding: 0;
}

.diff-view__line {
  display: flex;
  padding: 0 1rem;
  min-height: 1.5rem;
  align-items: center;
}

.diff-view__line-number {
  width: 3rem;
  text-align: right;
  padding-right: 0.75rem;
  color: var(--color-text-tertiary);
  user-select: none;
  flex-shrink: 0;
}

.diff-view__line-content {
  flex: 1;
  white-space: pre;
}

.diff-view__line--added {
  background: rgba(52, 211, 153, 0.08);
}

.diff-view__line--added .diff-view__line-content {
  color: var(--color-ok);
}

.diff-view__line--removed {
  background: rgba(248, 113, 113, 0.08);
}

.diff-view__line--removed .diff-view__line-content {
  color: var(--color-fail);
}

.diff-view__line--context .diff-view__line-content {
  color: var(--color-text-tertiary);
}

.diff-view__hunk-header {
  padding: 0.375rem 1rem;
  background: rgba(96, 165, 250, 0.06);
  color: var(--color-info);
  font-weight: 600;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* ----------------------------------------------------------
   15. PREFERS-REDUCED-MOTION
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .glass-card:hover,
  .journal-card:hover,
  .category-card:hover,
  .milestone-card:hover {
    transform: none;
  }
}

/* ----------------------------------------------------------
   16. FOCUS-VISIBLE
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Remove default outline when not keyboard-navigating */
:focus:not(:focus-visible) {
  outline: none;
}

.btn-droplet:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px var(--color-accent-soft),
    0 2px 8px var(--color-accent-glow);
}

.sidebar-menu-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.glass-input:focus-visible,
.glass-select:focus-visible,
.glass-textarea:focus-visible {
  outline: none; /* They use box-shadow for focus indication */
}

/* ----------------------------------------------------------
   17. RESPONSIVE  –  Sidebar Collapse on Mobile
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .glass-sidebar {
    transform: translateX(-100%);
  }

  .glass-sidebar.is-open {
    transform: translateX(0);
  }

  /* Overlay backdrop when sidebar is open */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .sidebar-overlay.is-visible {
    display: block;
  }

  /* Hamburger trigger */
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .sidebar-toggle:hover {
    background: var(--glass-bg);
  }
}

@media (min-width: 769px) {
  .sidebar-toggle {
    display: none;
  }

  .sidebar-overlay {
    display: none !important;
  }
}
