/* =========================================================
   QR STUDIO
   Global Design System
========================================================= */

:root {

  --primary: #6d5dfc;
  --primary-2: #8b7fff;

  --bg: #f6f7fb;

  --surface: #ffffff;
  --surface-2: #f0f1f7;

  --text: #171827;

  --muted: #6b7080;

  --border: #e4e6ef;

  --success: #16a34a;

  --warning: #d97706;

  --danger: #dc2626;

  --shadow:
          0 12px 40px rgba(27, 31, 56, 0.08);

  --shadow-hover:
          0 20px 55px rgba(27, 31, 56, 0.14);

  --radius: 20px;

}


/* =========================================================
   DARK THEME
========================================================= */

[data-theme="dark"] {

  --bg: #0c0d12;

  --surface: #14161e;

  --surface-2: #1b1e28;

  --text: #f3f4f8;

  --muted: #a7abb9;

  --border: #292d3a;

  --shadow:
          0 12px 40px rgba(0, 0, 0, 0.28);

  --shadow-hover:
          0 20px 55px rgba(0, 0, 0, 0.42);

}


/* =========================================================
   RESET
========================================================= */

* {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
}


body {

  margin: 0;

  background: var(--bg);

  color: var(--text);

  font-family:
          Inter,
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          Roboto,
          Arial,
          sans-serif;

  transition:
          background 0.2s ease,
          color 0.2s ease;

}


a {
  text-decoration: none;
  color: inherit;
}


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


/* =========================================================
   NAVBAR
========================================================= */

.navbar {

  background:
          color-mix(
                  in srgb,
                  var(--surface) 90%,
                  transparent
          ) !important;

  backdrop-filter: blur(16px);

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

}


.navbar-brand {
  color: var(--text) !important;
}


.brand {

  font-weight: 800;

  letter-spacing: -0.03em;

}


.brand-mark {

  width: 38px;

  height: 38px;

  border-radius: 12px;

  background:
          linear-gradient(
                  135deg,
                  var(--primary),
                  #a59bff
          );

  display: grid;

  place-items: center;

  color: #fff;

  font-weight: 800;

  box-shadow:
          0 7px 20px
          rgba(109, 93, 252, 0.25);

}


.nav-link {

  color: var(--muted) !important;

  font-weight: 600;

  transition:
          color 0.2s ease;

}


.nav-link:hover,
.nav-link.active {

  color: var(--text) !important;

}


/* =========================================================
   PAGE
========================================================= */

.page {

  padding-top: 90px;

  min-height: 100vh;

}


.section {

  padding: 65px 0;

}


.section-title {

  font-weight: 850;

  letter-spacing: -0.04em;

}


.eyebrow {

  display: inline-flex;

  gap: 8px;

  align-items: center;

  padding: 8px 12px;

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

  border-radius: 999px;

  background: var(--surface);

  color: var(--muted);

  font-size: 0.82rem;

  font-weight: 700;

}


/* =========================================================
   COLORS
========================================================= */

.muted {
  color: var(--muted) !important;
}


.gradient-text {

  background:
          linear-gradient(
                  90deg,
                  var(--primary),
                  #a35cff,
                  #2f8cff
          );

  -webkit-background-clip: text;

  background-clip: text;

  color: transparent;

}


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

.btn-primary {

  --bs-btn-bg: var(--primary);

  --bs-btn-border-color: var(--primary);

  --bs-btn-hover-bg: #5c4df0;

  --bs-btn-hover-border-color: #5c4df0;

}


.btn {

  border-radius: 11px;

  font-weight: 600;

}


.btn-success {

  --bs-btn-bg: var(--success);

  --bs-btn-border-color: var(--success);

}


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

.card-pro {

  background: var(--surface);

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

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  transition:
          transform 0.2s ease,
          box-shadow 0.2s ease,
          border-color 0.2s ease;

}


.card-pro:hover {

  border-color:
          color-mix(
                  in srgb,
                  var(--primary) 22%,
                  var(--border)
          );

}


/* =========================================================
   PROJECT CARD
========================================================= */

.project-card {

  position: relative;

  overflow: hidden;

}


.project-card:hover {

  transform:
          translateY(-4px);

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

}


.project-title {

  font-weight: 750;

  letter-spacing: -0.02em;

}


.min-width-0 {

  min-width: 0;

}


/* =========================================================
   ICON
========================================================= */

.icon-box {

  width: 46px;

  height: 46px;

  flex: 0 0 46px;

  border-radius: 14px;

  background:
          color-mix(
                  in srgb,
                  var(--primary) 11%,
                  var(--surface)
          );

  color: var(--primary);

  display: grid;

  place-items: center;

  font-size: 1.2rem;

}


/* =========================================================
   FAVORITE
========================================================= */

.favorite-btn {

  width: 38px;

  height: 38px;

  display: grid;

  place-items: center;

  border-radius: 11px;

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

  background: var(--surface-2);

  color: var(--muted);

  transition:
          0.2s ease;

}


.favorite-btn:hover {

  color: var(--danger);

  border-color:
          rgba(220, 38, 38, 0.25);

  transform:
          scale(1.05);

}


/* =========================================================
   PROJECT META
========================================================= */

.project-meta {

  min-height: 45px;

}


.category-chip {

  display: inline-flex;

  padding:
          6px 10px;

  border-radius: 999px;

  background: var(--surface-2);

  color: var(--muted);

  font-weight: 700;

  font-size: 0.75rem;

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

}


.payload-preview {

  background: var(--surface-2);

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

  border-radius: 12px;

  padding:
          10px 12px;

  overflow: hidden;

}


/* =========================================================
   STATS — Enhanced visual hierarchy
========================================================= */

.stat-card {

  padding: 28px 24px;

  height: 100%;

  background: var(--surface);

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

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;

  position: relative;

  overflow: hidden;

}


.stat-card::after {

  content: '';

  position: absolute;

  inset: 0;

  border-radius: var(--radius);

  padding: 2px;

  background: linear-gradient(135deg, var(--primary), transparent 60%);

  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);

  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);

  -webkit-mask-composite: xor;

  mask-composite: exclude;

  opacity: 0;

  transition: opacity 0.3s ease;

  pointer-events: none;

}


.stat-card:hover {

  transform: translateY(-3px);

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

  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));

}


.stat-card:hover::after {

  opacity: 1;

}


.stat-number {

  font-size: 2.4rem;

  font-weight: 850;

  letter-spacing: -0.04em;

  margin-bottom: 2px;

  background: linear-gradient(135deg, var(--text), var(--primary));

  -webkit-background-clip: text;

  background-clip: text;

  color: transparent;

  display: inline-block;

  transition: transform 0.2s ease;

}


.stat-card:hover .stat-number {

  transform: scale(1.02);

}


.stat-card .muted {

  font-size: 0.9rem;

  font-weight: 500;

  letter-spacing: 0.02em;

  display: flex;

  align-items: center;

  gap: 6px;

}


.stat-card .muted i {

  font-size: 1rem;

  opacity: 0.6;

}


/* =========================================================
   FORMS — refined micro-interactions
========================================================= */

.form-control,
.form-select {

  background: var(--surface);

  color: var(--text);

  border-color: var(--border);

  border-radius: 12px;

  padding:
          0.75rem 0.9rem;

  transition: border-color 0.2s ease, box-shadow 0.2s ease;

}


.form-control::placeholder {

  color: var(--muted);

  opacity: 0.8;

}


.form-control:focus,
.form-select:focus {

  background: var(--surface);

  color: var(--text);

  border-color: var(--primary);

  box-shadow:
          0 0 0 0.25rem
          rgba(109, 93, 252, 0.15);

}


/* =========================================================
   SEARCH — elevated prominence
========================================================= */

.search-box {

  position: relative;

}


.search-box i {

  position: absolute;

  left: 14px;

  top: 50%;

  transform:
          translateY(-50%);

  color: var(--muted);

  z-index: 2;

  transition: color 0.2s ease;

}


.search-box input {

  padding-left: 42px;

}


.search-box input:focus + i {

  color: var(--primary);

}


/* =========================================================
   EMPTY STATE — softer, more inviting
========================================================= */

.empty {

  padding:
          80px 20px;

  text-align: center;

  color: var(--muted);

  background: var(--surface);

  border-radius: var(--radius);

  border: 2px dashed var(--border);

  transition: border-color 0.2s ease, background 0.2s ease;

}


.empty:hover {

  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));

  background: color-mix(in srgb, var(--surface) 95%, var(--primary) 5%);

}


.empty-icon {

  width: 80px;

  height: 80px;

  border-radius: 24px;

  background:
          color-mix(
                  in srgb,
                  var(--primary) 10%,
                  var(--surface)
          );

  color: var(--primary);

  display: grid;

  place-items: center;

  font-size: 2.2rem;

  margin:
          0 auto 20px;

  transition: transform 0.3s ease, box-shadow 0.3s ease;

  box-shadow: 0 8px 24px rgba(109, 93, 252, 0.08);

}


.empty:hover .empty-icon {

  transform: scale(1.05) rotate(-2deg);

  box-shadow: 0 12px 32px rgba(109, 93, 252, 0.16);

}


.empty h5 {

  font-weight: 700;

  color: var(--text);

  margin-bottom: 6px;

}


.empty p {

  max-width: 400px;

  margin-left: auto;

  margin-right: auto;

}


/* =========================================================
   ACTION BUTTONS — polished
========================================================= */

.project-actions .btn {

  min-height: 38px;

  transition: transform 0.15s ease, box-shadow 0.15s ease;

}


.project-actions .btn:hover {

  transform: translateY(-1px);

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

}


/* =========================================================
   FOOTER — refined spacing and polish
========================================================= */

footer {

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

  background:
          var(--surface);

  padding:
          48px 0 40px;

  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);

}


footer a {

  transition:
          color 0.2s ease;

  font-weight: 500;

}


footer a:hover {

  color: var(--primary);

  text-decoration: underline;

  text-underline-offset: 3px;

}


footer .brand-mark {

  width: 32px;

  height: 32px;

  font-size: 0.8rem;

}


footer .muted {

  font-size: 0.9rem;

}


/* =========================================================
   TOAST — refined appearance
========================================================= */

.toast-container {

  z-index: 1080;

}


.toast {

  border-radius: var(--radius) !important;

  border: 1px solid var(--border) !important;

  box-shadow: var(--shadow-hover) !important;

  background: var(--surface) !important;

  color: var(--text) !important;

}


.toast-header {

  border-bottom: 1px solid var(--border) !important;

  background: transparent !important;

  color: var(--text) !important;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {

  .page {

    padding-top: 78px;

  }

  .section {

    padding:
            45px 0;

  }

}


@media (max-width: 575.98px) {

  .section-title {

    font-size: 2rem;

  }

  .stat-card {

    padding: 20px 16px;

  }

  .stat-number {

    font-size: 1.8rem;

  }

  .project-card {

    padding: 15px !important;

  }

  .project-actions .btn {

    font-size: 0.82rem;

  }

  .empty {

    padding: 50px 16px;

  }

  .empty-icon {

    width: 64px;

    height: 64px;

    font-size: 1.8rem;

  }

  footer {

    padding: 32px 0 28px;

  }

}


/* =========================================================
   PRINT
========================================================= */

@media print {

  .no-print,
  .navbar,
  footer {

    display: none !important;

  }

  .page {

    padding-top: 0;

  }

  .card-pro {

    box-shadow: none !important;

    border: 0 !important;

  }

}
