/* ============================================================
   Skills Taxonomy module — design tokens + component classes
   ported from the Claude Design handoff ("Skills Management PaaS").

   Everything below is scoped under .smp-scope so it can never
   bleed into the rest of the (Bootstrap/Blazorise-based) app.
   Do not use these classes outside a .smp-scope wrapper.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");

.smp-scope {
  /* Brand */
  --smp-cerulean:        #2096EB;
  --smp-cerulean-dark:   #1878BF;
  --smp-cerulean-light:  #EBF5FD;
  --smp-cerulean-pale:   #EBF5FD;
  --smp-blumine:         #1878BF;
  --smp-foam:            #F3F9FE;
  --smp-water-blue:      #D0E2F1;
  --smp-hippie-blue:     #6794B7;

  /* Status */
  --smp-mantis:          #73D071;
  --smp-mantis-lt:       #EDF9ED;
  --smp-carnation:       #F56363;
  --smp-carnation-lt:    #FEF0F0;
  --smp-sun:             #FBB80E;
  --smp-sun-lt:          #FFF8E7;
  --smp-green-active:    #2E7C36;
  /* Matches real tokens.css's --amber (= --hcm-sun, the bright accent), not the darker
     badge--warn text color (#8A5C09, which the wireframe never exposes as its own variable). */
  --smp-amber:           #FBB80E;

  /* Text */
  --smp-black:           #1E293B;
  --smp-trout:           #526070;
  --smp-regent-gray:     #8896A6;

  /* Surfaces */
  --smp-paper:           #FFFFFF;
  --smp-border-subtle:   #E8EEF5;
  --smp-bg-workspace:    #F3F9FE;

  /* Type scale */
  --smp-fs-h1:  28px;
  --smp-fs-h2:  24px;
  --smp-fs-h4:  20px;
  --smp-fs-h8:  16px;
  --smp-fs-b6:  14px;
  --smp-fs-b7:  14px;
  --smp-fs-b9:  12px;
  --smp-fs-b10: 10px;

  /* Radii / shadow / controls */
  --smp-r-4:   4px;
  --smp-r-6:   6px;
  --smp-r-8:   8px;
  --smp-r-12:  12px;
  --smp-r-pill: 999px;
  --smp-shadow-xs:   0 1px 2px rgba(15, 22, 32, 0.04);
  --smp-shadow-card: 0 4px 4px rgba(0, 0, 0, 0.04);
  --smp-shadow-lg:   0 12px 32px rgba(15, 22, 32, 0.08);
  --smp-ctl-h-sm: 28px;
  --smp-ctl-h-md: 36px;
  --smp-dur: 180ms;
  --smp-ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--smp-trout);
}

.smp-scope *, .smp-scope *::before, .smp-scope *::after { box-sizing: border-box; }
.smp-scope .mono { font-family: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.smp-scope .h1 { font-size: var(--smp-fs-h1); font-weight: 600; line-height: 1.2; color: var(--smp-black); margin: 0; }
.smp-scope .h2 { font-size: var(--smp-fs-h2); font-weight: 600; line-height: 1.2; color: var(--smp-black); margin: 0; }
.smp-scope .h4-medium { font-size: var(--smp-fs-h4); font-weight: 500; line-height: 1.2; color: var(--smp-black); }
.smp-scope .h8-medium { font-size: var(--smp-fs-h8); font-weight: 500; line-height: 1.2; color: var(--smp-black); }
.smp-scope .b6-medium { font-size: var(--smp-fs-b6); font-weight: 500; line-height: 1.5; }
.smp-scope .b7-regular { font-size: var(--smp-fs-b7); font-weight: 400; line-height: 1.5; }
.smp-scope .b9-medium { font-size: var(--smp-fs-b9); font-weight: 500; line-height: 1.5; }
.smp-scope .b9-regular { font-size: var(--smp-fs-b9); font-weight: 400; line-height: 1.5; color: var(--smp-regent-gray); }
.smp-scope .b10-medium { font-size: var(--smp-fs-b10); font-weight: 500; line-height: 1.5; text-transform: uppercase; letter-spacing: 0.04em; color: var(--smp-hippie-blue); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.smp-scope .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--smp-ctl-h-md); padding: 0 16px;
  font-family: inherit; font-size: var(--smp-fs-b6); font-weight: 500; line-height: 1;
  border-radius: var(--smp-r-8); border: 1px solid transparent;
  background: transparent; color: inherit; cursor: pointer; white-space: nowrap;
  transition: background var(--smp-dur) var(--smp-ease-out), color var(--smp-dur) var(--smp-ease-out),
              border-color var(--smp-dur) var(--smp-ease-out);
}
.smp-scope .btn[disabled], .smp-scope .btn.is-disabled {
  background: #F6F8FB !important; color: #8896A6 !important; border-color: var(--smp-water-blue) !important;
  cursor: not-allowed; pointer-events: none;
}
.smp-scope .btn--sm { height: var(--smp-ctl-h-sm); padding: 0 12px; font-size: var(--smp-fs-b9); gap: 6px; border-radius: var(--smp-r-6); }
.smp-scope .btn--icon-only { width: var(--smp-ctl-h-md); padding: 0; }
.smp-scope .btn--icon-only.btn--sm { width: var(--smp-ctl-h-sm); }
.smp-scope .btn--primary { background: var(--smp-cerulean); color: var(--smp-paper); border-color: var(--smp-cerulean); }
.smp-scope .btn--primary:hover { background: var(--smp-cerulean-dark); border-color: var(--smp-cerulean-dark); }
.smp-scope .btn--ghost { background: var(--smp-cerulean-light); color: var(--smp-cerulean); border-color: var(--smp-cerulean); }
.smp-scope .btn--ghost:hover { background: var(--smp-cerulean-pale); }
.smp-scope .btn--danger { background: var(--smp-carnation); color: var(--smp-paper); border-color: var(--smp-carnation); }
.smp-scope .btn--danger:hover { background: #E55050; border-color: #E55050; }
.smp-scope .btn--delete-inline { background: var(--smp-carnation); color: var(--smp-paper); border-color: var(--smp-carnation); }
.smp-scope .btn--delete-inline:hover { background: #E55050; border-color: #E55050; }
.smp-scope .btn--edit-inline { background: var(--smp-sun); color: var(--smp-paper); border-color: var(--smp-sun); }
.smp-scope .btn--edit-inline:hover { background: #E5A700; border-color: #E5A700; }
.smp-scope .btn--neutral { background: var(--smp-foam); color: var(--smp-trout); border-color: var(--smp-water-blue); }

/* ── FORM FIELDS ────────────────────────────────────────────── */
.smp-scope .field { display: flex; flex-direction: column; gap: 6px; }
.smp-scope .field-label { font-size: var(--smp-fs-b10); font-weight: 500; color: var(--smp-hippie-blue); text-transform: uppercase; letter-spacing: 0.04em; }
.smp-scope .field-label .req { color: var(--smp-carnation); margin-left: 2px; }
.smp-scope .input, .smp-scope .select, .smp-scope .textarea {
  width: 100%; height: var(--smp-ctl-h-md); padding: 0 12px;
  background: var(--smp-foam); border: 0; border-bottom: 1px solid var(--smp-water-blue); border-radius: 0;
  font: inherit; font-size: var(--smp-fs-b7); font-weight: 500; color: var(--smp-black); outline: none;
  transition: border-color var(--smp-dur) var(--smp-ease-out);
}
.smp-scope .input::placeholder, .smp-scope .textarea::placeholder { color: var(--smp-hippie-blue); font-weight: 400; }
.smp-scope .input:hover, .smp-scope .select:hover, .smp-scope .textarea:hover { border-bottom-color: var(--smp-hippie-blue); }
.smp-scope .input:focus, .smp-scope .select:focus, .smp-scope .textarea:focus { border-bottom-color: var(--smp-cerulean); border-bottom-width: 2px; }
.smp-scope .textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
.smp-scope .select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%232096EB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-color: var(--smp-foam); padding-right: 32px;
}

.smp-scope .input-group { position: relative; display: flex; align-items: center; }
.smp-scope .input-group .input { padding-left: 36px; }
.smp-scope .input-group .input-icon { position: absolute; left: 12px; color: var(--smp-cerulean); pointer-events: none; font-size: 14px; }

/* Checkbox / Radio */
.smp-scope .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.smp-scope .check input[type="checkbox"], .smp-scope .check input[type="radio"] {
  appearance: none; width: 18px; height: 18px;
  border: 1.5px solid var(--smp-water-blue); border-radius: 4px; background: var(--smp-paper);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color var(--smp-dur), background var(--smp-dur);
}
.smp-scope .check input[type="radio"] { border-radius: 50%; }
.smp-scope .check input:checked { background: var(--smp-cerulean); border-color: var(--smp-cerulean); }
.smp-scope .check input[type="checkbox"]:checked::after {
  content: ""; width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none'><path d='M1.5 5.2L4 7.5L8.5 2.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.smp-scope .check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--smp-paper); }

/* ── BADGES / CHIPS ─────────────────────────────────────────── */
.smp-scope .badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px;
  border-radius: var(--smp-r-pill); font-size: var(--smp-fs-b9); font-weight: 500;
  background: var(--smp-foam); color: var(--smp-trout); border: 1px solid var(--smp-water-blue); white-space: nowrap;
}
.smp-scope .badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.smp-scope .badge--ok { background: var(--smp-mantis-lt); color: #2E7C36; border-color: transparent; }
.smp-scope .badge--warn { background: var(--smp-sun-lt); color: #8A5C09; border-color: transparent; }
.smp-scope .badge--danger { background: var(--smp-carnation-lt); color: #993737; border-color: transparent; }
.smp-scope .badge--info { background: var(--smp-cerulean-pale); color: var(--smp-blumine); border-color: transparent; }
.smp-scope .badge--neutral { background: var(--smp-foam); color: var(--smp-trout); }

/* ── BANNERS ────────────────────────────────────────────────── */
.smp-scope .banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border: 1px solid transparent; border-radius: var(--smp-r-8); }
.smp-scope .banner-icon { font-size: 18px; margin-top: 1px; flex-shrink: 0; }
/* No color set — inherits the tone color from the ancestor .banner--* class (real components.css
   behaviour). Using .b6-medium/.b9-regular instead breaks this, since those classes set their
   own color and win over inheritance. */
.smp-scope .banner-title { font-size: var(--smp-fs-b6); font-weight: 500; }
.smp-scope .banner-body { font-size: var(--smp-fs-b7); margin-top: 2px; }
.smp-scope .banner--info { background: var(--smp-cerulean-light); border-color: var(--smp-cerulean-pale); color: var(--smp-blumine); }
.smp-scope .banner--warn { background: var(--smp-sun-lt); border-color: var(--smp-sun); color: #8A5C09; }
.smp-scope .banner--danger { background: var(--smp-carnation-lt); border-color: var(--smp-carnation); color: #993737; }
.smp-scope .banner--ok { background: var(--smp-mantis-lt); border-color: var(--smp-mantis); color: var(--smp-green-active); }

/* ── TOGGLE SWITCH ──────────────────────────────────────────── */
.smp-scope .switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.smp-scope .switch input { opacity: 0; width: 0; height: 0; }
.smp-scope .switch-track { position: absolute; inset: 0; background: var(--smp-water-blue); border-radius: var(--smp-r-pill); cursor: pointer; transition: background var(--smp-dur) var(--smp-ease-out); }
.smp-scope .switch-track::before { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--smp-paper); border-radius: 50%; transition: transform var(--smp-dur) var(--smp-ease-out); box-shadow: var(--smp-shadow-xs); }
.smp-scope .switch input:checked + .switch-track { background: var(--smp-cerulean); }
.smp-scope .switch input:checked + .switch-track::before { transform: translateX(16px); }

/* ── PROSE (SQL / JSON preview blocks) ──────────────────────── */
.smp-scope pre.code-block { background: var(--smp-foam); border: 1px solid var(--smp-water-blue); border-radius: var(--smp-r-8); padding: 12px 14px; margin: 0; font-family: "Roboto Mono", ui-monospace, monospace; font-size: var(--smp-fs-b9); color: var(--smp-blumine); white-space: pre-wrap; }

/* ── CARDS ──────────────────────────────────────────────────── */
.smp-scope .card { background: var(--smp-paper); border: 1px solid var(--smp-water-blue); border-radius: var(--smp-r-8); box-shadow: var(--smp-shadow-card); }
.smp-scope .card-header { padding: 14px 18px; border-bottom: 1px solid var(--smp-water-blue); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.smp-scope .card-body { padding: 18px; }
.smp-scope .card-footer { padding: 12px 18px; border-top: 1px solid var(--smp-water-blue); display: flex; justify-content: flex-end; gap: 8px; }

/* ── WORKSPACE HELPERS ──────────────────────────────────────── */
.smp-scope .smp-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.smp-scope .smp-empty { padding: 28px 18px; text-align: center; font-style: italic; color: var(--smp-hippie-blue); }
.smp-scope .smp-grid-row { display: grid; padding: 12px 18px; border-bottom: 1px solid var(--smp-border-subtle); align-items: center; }
.smp-scope .smp-grid-row:hover { background: var(--smp-foam); }
.smp-scope .smp-grid-head {
  display: grid; padding: 9px 18px; background: var(--smp-foam); border-bottom: 1px solid var(--smp-water-blue);
  font-size: var(--smp-fs-b10); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--smp-hippie-blue);
}
/* dg — the wireframe's own data-grid shell: rounded card wrapping a grid-head + grid-rows. */
.smp-scope .dg { background: var(--smp-paper); border: 1px solid var(--smp-water-blue); border-radius: var(--smp-r-8); overflow: hidden; }
.smp-scope .smp-tab-count { background: var(--smp-foam); border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 600; color: var(--smp-trout); }
.smp-scope .smp-tier-intro { padding: 10px 18px; background: var(--smp-foam); border-bottom: 1px solid var(--smp-water-blue); font-size: var(--smp-fs-b9); }
