@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand: HGK Default Colors */
  --brand-primary: #0b7c7a;      /* Teal */
  --brand-secondary: #19395a;    /* Navy */
  --brand-accent: #b97a22;       /* Gold */
  --brand-light: #f0f7f7;        /* Very light teal-gray */
  --brand-gradient: linear-gradient(135deg, #19395a 0%, #0b7c7a 100%);
  
  /* System UI Colors */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --color-text: #1e293b;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-success-border: #a7f3d0;
  
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;
  
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fca5a5;

  --color-info: #3b82f6;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* MNSK Theme overrides when body has class brand-mnsk */
body.brand-mnsk {
  --brand-primary: #800020;      /* Maroon */
  --brand-secondary: #2d3748;    /* Charcoal/Navy */
  --brand-accent: #c5a059;       /* Muted Gold */
  --brand-light: #faf3f4;        /* Very light maroon-gray */
  --brand-gradient: linear-gradient(135deg, #2d3748 0%, #800020 100%);
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  padding-bottom: 60px;
}

/* Page container */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header & Navbar */
.brand-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--brand-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.brand-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-secondary);
  letter-spacing: -0.5px;
}

.brand-logo-text span {
  color: var(--brand-primary);
}

.brand-nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.brand-nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.brand-nav-link:hover, .brand-nav-link.active {
  color: var(--brand-primary);
  background: var(--brand-light);
}

.brand-switcher-btn {
  background: var(--brand-light);
  border: 1px solid var(--color-border);
  color: var(--brand-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.brand-switcher-btn:hover {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}

/* Hero Section */
.hero-section {
  padding: 40px 32px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  transform: rotate(-15deg);
  pointer-events: none;
}

.hero-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-accent);
  opacity: 0.95;
  margin-bottom: 12px;
}

.hero-section h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-section p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 780px;
}

/* Dashboard Hub Grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

.hub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.hub-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 8px;
}

.hub-card p {
  font-size: 13.5px;
  color: var(--color-muted);
  flex-grow: 1;
  margin-bottom: 20px;
}

.hub-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}

.hub-card-link:hover {
  color: var(--brand-secondary);
}

/* Tool Layout Grid */
.tool-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.card-panel {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}

.panel-header {
  padding: 18px 24px;
  background: var(--brand-light);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-secondary);
}

.panel-header p {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 2px;
}

.panel-body {
  padding: 24px;
}

/* Form Styles */
.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 6px;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

select, input[type="text"], input[type="number"], textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text);
  background-color: var(--bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--brand-primary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(11, 124, 122, 0.12);
}

body.brand-mnsk select:focus, 
body.brand-mnsk input:focus, 
body.brand-mnsk textarea:focus {
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.12);
}

/* Checkbox lists */
.checkbox-list {
  display: grid;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.checkbox-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.checkbox-label-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
}

.checkbox-desc {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 2px;
}

/* Visual Option Grid / Cards (instead of select dropdowns) */
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.option-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.option-card:hover {
  border-color: var(--brand-primary);
  background: var(--brand-light);
}

.option-card.selected {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  box-shadow: 0 0 0 1px var(--brand-primary);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  width: 18px;
  height: 18px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.option-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-secondary);
  padding-right: 16px;
}

.option-card-desc {
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.35;
}

/* Action Buttons */
.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background: var(--brand-secondary);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

.btn-secondary:hover {
  background: var(--bg-page);
  color: var(--brand-secondary);
  border-color: var(--brand-secondary);
}

/* Explanation Tooltip Block */
.why-block {
  margin-top: 10px;
  padding: 10px 14px;
  background-color: var(--brand-light);
  border-left: 3px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.5px;
  color: var(--color-text);
  line-height: 1.45;
}

.why-block strong {
  color: var(--brand-secondary);
}

/* Suggestion Chips (TDS/TCS keywords) */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.suggestion-chip {
  background: var(--bg-page);
  border: 1px solid var(--color-border);
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: var(--transition);
}

.suggestion-chip:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* Results / Status Panel */
.result-status-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
  transition: var(--transition);
}

.result-status-card.good {
  background-color: var(--color-success-bg);
  border-color: var(--color-success-border);
}

.result-status-card.warn {
  background-color: var(--color-warning-bg);
  border-color: var(--color-warning-border);
}

.result-status-card.risk {
  background-color: var(--color-danger-bg);
  border-color: var(--color-danger-border);
}

.result-status-card.info {
  background-color: var(--color-info-bg);
  border-color: var(--color-info-border);
}

.result-status-title {
  display:block;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-secondary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.result-status-desc {
  font-size: 13px;
  color: var(--color-muted);
}

/* Result detail items */
.result-detail-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.result-detail-item {
  padding: 14px 16px;
  background-color: var(--bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--color-text);
  position: relative;
  padding-left: 36px;
}

.result-detail-item::before {
  content: '•';
  color: var(--brand-primary);
  font-size: 22px;
  position: absolute;
  left: 16px;
  top: 8px;
}

.result-detail-item b {
  color: var(--brand-secondary);
}

.result-grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat-box {
  background: var(--bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-align: center;
}

.stat-box span {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-muted);
  letter-spacing: 0.5px;
}

.stat-box b {
  display: block;
  font-size: 15px;
  color: var(--brand-secondary);
  margin-top: 4px;
}

/* Circular Progress / Gauge for Invoice Checker */
.progress-gauge-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-page);
  border: 1px solid var(--color-border);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.progress-gauge-circle {
  width: 68px;
  height: 68px;
  position: relative;
}

.progress-gauge-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-gauge-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 6;
}

.progress-gauge-bar {
  fill: none;
  stroke: var(--brand-primary);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s;
}

.progress-gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-secondary);
}

.progress-gauge-info h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-secondary);
}

.progress-gauge-info p {
  font-size: 11.5px;
  color: var(--color-muted);
}

/* Stepper Wizard Styling for ITR Chooser */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 24px;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-border);
  z-index: 1;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  position: relative;
  flex: 1;
}

.wizard-step-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  transition: var(--transition);
}

.wizard-step.active .wizard-step-node {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--brand-light);
}

.wizard-step.completed .wizard-step-node {
  border-color: var(--brand-primary);
  background-color: var(--brand-primary);
  color: #fff;
}

.wizard-step-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-muted);
  margin-top: 6px;
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--brand-secondary);
}

.wizard-panel-slide {
  display: none;
}

.wizard-panel-slide.active {
  display: block;
}

/* Inline calculations */
.calc-box {
  margin-top: 14px;
  padding: 16px;
  background: var(--bg-page);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--color-border);
}

.calc-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.calc-row.total {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-secondary);
  border-bottom: none;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
  margin-top: 8px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-tds { background: var(--brand-light); color: var(--brand-primary); border: 1px solid rgba(11, 124, 122, 0.2); }
.badge-tcs { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-salary { background: var(--brand-light); color: var(--brand-secondary); }

/* Disclaimer & Footer */
.disclaimer-section {
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  line-height: 1.5;
}

.lead-cta-card {
  margin-top: 24px;
  padding: 24px;
  background: var(--brand-gradient);
  color: #fff;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.lead-cta-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.lead-cta-card p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}

.lead-cta-btn {
  background: #ffffff;
  color: var(--brand-primary);
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  display: inline-block;
  transition: var(--transition);
}

.lead-cta-btn:hover {
  background: var(--brand-accent);
  color: #fff;
}

/* Match details */
.matches-section {
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}

.matches-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 12px;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-item {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: var(--transition);
}

.match-item:hover {
  border-color: var(--brand-primary);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.match-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-secondary);
}

.match-desc {
  font-size: 12px;
  color: var(--color-muted);
}

@media (max-width: 860px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .hero-section {
    padding: 30px 20px;
  }
  .hero-section h1 {
    font-size: 26px;
  }
  .brand-header-nav {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .brand-nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 480px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
  .btn-group {
    flex-direction: column;
    gap: 10px;
  }
  .btn {
    width: 100%;
  }
}
