/*
 * EduSense shared application theme
 * Visual source of truth: feedback-pulse.css
 * Live Quizzes and Oral Assessment are intentionally excluded by data-ui-surface.
 * The original EduSense sidebar is preserved across every application surface.
 */

:root {
  --pulse-maroon: #5c001e;
  --pulse-maroon-2: #74233e;
  --pulse-maroon-soft: #f4e7eb;
  --pulse-gold: #e3a53f;
  --pulse-gold-soft: #f6e8c9;
  --pulse-ink: #191719;
  --pulse-muted: #686166;
  --pulse-line: #d8d2d5;
  --pulse-paper: #f7f4f1;
  --pulse-panel: #ffffff;
  --pulse-dark: #211b1e;
  --pulse-dark-hover: #332b2f;
  --pulse-dark-active: #4b1d2d;
  --pulse-green: #216e4e;
  --pulse-green-soft: #e2f3ea;
  --pulse-blue: #175b88;
  --pulse-blue-soft: #e3f0f8;
  --pulse-red: #982534;
  --pulse-red-soft: #f9e4e6;
  --pulse-sans: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pulse-serif: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pulse-mono: Consolas, "SFMono-Regular", monospace;
}

/* Login is part of the redesigned surface, before a workspace is selected. */
#loginScreen {
  padding: 0;
  background: var(--pulse-paper);
  color: var(--pulse-ink);
  font-family: var(--pulse-sans);
}

#loginScreen .login-shell {
  width: 100%;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 46%) minmax(460px, 54%);
  background: var(--pulse-panel);
}

#loginScreen .login-showcase {
  position: relative;
  padding: 54px 64px 48px;
  border-right: 0;
  color: #fff;
  background: var(--pulse-dark);
}

#loginScreen .login-showcase::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--pulse-gold);
}

#loginScreen .login-showcase-mark {
  color: #e9dfe3;
  font-size: .75rem;
  letter-spacing: 0.11em;
}

#loginScreen .login-showcase-mark .material-symbols-rounded {
  border: 1px solid #75686e;
  border-radius: 0;
  color: var(--pulse-gold);
  background: transparent;
}

#loginScreen .login-kicker,
#loginScreen .login-eyebrow {
  color: var(--pulse-gold);
  letter-spacing: 0.12em;
}

#loginScreen .login-showcase h1 {
  max-width: 560px;
  margin: 18px 0 20px;
  color: #fff;
  font: 700 clamp(2.65rem, 5vw, 4.4rem)/0.98 var(--pulse-serif);
  letter-spacing: -0.045em;
}

#loginScreen .login-showcase-copy {
  max-width: 540px;
  color: #cfc4c8;
  font-size: 0.94rem;
  line-height: 1.65;
}

#loginScreen .login-benefit {
  color: #efe7ea;
}

#loginScreen .login-benefit .material-symbols-rounded {
  border-radius: 0;
  border: 1px solid #75686e;
  color: var(--pulse-gold);
  background: transparent;
}

#loginScreen .login-showcase-foot { color: #a99da2; }

#loginScreen .login-box {
  padding: 48px clamp(48px, 8vw, 110px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--pulse-panel);
}

#loginScreen .login-form { max-width: 470px; }

#loginScreen .login-brand-logo {
  width: 92px;
  margin-bottom: 18px;
}

#loginScreen .login-heading h2 {
  color: var(--pulse-ink);
  font: 700 clamp(2rem, 3.4vw, 2.8rem)/1.05 var(--pulse-serif);
  letter-spacing: -0.035em;
}

#loginScreen .login-heading p,
#loginScreen .login-security-note { color: var(--pulse-muted); }

#loginScreen .login-field label { color: var(--pulse-ink); }

#loginScreen .login-input-wrap,
#loginScreen .registration-panel {
  border-color: #aaa2a7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

#loginScreen .login-input-wrap:focus-within {
  border-color: var(--pulse-maroon-2);
  box-shadow: 0 0 0 3px rgba(227, 165, 63, 0.32);
}

#loginScreen .login-input-wrap .material-symbols-rounded { color: var(--pulse-maroon-2); }

#loginScreen .btn-primary {
  min-height: 48px;
  border: 1px solid var(--pulse-maroon);
  border-radius: 0;
  background: var(--pulse-maroon);
  color: #fff;
  box-shadow: none;
}

#loginScreen .btn-primary:hover {
  border-color: var(--pulse-maroon-2);
  background: var(--pulse-maroon-2);
  transform: none;
  box-shadow: none;
}

#loginScreen .btn-guest,
#loginScreen .login-create-account {
  min-height: 44px;
  border-color: var(--pulse-ink);
  border-radius: 0;
  color: var(--pulse-ink);
  background: #fff;
}

#loginScreen .btn-guest:hover,
#loginScreen .login-create-account:hover { background: #eee9e6; }

#loginScreen .divider::before,
#loginScreen .divider::after { background: var(--pulse-line); }

/* Shared Feedback Pulse application surface. */
body[data-ui-surface="feedback-pulse"] {
  --primary: var(--pulse-maroon);
  --primary-light: var(--pulse-maroon-2);
  --primary-dark: #430016;
  --accent: var(--pulse-maroon-2);
  --accent-light: var(--pulse-maroon-soft);
  --accent-dark: var(--pulse-maroon);
  --bg: var(--pulse-paper);
  --card-bg: var(--pulse-panel);
  --text: var(--pulse-ink);
  --text-muted: var(--pulse-muted);
  --border: var(--pulse-line);
  --border-focus: var(--pulse-maroon-2);
  --ring: rgba(227, 165, 63, 0.32);
  --radius: 0px;
  --radius-sm: 0px;
  --radius-lg: 0px;
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  background: var(--pulse-paper);
  color: var(--pulse-ink);
  font-family: var(--pulse-sans);
  font-size: 13px;
}

body[data-ui-surface="feedback-pulse"] button:focus-visible,
body[data-ui-surface="feedback-pulse"] a:focus-visible,
body[data-ui-surface="feedback-pulse"] input:focus-visible,
body[data-ui-surface="feedback-pulse"] select:focus-visible,
body[data-ui-surface="feedback-pulse"] textarea:focus-visible {
  outline: 3px solid var(--pulse-gold);
  outline-offset: 2px;
}

body[data-ui-surface] .app-layout { background: var(--pulse-paper); }

body[data-ui-surface] .sidebar {
  width: 220px;
  border: 0;
  border-right: 1px solid #e2e8ee;
  background: #fff;
  color: #293b4f;
  box-shadow: none;
  backdrop-filter: none;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-ui-surface] .sidebar.collapsed { width: 76px; }

body[data-ui-surface] .sidebar-brand {
  position: relative;
  min-height: 74px;
  padding: 16px 18px;
  gap: 10px;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
}

body[data-ui-surface] .sidebar-brand::before { content: none; }

body[data-ui-surface] .brand-icon {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #22a7aa, #1b6fa8);
  color: #fff;
  box-shadow: 0 7px 16px rgba(27, 111, 168, 0.19);
}

body[data-ui-surface] .brand-icon img { display: none; }

body[data-ui-surface] .brand-icon::before {
  content: "school";
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
}

body[data-ui-surface] .brand-name {
  color: #113d5d;
  background: none;
  font: 800 1.03rem/1.1 "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.035em;
  -webkit-text-fill-color: currentColor;
}

body[data-ui-surface] .brand-name::after { content: none; }

body[data-ui-surface] .sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e4ebf0;
  border-radius: 9px;
  background: #f8fafc;
  color: #738292;
}

body[data-ui-surface] .sidebar-collapse-btn:hover {
  border-color: #cad8e2;
  background: #eef5f9;
  color: #0b5989;
}

body[data-ui-surface] .sidebar-menu { padding: 18px 12px 22px; }

body[data-ui-surface] .menu-item {
  position: relative;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #77889d;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: none;
}

body[data-ui-surface] .menu-item:hover {
  background: #f2f7fa;
  color: #293b4f;
}

body[data-ui-surface] .menu-item.active {
  background: #e5f0f8;
  color: #0b5989;
  box-shadow: none;
}

body[data-ui-surface] .menu-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #ffb21c;
}

body[data-ui-surface] .menu-icon,
body[data-ui-surface] .menu-item.active .menu-icon {
  width: 22px;
  color: #8391a0;
  font-size: 20px;
}

body[data-ui-surface] .menu-item.active .menu-icon { color: #0c7db5; }

body[data-ui-surface] .sidebar-section-title {
  margin: 24px 0 9px 12px;
  color: #9aa6b2;
  font-size: .75rem;
  letter-spacing: 0.12em;
}

body[data-ui-surface] .sidebar-subjects-list { gap: 0; }

body[data-ui-surface] .sidebar-sub-item {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #77889d;
}

body[data-ui-surface] .sidebar-sub-item::before { color: #94a1ad; }

body[data-ui-surface] .sidebar-sub-item:hover,
body[data-ui-surface] .sidebar-sub-item.active {
  padding-left: 12px;
  background: #e5f0f8;
  color: #0b5989;
}

body[data-ui-surface] .sidebar-sub-item.active::before,
body[data-ui-surface] .sidebar-sub-item .sub-pct { color: #0c7db5; }

body[data-ui-surface] .sidebar-support {
  margin: 12px 12px 16px;
  padding: 14px;
  border: 1px solid #dceaf2;
  border-radius: 12px;
  background: linear-gradient(145deg, #f3f9fc, #edf6fa);
}

body[data-ui-surface] .sidebar-support-mark {
  width: 28px;
  height: 28px;
  margin-bottom: 9px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #ff9f1c;
  box-shadow: 0 3px 10px rgba(31, 48, 67, 0.08);
}

body[data-ui-surface] .sidebar-support strong { color: #26435a; }
body[data-ui-surface] .sidebar-support span:last-child { color: #738494; }

body[data-ui-surface] .sidebar-logout-mobile {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 12px 16px;
  padding: 10px 12px;
  border: 1px solid #e2e8ee;
  border-radius: 9px;
  background: #fff;
  color: #738292;
}

body[data-ui-surface] .sidebar-logout-mobile:hover {
  background: #f2f7fa;
  color: #0b5989;
}

body[data-ui-surface="feedback-pulse"] .main-container {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "header" "content" "footer";
  background: var(--pulse-paper);
}

body[data-ui-surface="feedback-pulse"] .insights-panel { display: none; }

body[data-ui-surface] .header-panel {
  min-height: 72px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--pulse-line);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-ui-surface] .breadcrumbs {
  color: var(--pulse-ink);
  font: 700 18px/1 var(--pulse-serif);
}

body[data-ui-surface] .breadcrumbs .current { color: var(--pulse-ink); }

body[data-ui-surface] .header-search { width: min(430px, 42vw); }

body[data-ui-surface] .header-search input {
  min-height: 42px;
  padding: 9px 42px;
  border: 1px solid #aaa2a7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-ui-surface] .header-search input:focus {
  border-color: var(--pulse-maroon-2);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 165, 63, 0.3);
}

body[data-ui-surface] .header-search .search-icon { color: var(--pulse-maroon-2); }

body[data-ui-surface] .toolbar-actions { gap: 7px; }

body[data-ui-surface] .toolbar-actions button,
body[data-ui-surface] .toolbar-btn {
  min-height: 40px;
  border: 1px solid var(--pulse-ink);
  border-radius: 0;
  background: #fff;
  color: var(--pulse-ink);
  box-shadow: none;
}

body[data-ui-surface] .toolbar-actions button:hover,
body[data-ui-surface] .toolbar-btn:hover {
  border-color: var(--pulse-maroon);
  background: var(--pulse-maroon-soft);
  color: var(--pulse-maroon);
  transform: none;
}

body[data-ui-surface="feedback-pulse"] .content-container {
  width: 100%;
  padding: 0 24px 34px;
}

/* Feedback Pulse heading grammar across every redesigned workspace. */
body[data-ui-surface="feedback-pulse"] .edu-hero,
body[data-ui-surface="feedback-pulse"] .cloud-view-hero,
body[data-ui-surface="feedback-pulse"] .quiz-view-hero {
  position: relative;
  min-height: 150px;
  margin: 0 -24px 18px;
  padding: 22px 24px;
  border: 0;
  border-bottom: 1px solid var(--pulse-line);
  border-radius: 0;
  color: var(--pulse-ink);
  background: #fff;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .edu-hero::before,
body[data-ui-surface="feedback-pulse"] .edu-hero::after,
body[data-ui-surface="feedback-pulse"] .quiz-view-hero::before,
body[data-ui-surface="feedback-pulse"] .quiz-view-hero::after,
body[data-ui-surface="feedback-pulse"] .cloud-view-hero::before,
body[data-ui-surface="feedback-pulse"] .cloud-view-hero::after { content: none; }

body[data-ui-surface="feedback-pulse"] .edu-kicker,
body[data-ui-surface="feedback-pulse"] .cloud-view-kicker,
body[data-ui-surface="feedback-pulse"] .quiz-view-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--pulse-maroon-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body[data-ui-surface="feedback-pulse"] .edu-kicker::before,
body[data-ui-surface="feedback-pulse"] .cloud-view-kicker::before,
body[data-ui-surface="feedback-pulse"] .quiz-view-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--pulse-gold);
}

body[data-ui-surface="feedback-pulse"] .edu-hero h1,
body[data-ui-surface="feedback-pulse"] .cloud-view-hero h1,
body[data-ui-surface="feedback-pulse"] .quiz-view-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--pulse-ink);
  font: 700 clamp(2rem, 3.3vw, 2.7rem)/1.04 var(--pulse-serif);
  letter-spacing: -0.035em;
}

body[data-ui-surface="feedback-pulse"] .edu-hero p,
body[data-ui-surface="feedback-pulse"] .cloud-view-hero p,
body[data-ui-surface="feedback-pulse"] .quiz-view-hero p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--pulse-muted);
  font-size: 12px;
  line-height: 1.5;
}

body[data-ui-surface="feedback-pulse"] .edu-hero-stats { min-width: 230px; }

body[data-ui-surface="feedback-pulse"] .edu-hero-stat,
body[data-ui-surface="feedback-pulse"] .cloud-view-sync,
body[data-ui-surface="feedback-pulse"] .cloud-sync-chip,
body[data-ui-surface="feedback-pulse"] .quiz-ai-status,
body[data-ui-surface="feedback-pulse"] .sim-ai-status {
  border: 1px solid #d9bb75;
  border-radius: 0;
  background: var(--pulse-gold-soft);
  color: #704300;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .edu-hero-stat strong { color: var(--pulse-maroon); }
body[data-ui-surface="feedback-pulse"] .edu-hero-stat span { color: var(--pulse-muted); }
body[data-ui-surface="feedback-pulse"] .cloud-sync-chip { border-radius: 0; }

body[data-ui-surface="feedback-pulse"] .section-eyebrow {
  min-height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--pulse-line);
  border-bottom: 0;
  background: #fff;
}

body[data-ui-surface="feedback-pulse"] .section-eyebrow h2,
body[data-ui-surface="feedback-pulse"] .cloud-panel-heading h2,
body[data-ui-surface="feedback-pulse"] .quiz-panel-heading h2,
body[data-ui-surface="feedback-pulse"] .bank-library-header h2 {
  color: var(--pulse-ink);
  font: 700 17px/1.2 var(--pulse-serif);
  letter-spacing: -0.01em;
}

/* Cards, panels, tables, and data rows use square editorial surfaces. */
body[data-ui-surface="feedback-pulse"] :where(
  .add-subject-form,
  .subject-card,
  .single-subject-view,
  .topic-card-large,
  .cloud-panel,
  .cloud-stat,
  .mastery-stat,
  .mastery-row,
  .understanding-card,
  .quiz-panel,
  .quiz-bank-import,
  .quiz-editor-section,
  .bank-editor-section,
  .bank-library,
  .bank-card,
  .bank-library-card,
  .active-strategy-note,
  .sim-review-analysis-card,
  .sim-review-card,
  .source-option,
  .quiz-source-option,
  .active-source-option,
  .study-pack-card,
  .study-pack-item,
  .metric-card
) {
  border: 1px solid var(--pulse-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .subjects-grid { gap: 10px; }

body[data-ui-surface="feedback-pulse"] .subject-card {
  border-left: 4px solid var(--pulse-maroon-2);
}

body[data-ui-surface="feedback-pulse"] .subject-card::before { content: none; }

body[data-ui-surface="feedback-pulse"] .subject-card:nth-child(3n + 2),
body[data-ui-surface="feedback-pulse"] .subject-card:nth-child(3n + 3) {
  border-left-color: var(--pulse-gold);
}

body[data-ui-surface="feedback-pulse"] .subject-card:hover {
  border-color: #a58f98;
  border-left-color: var(--pulse-maroon);
  box-shadow: none;
  transform: none;
}

body[data-ui-surface="feedback-pulse"] .subject-header { min-height: 84px; padding: 14px 16px; }

body[data-ui-surface="feedback-pulse"] .subject-code,
body[data-ui-surface="feedback-pulse"] .subject-access-code {
  color: var(--pulse-maroon);
  font-family: var(--pulse-mono);
}

body[data-ui-surface="feedback-pulse"] .subject-code-label { color: var(--pulse-muted); }
body[data-ui-surface="feedback-pulse"] .subject-name { color: var(--pulse-ink); }

body[data-ui-surface="feedback-pulse"] .subject-meta-chip,
body[data-ui-surface="feedback-pulse"] .subject-status-chip,
body[data-ui-surface="feedback-pulse"] .subject-actions,
body[data-ui-surface="feedback-pulse"] .subject-actions .subject-action-btn,
body[data-ui-surface="feedback-pulse"] .subject-expand-btn {
  border-radius: 0;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .subject-meta-chip,
body[data-ui-surface="feedback-pulse"] .subject-status-chip,
body[data-ui-surface="feedback-pulse"] .subject-actions { background: var(--pulse-paper); }

body[data-ui-surface="feedback-pulse"] .subject-expand-btn:hover,
body[data-ui-surface="feedback-pulse"] .subject-actions .subject-action-btn:hover {
  border-color: var(--pulse-maroon-2);
  background: var(--pulse-maroon-soft);
  color: var(--pulse-maroon);
}

body[data-ui-surface="feedback-pulse"] .subject-progress .progress-fill,
body[data-ui-surface="feedback-pulse"] .mastery-fill,
body[data-ui-surface="feedback-pulse"] .cloud-progress-fill {
  background: var(--pulse-maroon-2);
}

body[data-ui-surface="feedback-pulse"] .topics-area.open {
  border-color: var(--pulse-line);
  background: #fff;
}

body[data-ui-surface="feedback-pulse"] .topic-num,
body[data-ui-surface="feedback-pulse"] .topic-badge-num,
body[data-ui-surface="feedback-pulse"] .quiz-step-number,
body[data-ui-surface="feedback-pulse"] .sim-step-number {
  border-radius: 0;
  background: var(--pulse-maroon-soft);
  color: var(--pulse-maroon);
}

body[data-ui-surface="feedback-pulse"] .cloud-workspace-grid,
body[data-ui-surface="feedback-pulse"] .quiz-generator-grid,
body[data-ui-surface="feedback-pulse"] .active-learning-grid,
body[data-ui-surface="feedback-pulse"] .question-bank-layout,
body[data-ui-surface="feedback-pulse"] .sim-builder-grid { gap: 16px; }

body[data-ui-surface="feedback-pulse"] .cloud-panel,
body[data-ui-surface="feedback-pulse"] .quiz-panel,
body[data-ui-surface="feedback-pulse"] .quiz-bank-import,
body[data-ui-surface="feedback-pulse"] .bank-library { padding: 0; }

body[data-ui-surface="feedback-pulse"] .cloud-panel-heading,
body[data-ui-surface="feedback-pulse"] .quiz-panel-heading,
body[data-ui-surface="feedback-pulse"] .bank-library-header {
  min-height: 64px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pulse-line);
  background: #fff;
}

body[data-ui-surface="feedback-pulse"] .cloud-panel-heading p,
body[data-ui-surface="feedback-pulse"] .quiz-panel-heading p,
body[data-ui-surface="feedback-pulse"] .bank-library-header p { color: var(--pulse-muted); }

body[data-ui-surface="feedback-pulse"] .cloud-panel > :not(.cloud-panel-heading),
body[data-ui-surface="feedback-pulse"] .quiz-panel > :not(.quiz-panel-heading) { margin-left: 16px; margin-right: 16px; }

body[data-ui-surface="feedback-pulse"] .cloud-stat,
body[data-ui-surface="feedback-pulse"] .mastery-stat {
  padding: 15px;
  border-top: 3px solid var(--pulse-gold);
}

body[data-ui-surface="feedback-pulse"] .cloud-stat strong,
body[data-ui-surface="feedback-pulse"] .mastery-stat strong { color: var(--pulse-maroon); }

body[data-ui-surface="feedback-pulse"] .cloud-table-wrap,
body[data-ui-surface="feedback-pulse"] .super-admin-table-wrap,
body[data-ui-surface="feedback-pulse"] .mastery-table-wrap {
  border: 1px solid var(--pulse-line);
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}

body[data-ui-surface="feedback-pulse"] table { border-collapse: collapse; }

body[data-ui-surface="feedback-pulse"] th {
  border-bottom: 1px solid var(--pulse-line);
  background: #eeeae7;
  color: var(--pulse-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-ui-surface="feedback-pulse"] td { border-bottom: 1px solid var(--pulse-line); }
body[data-ui-surface="feedback-pulse"] tr:last-child td { border-bottom: 0; }

/* Inputs and actions match Feedback Pulse exactly: square, bordered, explicit. */
body[data-ui-surface="feedback-pulse"] :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .quiz-input,
  .quiz-select,
  .quiz-textarea,
  .cloud-input,
  .bank-search-input
) {
  min-height: 42px;
  border: 1px solid #aaa2a7;
  border-radius: 0;
  background: #fff;
  color: var(--pulse-ink);
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] textarea { min-height: 92px; }

body[data-ui-surface="feedback-pulse"] :where(input, select, textarea):focus {
  border-color: var(--pulse-maroon-2);
  box-shadow: 0 0 0 3px rgba(227, 165, 63, 0.26);
}

body[data-ui-surface="feedback-pulse"] input[type="checkbox"],
body[data-ui-surface="feedback-pulse"] input[type="radio"] { accent-color: var(--pulse-maroon); }

body[data-ui-surface="feedback-pulse"] :where(
  .btn-primary,
  .cloud-primary-action,
  .cloud-primary-btn,
  .quiz-primary-btn,
  .bank-primary-btn,
  .active-primary-btn,
  .sim-primary-btn
) {
  min-height: 42px;
  border: 1px solid var(--pulse-maroon);
  border-radius: 0;
  background: var(--pulse-maroon);
  color: #fff;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] :where(
  .btn-primary,
  .cloud-primary-action,
  .cloud-primary-btn,
  .quiz-primary-btn,
  .bank-primary-btn,
  .active-primary-btn,
  .sim-primary-btn
):hover {
  border-color: var(--pulse-maroon-2);
  background: var(--pulse-maroon-2);
  color: #fff;
  box-shadow: none;
  transform: none;
}

body[data-ui-surface="feedback-pulse"] :where(
  .btn-secondary,
  .cloud-secondary-btn,
  .quiz-secondary-btn,
  .bank-secondary-btn,
  .active-secondary-btn,
  .sim-secondary-btn
) {
  border: 1px solid var(--pulse-ink);
  border-radius: 0;
  background: #fff;
  color: var(--pulse-ink);
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] :where(
  .btn-secondary,
  .cloud-secondary-btn,
  .quiz-secondary-btn,
  .bank-secondary-btn,
  .active-secondary-btn,
  .sim-secondary-btn
):hover {
  background: #eee9e6;
  color: var(--pulse-ink);
  transform: none;
}

body[data-ui-surface="feedback-pulse"] :where(
  .quiz-choice,
  .bank-type-choice,
  .bank-kind-option span,
  .quiz-delivery-option,
  .quiz-delivery-choice,
  .source-option,
  .quiz-source-option,
  .active-source-option
) {
  border-radius: 0;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] :where(
  .quiz-choice:has(input:checked),
  .bank-type-choice:has(input:checked),
  .bank-kind-option input:checked + span,
  .quiz-delivery-option:has(input:checked),
  .quiz-delivery-choice:has(input:checked)
) {
  border-color: var(--pulse-maroon-2);
  background: var(--pulse-maroon-soft);
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .taxonomy-guidance,
body[data-ui-surface="feedback-pulse"] .active-strategy-note,
body[data-ui-surface="feedback-pulse"] .sim-source-state,
body[data-ui-surface="feedback-pulse"] .sim-quality-callout,
body[data-ui-surface="feedback-pulse"] .focus-note {
  border: 0;
  border-left: 4px solid var(--pulse-gold);
  border-radius: 0;
  background: var(--pulse-gold-soft);
  color: #704300;
  box-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .question-bank-hero {
  background: #fff;
  color: var(--pulse-ink);
}

body[data-ui-surface="feedback-pulse"] .question-bank-hero h1,
body[data-ui-surface="feedback-pulse"] .question-bank-hero p,
body[data-ui-surface="feedback-pulse"] .question-bank-hero .quiz-view-kicker {
  color: var(--pulse-ink);
  opacity: 1;
  text-shadow: none;
}

body[data-ui-surface="feedback-pulse"] .question-bank-hero .quiz-view-kicker { color: var(--pulse-maroon-2); }

body[data-ui-surface="feedback-pulse"] .bank-hero-stats,
body[data-ui-surface="feedback-pulse"] .question-bank-stats {
  border: 1px solid #d9bb75;
  border-radius: 0;
  background: var(--pulse-gold-soft);
}

body[data-ui-surface="feedback-pulse"] .bank-hero-stat,
body[data-ui-surface="feedback-pulse"] .question-bank-stat {
  border-color: #d9bb75;
  border-radius: 0;
  background: transparent;
  color: #704300;
}

body[data-ui-surface="feedback-pulse"] .bank-hero-stat strong,
body[data-ui-surface="feedback-pulse"] .question-bank-stat strong { color: var(--pulse-maroon); }

body[data-ui-surface="feedback-pulse"] .question-bank-stat span {
  color: #704300;
  opacity: 1;
}

body[data-ui-surface="feedback-pulse"] .bank-library-card,
body[data-ui-surface="feedback-pulse"] .bank-card {
  border-left: 4px solid var(--pulse-maroon-2);
}

body[data-ui-surface="feedback-pulse"] .bank-tag,
body[data-ui-surface="feedback-pulse"] .quiz-tag,
body[data-ui-surface="feedback-pulse"] .topic-tag,
body[data-ui-surface="feedback-pulse"] .meta-tag {
  border: 0;
  border-radius: 0;
  background: var(--pulse-maroon-soft);
  color: var(--pulse-maroon-2);
}

body[data-ui-surface="feedback-pulse"] .study-pack-item,
body[data-ui-surface="feedback-pulse"] .mastery-row { border-left: 4px solid var(--pulse-maroon-2); }

body[data-ui-surface="feedback-pulse"] .mastery-track,
body[data-ui-surface="feedback-pulse"] .mastery-fill,
body[data-ui-surface="feedback-pulse"] .mastery-why-btn {
  border-radius: 0;
}

body[data-ui-surface="feedback-pulse"] .mastery-why-btn {
  border-color: var(--pulse-ink);
  color: var(--pulse-maroon);
}

body[data-ui-surface="feedback-pulse"] .active-strategy-help {
  border: 0;
  border-left: 4px solid var(--pulse-gold);
  border-radius: 0;
  background: var(--pulse-gold-soft);
  color: #704300;
}

body[data-ui-surface="feedback-pulse"] .study-pack-item:hover,
body[data-ui-surface="feedback-pulse"] .mastery-row:hover {
  border-color: #a58f98;
  border-left-color: var(--pulse-maroon);
  background: #fbf8f7;
  transform: none;
}

body[data-ui-surface="feedback-pulse"] .footer-panel {
  border-top: 1px solid var(--pulse-line);
  background: #fff;
  color: var(--pulse-muted);
}

body[data-ui-surface="feedback-pulse"] .footer-panel a { color: var(--pulse-maroon-2); }

/* Feedback Pulse iframe already owns the reference visual system. */
body[data-ui-surface="feedback-pulse"] .main-container.feedback-pulse-view-active .content-container { padding: 0; }
body[data-ui-surface="feedback-pulse"] .feedback-pulse-view { background: var(--pulse-paper); }

/* Responsive rhythm follows the compact Feedback Pulse breakpoints. */
@media (max-width: 1100px) {
  #loginScreen .login-shell { grid-template-columns: 42% 58%; }
  #loginScreen .login-showcase { padding: 44px 38px; }

  body[data-ui-surface] .sidebar { width: 220px; }
  body[data-ui-surface="feedback-pulse"] .edu-hero,
  body[data-ui-surface="feedback-pulse"] .cloud-view-hero,
  body[data-ui-surface="feedback-pulse"] .quiz-view-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  #loginScreen .login-shell { grid-template-columns: 1fr; }
  #loginScreen .login-showcase { display: none; }
  #loginScreen .login-box { min-height: 100vh; padding: 44px 28px; }

  body[data-ui-surface] .sidebar { width: 260px; }
  body[data-ui-surface] .header-panel { padding: 10px 16px; }
  body[data-ui-surface="feedback-pulse"] .content-container { padding-left: 16px; padding-right: 16px; }
  body[data-ui-surface="feedback-pulse"] .edu-hero,
  body[data-ui-surface="feedback-pulse"] .cloud-view-hero,
  body[data-ui-surface="feedback-pulse"] .quiz-view-hero { margin-left: -16px; margin-right: -16px; padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 700px) {
  body[data-ui-surface] .header-panel {
    min-height: 64px;
    flex-wrap: wrap;
  }

  body[data-ui-surface] .header-search {
    order: 3;
    width: 100%;
  }

  body[data-ui-surface] .toolbar-actions button .btn-label { display: none; }

  body[data-ui-surface="feedback-pulse"] .edu-hero-stats,
  body[data-ui-surface="feedback-pulse"] .mastery-stat-grid,
  body[data-ui-surface="feedback-pulse"] .super-admin-stat-grid { grid-template-columns: 1fr 1fr; width: 100%; }

  body[data-ui-surface="feedback-pulse"] .subject-header { grid-template-columns: 1fr; }
  body[data-ui-surface="feedback-pulse"] .subject-card-controls { justify-content: space-between; }
}

@media (max-width: 480px) {
  #loginScreen .login-box { padding: 34px 20px; }
  #loginScreen .login-brand-logo { width: 78px; }
  #loginScreen .login-heading h2 { font-size: 2rem; }

  body[data-ui-surface="feedback-pulse"] .content-container { padding-left: 12px; padding-right: 12px; }
  body[data-ui-surface="feedback-pulse"] .edu-hero,
  body[data-ui-surface="feedback-pulse"] .cloud-view-hero,
  body[data-ui-surface="feedback-pulse"] .quiz-view-hero { margin-left: -12px; margin-right: -12px; }
}
