/* ==========================================================================
   QueryLab - Professional Developer Theme System
   Inspired by: GitHub Dark, VS Code, DataGrip, PostgreSQL Docs & Linear
   ========================================================================== */

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

:root {
  /* Canvas & Background Colors (GitHub Dark / Solid Dev Palette) */
  --canvas-default: #0d1117;
  --canvas-subtle: #161b22;
  --canvas-overlay: #1c2128;
  --canvas-inset: #090d13;
  --canvas-highlight: #21262d;

  /* Border Colors */
  --border-default: #30363d;
  --border-muted: #21262d;
  --border-subtle: rgba(240, 246, 252, 0.08);
  --border-hover: #58a6ff;
  --border-active: #1f6feb;

  /* Foreground & Text Colors */
  --fg-default: #e6edf3;
  --fg-muted: #8b949e;
  --fg-subtle: #6e7681;
  --fg-on-emphasis: #ffffff;

  /* Accent & Functional Colors */
  --accent-primary: #1f6feb;
  --accent-primary-hover: #388bfd;
  --accent-fg: #58a6ff;
  --accent-subtle: rgba(56, 139, 253, 0.12);
  --accent-border: rgba(56, 139, 253, 0.35);

  /* Success Colors (SQL Execution / Passes) */
  --success-fg: #3fb950;
  --success-emphasis: #238636;
  --success-emphasis-hover: #2ea043;
  --success-subtle: rgba(46, 160, 67, 0.12);
  --success-border: rgba(63, 185, 80, 0.35);

  /* Warning / Amber Colors */
  --warning-fg: #d29922;
  --warning-emphasis: #bb8009;
  --warning-subtle: rgba(187, 128, 9, 0.12);
  --warning-border: rgba(210, 153, 34, 0.35);

  /* Danger / Error Colors */
  --danger-fg: #f85149;
  --danger-emphasis: #da3633;
  --danger-subtle: rgba(248, 81, 73, 0.12);
  --danger-border: rgba(248, 81, 73, 0.35);

  /* SQL Syntax Token Colors */
  --sql-kw: #79c0ff;
  --sql-fn: #d2a8ff;
  --sql-str: #7ee787;
  --sql-num: #ffa657;
  --sql-cmt: #8b949e;
  --sql-tbl: #ff7b72;

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Geometry */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  /* Elevations (Subtle & Crisp, No Diffuse Glow) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.36);
  --shadow-panel: 0 0 0 1px var(--border-default), 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Base & Global Resets
   ========================================================================== */

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

body {
  font-family: var(--font-sans);
  background-color: var(--canvas-default);
  color: var(--fg-default);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--canvas-default);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-xs);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-subtle);
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--fg-default);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 0;
}

p {
  color: var(--fg-muted);
}

a {
  color: var(--accent-fg);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (max-width: 768px) {
  .app-container {
    padding: 1.25rem 1rem 3rem;
  }
}

/* ==========================================================================
   Navbar & Header
   ========================================================================== */

.navbar-custom {
  background-color: var(--canvas-subtle);
  border-bottom: 1px solid var(--border-default);
  padding: 0.65rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand-custom {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fg-default);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.navbar-brand-custom:hover {
  color: #ffffff;
  text-decoration: none;
}

.navbar-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--canvas-highlight);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-fg);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.navbar-brand-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-dot-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-subtle);
  background: var(--canvas-inset);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-muted);
}

.nav-link-custom {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-link-custom:hover {
  color: var(--fg-default);
  background: var(--canvas-highlight);
  text-decoration: none;
}

.nav-link-custom.active {
  color: var(--fg-default);
  background: var(--canvas-highlight);
  border: 1px solid var(--border-default);
}

.user-badge {
  background: var(--canvas-highlight);
  border: 1px solid var(--border-default);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--fg-default);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: #ffffff;
}

/* ==========================================================================
   Buttons (GitHub & VS Code Inspired)
   ========================================================================== */

.btn-primary-custom {
  background-color: var(--accent-primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary-custom:hover {
  background-color: var(--accent-primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-primary-custom:active {
  background-color: #1a56b7;
}

.btn-secondary-custom {
  background-color: var(--canvas-highlight);
  color: var(--fg-default);
  border: 1px solid var(--border-default);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-secondary-custom:hover {
  background-color: var(--canvas-overlay);
  border-color: var(--fg-subtle);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary-custom:active {
  background-color: var(--canvas-inset);
}

.btn-success-custom {
  background-color: var(--success-emphasis);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-success-custom:hover {
  background-color: var(--success-emphasis-hover);
  color: #ffffff;
  text-decoration: none;
}

/* Fix Bootstrap .btn-warning in dark mode */
.btn-warning {
  background-color: var(--warning-emphasis) !important;
  border-color: var(--warning-border) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-warning:hover {
  background-color: #9e6a03 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   Hero Section (Compact, Technical & Objective)
   ========================================================================== */

.hero-banner {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  background: var(--canvas-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--accent-fg);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.hero-tech-card {
  background: var(--canvas-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: left;
}

.hero-tech-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.825rem;
  border-bottom: 1px solid var(--border-muted);
}

.hero-tech-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ==========================================================================
   Topic Cards & Grid
   ========================================================================== */

.topic-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.topic-card-v2 {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-align: left;
}

.topic-card-v2:hover {
  border-color: var(--border-hover);
  background-color: var(--canvas-overlay);
}

.topic-header-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--canvas-highlight);
  border: 1px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-fg);
  font-size: 1rem;
}

.topic-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 0.85rem;
  margin-bottom: 0.4rem;
}

.topic-card-summary {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.topic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-muted);
  font-size: 0.8rem;
}

.btn-arrow-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: var(--canvas-highlight);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.topic-card-v2:hover .btn-arrow-icon {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================================
   Cards & Panels (IDE Style)
   ========================================================================== */

.card-glass {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.card-glass-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-default);
  background: var(--canvas-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.card-glass-body {
  padding: 1.25rem;
}

/* ==========================================================================
   Stat Cards (Dashboard)
   ========================================================================== */

.stat-card {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: border-color 0.15s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-default);
}

.stat-icon-purple, .stat-icon-blue {
  background: var(--accent-subtle);
  color: var(--accent-fg);
  border-color: var(--accent-border);
}

.stat-icon-green {
  background: var(--success-subtle);
  color: var(--success-fg);
  border-color: var(--success-border);
}

.stat-icon-amber {
  background: var(--warning-subtle);
  color: var(--warning-fg);
  border-color: var(--warning-border);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Responsive grid for 5-col dashboard */
@media (min-width: 992px) {
  .col-lg-2-4 {
    flex: 0 0 auto;
    width: 20%;
  }
}

/* ==========================================================================
   SQL Editor Console (VS Code / DataGrip Style)
   ========================================================================== */

.sql-editor-container {
  background-color: var(--canvas-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.editor-header {
  background-color: var(--canvas-subtle);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.8;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.editor-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fg-default);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--canvas-inset);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-muted);
}

.editor-textarea {
  width: 100%;
  background-color: var(--canvas-inset);
  color: var(--fg-default);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border: none;
  padding: 1rem 1.25rem;
  outline: none !important;
  resize: vertical;
  line-height: 1.6;
  tab-size: 2;
}

.editor-textarea::placeholder {
  color: var(--fg-subtle);
  font-style: normal;
}

.editor-footer {
  background-color: var(--canvas-subtle);
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Data Tables (DataGrip / pgAdmin Result Grid)
   ========================================================================== */

.table-custom-wrapper {
  background-color: var(--canvas-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-top: 0.5rem;
}

.table-custom {
  width: 100%;
  margin-bottom: 0;
  color: var(--fg-default);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  border-collapse: collapse;
}

.table-custom th {
  background-color: var(--canvas-highlight);
  color: var(--accent-fg);
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border-default);
  border-right: 1px solid var(--border-muted);
  text-align: left;
  white-space: nowrap;
}

.table-custom th:last-child {
  border-right: none;
}

.table-custom td {
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--border-muted);
  border-right: 1px solid var(--border-muted);
  color: var(--fg-default);
  white-space: nowrap;
}

.table-custom td:last-child {
  border-right: none;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

.table-custom tr:hover td {
  background-color: var(--canvas-overlay);
}

/* ==========================================================================
   Theory & Code Documentation (PostgreSQL / MDN Docs Style)
   ========================================================================== */

.theory-container {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.theory-section-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.theory-paragraph {
  color: var(--fg-default);
  font-size: 0.95rem;
  line-height: 1.7;
}

.code-example-card {
  background-color: var(--canvas-inset);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 1rem 0;
}

.code-example-header {
  background-color: var(--canvas-highlight);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sql-code-snippet {
  font-family: var(--font-mono);
  margin: 0;
  padding: 1rem;
  color: var(--fg-default);
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
  background: transparent;
  border: none;
}

/* Syntax Highlighting Tokens */
.sql-keyword {
  color: var(--sql-kw);
  font-weight: 600;
}

.sql-func {
  color: var(--sql-fn);
  font-weight: 600;
}

.sql-string {
  color: var(--sql-str);
}

.sql-number {
  color: var(--sql-num);
}

.operator-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.operator-badge {
  background: var(--canvas-inset);
  border: 1px solid var(--border-default);
  color: var(--fg-default);
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   Quiz & Interactive Assessments
   ========================================================================== */

.quiz-option-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background-color: var(--canvas-highlight);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--fg-default);
  text-align: left;
  width: 100%;
}

.quiz-option-card:hover {
  background-color: var(--canvas-overlay);
  border-color: var(--fg-subtle);
}

.btn-check:checked + .quiz-option-card {
  background-color: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.option-badge {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: var(--canvas-inset);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--accent-fg);
  flex-shrink: 0;
}

.btn-check:checked + .quiz-option-card .option-badge {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================================
   Progress Bars
   ========================================================================== */

.progress-custom {
  height: 6px;
  background-color: var(--canvas-inset);
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border-muted);
  width: 100%;
}

.progress-bar-primary,
.progress-bar-cyan,
.progress-bar-success {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-bar-primary {
  background-color: var(--accent-primary);
}

.progress-bar-cyan {
  background-color: var(--accent-fg);
}

.progress-bar-success {
  background-color: var(--success-emphasis);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-custom {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.pagination-custom .page-link {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  color: var(--fg-default);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.pagination-custom .page-link:hover {
  background-color: var(--canvas-overlay);
  border-color: var(--border-hover);
  color: #ffffff;
}

.pagination-custom .page-item.disabled .page-link {
  background-color: var(--canvas-default);
  color: var(--fg-subtle);
  border-color: var(--border-muted);
  cursor: not-allowed;
}

/* ==========================================================================
   Auth Forms & Cards
   ========================================================================== */

.auth-wrapper {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.auth-card {
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}

.form-control-dark, .form-control {
  background-color: var(--canvas-inset) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--fg-default) !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.9rem !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.form-control-dark:focus, .form-control:focus {
  background-color: var(--canvas-inset) !important;
  border-color: var(--accent-primary-hover) !important;
  box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.3) !important;
  color: #ffffff !important;
  outline: none !important;
}

.form-control::placeholder, .form-control-dark::placeholder {
  color: var(--fg-subtle) !important;
}

.form-label-custom, .form-label {
  color: var(--fg-default) !important;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.input-group-text {
  background-color: var(--canvas-highlight) !important;
  border-color: var(--border-default) !important;
  color: var(--fg-muted) !important;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.alert-custom-success, .alert-success {
  background-color: var(--success-subtle) !important;
  border: 1px solid var(--success-border) !important;
  color: var(--success-fg) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem;
}

.alert-custom-danger, .alert-danger {
  background-color: var(--danger-subtle) !important;
  border: 1px solid var(--danger-border) !important;
  color: var(--danger-fg) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem;
}

.alert-custom-warning, .alert-warning {
  background-color: var(--warning-subtle) !important;
  border: 1px solid var(--warning-border) !important;
  color: var(--warning-fg) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem;
}

/* ==========================================================================
   Badges & Micro UI
   ========================================================================== */

.badge {
  font-weight: 500;
  padding: 0.3em 0.6em;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.badge.bg-dark {
  background-color: var(--canvas-highlight) !important;
  border: 1px solid var(--border-default) !important;
  color: var(--fg-muted) !important;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.badge.bg-primary-subtle {
  background-color: var(--accent-subtle) !important;
  border: 1px solid var(--accent-border) !important;
  color: var(--accent-fg) !important;
}

.badge.bg-success-subtle {
  background-color: var(--success-subtle) !important;
  border: 1px solid var(--success-border) !important;
  color: var(--success-fg) !important;
}

/* Text Highlight Utilities (Zero Gradients) */
.text-gradient, .text-gradient-cyan {
  color: var(--accent-fg) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.text-accent-cyan {
  color: var(--accent-fg) !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-custom {
  border-top: 1px solid var(--border-default);
  padding: 2rem 0;
  margin-top: 4rem;
  background-color: var(--canvas-default);
  color: var(--fg-subtle);
  font-size: 0.825rem;
}

.footer-custom a {
  color: var(--fg-muted);
}

.footer-custom a:hover {
  color: var(--accent-fg);
}
