/* Training feedback, certificate check and the training dashboard. Builds on training.css. */

/* ------------------------------------------------------------------ shared card */
.ti-wrap { padding: 40px 0 64px; }
.ti-card { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--dl-line); border-radius: 20px; box-shadow: var(--tr-shadow); overflow: hidden; }
.ti-card-head { padding: 26px 30px; color: #fff; background: radial-gradient(500px 220px at 100% 0%, rgba(163, 73, 164, 0.35), transparent 70%), linear-gradient(150deg, var(--dl-ink), var(--tr-navy-2)); }
.ti-card-head h1 { color: #fff; font-size: clamp(26px, 3.2vw, 34px); margin: 0 0 6px; }
.ti-card-head p { margin: 0; color: #c9cfd8; }
.ti-card-body { padding: 26px 30px 30px; }
.ti-state { display: flex; gap: 16px; align-items: flex-start; }
.ti-state > i { flex: none; font-size: 30px; color: var(--dl-purple); }
.ti-state h2 { font-size: 22px; color: var(--dl-ink); margin: 0 0 6px; }
.ti-state p { margin: 0 0 10px; color: var(--dl-muted); }
.ti-state.ti-good > i { color: var(--dl-good); }

/* ------------------------------------------------------------------ feedback form */
.tf-q { border: 0; padding: 0; margin: 0 0 24px; }
.tf-q legend, .tf-label { float: none; display: block; font-size: 16px; font-weight: 700; color: var(--dl-ink); margin-bottom: 10px; }
.tf-q legend small, .tf-label small { font-weight: 500; color: var(--dl-muted); font-size: 13px; }
.tf-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.tf-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tf-stars label { font-size: 34px; line-height: 1; color: #d5d9df; cursor: pointer; transition: transform 0.1s, color 0.1s; }
.tf-stars label:hover, .tf-stars label:hover ~ label, .tf-stars input:checked ~ label { color: #f2b01e; }
.tf-stars input:focus-visible + label { outline: 3px solid var(--dl-purple); outline-offset: 2px; border-radius: 6px; }
.tf-stars label:active { transform: scale(0.92); }
.tf-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; }
.tf-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tf-scale label { display: grid; place-items: center; height: 42px; border: 1.5px solid #cfd5dd; border-radius: 10px; font-weight: 700; color: var(--dl-ink); cursor: pointer; background: #fff; }
.tf-scale label:hover { border-color: var(--dl-purple); }
.tf-scale input:checked + label { background: var(--dl-purple); border-color: var(--dl-purple); color: #fff; }
.tf-scale input:focus-visible + label { outline: 3px solid var(--dl-purple); outline-offset: 2px; }
.tf-scale-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dl-muted); margin-top: 6px; }
.tf-field textarea, .tf-field input[type="text"], .tf-field select { width: 100%; padding: 10px 12px; border: 1.5px solid #cfd5dd; border-radius: 10px; font: inherit; font-size: 15px; color: var(--dl-ink); background: #fff; }
.tf-field textarea { min-height: 92px; resize: vertical; }
.tf-field { margin-bottom: 18px; }
.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tf-quote { margin: 8px 0 22px; padding: 18px 20px; border-radius: 14px; background: var(--dl-purple-soft); }
.tf-quote h2 { font-size: 18px; color: var(--dl-ink); margin: 0 0 4px; }
.tf-quote > p { font-size: 14px; color: var(--dl-muted); margin: 0 0 12px; }
.tf-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dl-ink); margin: 10px 0; }
.tf-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--dl-purple); flex: none; }
.tf-names { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.tf-names label { display: inline-flex; gap: 6px; align-items: center; }
.tf-names input { accent-color: var(--dl-purple); }
.tf-names[aria-disabled="true"] { opacity: 0.5; }
.tf-error { color: var(--tr-red); font-size: 14px; font-weight: 600; margin: 0 0 12px; }

/* ------------------------------------------------------------------ certificate check */
.tc-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tc-form input { flex: 1 1 220px; padding: 11px 14px; border: 1.5px solid #cfd5dd; border-radius: 10px; font: inherit; font-size: 16px; letter-spacing: 1px; text-transform: uppercase; }
.tc-result { border-radius: 16px; padding: 22px 24px; border: 1px solid var(--dl-line); }
.tc-valid { border-color: #bfe5cf; background: #f1faf5; }
.tc-invalid { border-color: #f0c9c9; background: #fdf3f3; }
.tc-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }
.tc-valid .tc-badge { color: #1f7a4a; }
.tc-invalid .tc-badge { color: var(--tr-red); }
.tc-name { font-family: "Baloo 2", sans-serif; font-size: clamp(28px, 4vw, 38px); font-weight: 700; color: var(--dl-ink); margin: 8px 0 2px; line-height: 1.1; }
.tc-course { font-size: 20px; font-weight: 800; color: var(--dl-purple); margin: 0 0 14px; }
.tc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.tc-facts div { padding: 10px 12px; background: #fff; border-radius: 10px; border: 1px solid var(--dl-line); }
.tc-facts dt { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dl-muted); }
.tc-facts dd { margin: 2px 0 0; font-weight: 700; color: var(--dl-ink); }

/* ------------------------------------------------------------------ dashboard */
.td-hero .tr-hero-meta { color: #c9cfd8; font-size: 14px; }
.td-section { padding: 44px 0 8px; }
.td-section h2 { font-size: var(--fs-subsection, 28px); color: var(--dl-ink); margin: 0 0 4px; }
.td-section .td-sub { color: var(--dl-muted); margin: 0 0 20px; }
.td-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: -46px; position: relative; }
.td-kpi { background: #fff; border: 1px solid var(--dl-line); border-radius: 18px; padding: 18px 16px; box-shadow: var(--tr-shadow); }
.td-kpi i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--dl-purple-soft); color: var(--dl-purple); font-size: 17px; margin-bottom: 10px; }
.td-kpi strong { display: block; font-family: "Baloo 2", sans-serif; font-size: 34px; line-height: 1; color: var(--dl-ink); }
.td-kpi span { display: block; margin-top: 6px; font-size: 13px; color: var(--dl-muted); line-height: 1.35; }
.td-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.td-panel { grid-column: span 6; background: #fff; border: 1px solid var(--dl-line); border-radius: 18px; padding: 20px 22px; box-shadow: 0 4px 16px rgba(48, 61, 78, 0.05); min-width: 0; }
.td-panel.td-wide { grid-column: span 12; }
.td-panel.td-third { grid-column: span 4; }
.td-panel h3 { font-size: 16px; font-weight: 800; color: var(--dl-ink); margin: 0 0 2px; }
.td-panel .td-note { font-size: 13px; color: var(--dl-muted); margin: 0 0 14px; }
.td-chart { width: 100%; height: auto; display: block; overflow: visible; }
.td-chart text { font-family: "Montserrat", sans-serif; }
.td-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--dl-muted); margin-top: 8px; padding: 0; list-style: none; }
.td-legend li { display: inline-flex; align-items: center; gap: 6px; }
.td-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.td-bars { list-style: none; padding: 0; margin: 0; }
.td-bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; color: var(--dl-ink); }
.td-bar { height: 12px; border-radius: 999px; background: #f0f1f4; overflow: hidden; }
.td-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--dl-purple), #c58ac6); transform-origin: left; animation: td-grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.td-bars b { font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
.td-bars .td-small { color: var(--dl-muted); font-style: italic; }
@keyframes td-grow { from { transform: scaleX(0); } }
.td-rating { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.td-big { font-family: "Baloo 2", sans-serif; font-size: 56px; line-height: 1; color: var(--dl-ink); }
.td-big small { font-size: 22px; color: var(--dl-muted); }
.td-starline { color: #f2b01e; font-size: 18px; letter-spacing: 2px; }
.td-empty { padding: 18px; border: 1.5px dashed #cfd5dd; border-radius: 14px; color: var(--dl-muted); font-size: 14px; background: #fafbfc; }
.td-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.td-quote { position: relative; margin: 0; padding: 22px 22px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--dl-line); box-shadow: 0 4px 16px rgba(48, 61, 78, 0.05); }
.td-quote::before { content: "\201C"; position: absolute; top: -6px; left: 16px; font-family: Georgia, serif; font-size: 70px; line-height: 1; color: var(--dl-purple); opacity: 0.25; }
.td-quote blockquote { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--dl-ink); }
.td-quote figcaption { font-size: 13px; color: var(--dl-muted); }
.td-quote figcaption strong { display: block; color: var(--dl-ink); font-size: 14px; }
.td-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.td-session { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 16px; background: var(--dl-purple-soft); color: var(--dl-ink); text-decoration: none; border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.td-session:hover { border-color: var(--dl-purple); transform: translateY(-2px); color: var(--dl-ink); }
.td-session strong { font-size: 16px; }
.td-session span { font-size: 13.5px; color: var(--dl-muted); }
.td-session em { font-style: normal; font-weight: 700; color: var(--dl-purple); font-size: 13.5px; margin-top: 4px; }
.td-banner { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: #fdf6e7; border: 1px solid #f0dfb4; color: #7a5a12; font-size: 14px; }
.td-privacy { font-size: 13px; color: var(--dl-muted); margin: 26px 0 0; }

@media (max-width: 1199px) {
  .td-kpis { grid-template-columns: repeat(3, 1fr); }
  .td-panel.td-third { grid-column: span 6; }
  .td-quotes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ti-card-head, .ti-card-body { padding-left: 20px; padding-right: 20px; }
  .tf-scale { grid-template-columns: repeat(6, 1fr); }
  .tf-row { grid-template-columns: 1fr; }
  .td-kpis { grid-template-columns: repeat(2, 1fr); margin-top: -36px; }
  .td-panel, .td-panel.td-third { grid-column: span 12; }
  .td-quotes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .td-bar span, .td-chart * { animation: none !important; transition: none !important; }
}
