@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #0d6efd;
  --navy: #0b1f4d;
  --teal: #00a6a6;
  --bg: #f5f7fb;
  --warning: #f59e0b;
  --danger: #dc3545;
  --success: #198754;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe2f0;
  --shadow: 0 14px 36px rgba(11, 31, 77, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Kanit", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(13, 110, 253, 0.12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--navy) 0%, #102b68 100%);
  color: #fff;
  padding: 1.5rem 1.1rem;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  transition: transform 0.3s ease;
  box-shadow: 8px 0 30px rgba(11, 31, 77, 0.2);
}

.sidebar-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.5rem 0.6rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1.25rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal), #5bd0d0);
  color: #08223f;
}

.sidebar-brand h1,
.topbar-title h2,
.page-heading h3,
.section-head h4 {
  margin: 0;
}

.sidebar-brand h1 {
  font-size: 1.1rem;
}

.sidebar-brand p,
.topbar-title span,
.page-heading p,
.section-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.92rem 1rem;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  transition: 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.main-panel {
  flex: 1;
  margin-left: 280px;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  border-bottom: 1px solid rgba(219, 226, 240, 0.7);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88) !important;
}

.topbar .container-fluid {
  min-height: 78px;
}

.topbar-title span,
.page-heading p,
.section-head p {
  color: var(--muted);
}

.topbar-chip,
.hero-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: var(--navy);
  font-weight: 600;
}

.content-area {
  padding: 1.5rem 0 2rem;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.breadcrumb {
  margin-bottom: 0.55rem;
}

.breadcrumb-item,
.breadcrumb-item.active {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-card {
  border: 1px solid rgba(219, 226, 240, 0.85);
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.92);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.summary-card {
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -22px -30px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.08);
}

.summary-label {
  color: var(--muted);
  font-weight: 600;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
}

.summary-value-sm {
  font-size: 1.4rem;
}

.summary-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--success);
  font-size: 0.92rem;
}

.chart-wrap {
  position: relative;
  min-height: 320px;
}

.radar-wrap {
  min-height: 360px;
}

.table thead th {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: var(--border);
}

.table tbody td {
  border-bottom-color: #edf2fb;
}

.badge-soft {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-weight: 600;
}

.badge-high {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger);
}

.badge-medium {
  background: rgba(245, 158, 11, 0.14);
  color: #b76e00;
}

.badge-low {
  background: rgba(25, 135, 84, 0.12);
  color: var(--success);
}

.assessment-summary,
.note-box,
.confidence-box,
.evidence-item,
.timeline-card {
  border-radius: 18px;
  border: 1px solid rgba(219, 226, 240, 0.85);
  background: #f8fbff;
  padding: 1rem 1.1rem;
}

.assessment-summary {
  display: grid;
  gap: 1rem;
}

.upload-stack {
  display: grid;
  gap: 0.9rem;
}

.upload-mock {
  min-height: 102px;
  border: 1.5px dashed rgba(13, 110, 253, 0.28);
  border-radius: 20px;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, rgba(13, 110, 253, 0.05), rgba(0, 166, 166, 0.05));
  color: var(--navy);
  font-weight: 600;
}

.upload-mock i {
  font-size: 1.5rem;
}

.profile-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  font-size: 1.6rem;
}

.meta-list,
.scale-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.category-group {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(219, 226, 240, 0.8);
  border-radius: 18px;
  margin-bottom: 1rem;
}

.skill-row {
  margin-bottom: 1rem;
}

.skill-row:last-child {
  margin-bottom: 0;
}

.skill-row .d-flex {
  margin-bottom: 0.45rem;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e7eefb;
}

.progress-bar {
  border-radius: 999px;
}

.confidence-box {
  background: linear-gradient(135deg, rgba(0, 166, 166, 0.1), rgba(13, 110, 253, 0.08));
}

.timeline-card h4,
.report-card h4 {
  font-size: 1rem;
}

.report-card {
  height: 100%;
}

.stack-list {
  display: grid;
  gap: 0.85rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.jd-textarea {
  min-height: 260px;
  resize: vertical;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.info-block {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(219, 226, 240, 0.85);
  background: #f8fbff;
}

.info-block span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.info-block-wide {
  grid-column: 1 / -1;
}

.responsibility-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.filter-inline {
  min-width: 240px;
}

.option-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(219, 226, 240, 0.9);
  background: #f8fbff;
  cursor: pointer;
}

.option-tile input {
  margin: 0;
}

.toast {
  box-shadow: var(--shadow);
}

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

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-panel {
    margin-left: 0;
  }

  .page-heading {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .content-area {
    padding-top: 1rem;
  }

  .summary-value {
    font-size: 1.7rem;
  }

  .chart-wrap,
  .radar-wrap {
    min-height: 280px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}
