/**
 * Tax Calendar — public page (mockup palette)
 */
.tax-calendar-page {
  --tc-blue: #0056b3;
  --tc-blue-dark: #004494;
  --tc-blue-soft: #e8f1fb;
  --tc-orange: #f39c12;
  --tc-purple: #8e44ad;
  --tc-red: #e74c3c;
  --tc-green: #27ae60;
  --tc-navy: #0a1128;
  --tc-bg: #f8f9fa;
  --tc-white: #ffffff;
  --tc-text: #333333;
  --tc-muted: #6c757d;
  --tc-border: #e9ecef;
  --tc-radius: 12px;
  --tc-shadow: 0 4px 20px rgba(10, 17, 40, 0.06);
}

.tc-page {
  font-family: 'Source Sans 3', 'Inter', sans-serif;
  color: var(--tc-text);
  background: var(--tc-bg);
  line-height: 1.55;
}

.tc-page h1,
.tc-page h2,
.tc-page h3,
.tc-page h4 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--tc-navy);
}

.tc-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb */
.tc-breadcrumb {
  padding: 20px 0 8px;
  font-size: 13px;
  color: var(--tc-muted);
}

.tc-breadcrumb a {
  color: var(--tc-muted);
  text-decoration: none;
}

.tc-breadcrumb a:hover {
  color: var(--tc-blue);
}

.tc-breadcrumb span.sep {
  margin: 0 8px;
  opacity: 0.5;
}

/* Hero */
.tc-hero {
  padding: 8px 0 32px;
}

.tc-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}

.tc-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 700;
}

.tc-hero h1 em {
  font-style: normal;
  color: var(--tc-orange);
}

.tc-hero-desc {
  font-size: 16px;
  color: var(--tc-muted);
  margin: 0 0 22px;
  max-width: 520px;
}

.tc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
  font-family: inherit;
}

.tc-btn-primary {
  background: var(--tc-blue);
  color: #fff;
}

.tc-btn-primary:hover {
  background: var(--tc-blue-dark);
  color: #fff;
}

.tc-btn-outline {
  background: var(--tc-white);
  color: var(--tc-blue);
  border: 2px solid var(--tc-blue);
}

.tc-btn-outline:hover {
  background: var(--tc-blue-soft);
}

.tc-btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Compliance card */
.tc-compliance-card {
  background: var(--tc-white);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  border: 1px solid var(--tc-border);
  padding: 24px;
}

.tc-compliance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tc-compliance-head h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.tc-compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-green);
}

.tc-compliance-body {
  display: flex;
  gap: 20px;
  align-items: center;
}

.tc-gauge {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

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

.tc-gauge svg circle:last-of-type {
  stroke-dasharray: 326.7;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.6s ease;
}

.tc-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tc-gauge-pct {
  font-size: 26px;
  font-weight: 800;
  color: var(--tc-green);
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.tc-gauge-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-green);
  text-transform: uppercase;
}

.tc-compliance-meta p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--tc-muted);
}

.tc-compliance-meta strong {
  display: block;
  color: var(--tc-navy);
  font-size: 14px;
  margin-bottom: 4px;
}

.tc-compliance-meta .tc-next-date {
  font-size: 18px;
  font-weight: 700;
  color: var(--tc-navy);
  font-family: 'Inter', sans-serif;
}

.tc-days-left {
  color: var(--tc-orange);
  font-weight: 600;
  font-size: 13px;
}

/* Stats row */
.tc-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.tc-stat-card {
  background: var(--tc-white);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  padding: 18px 16px;
  box-shadow: var(--tc-shadow);
}

.tc-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.tc-stat-icon.blue { background: var(--tc-blue-soft); color: var(--tc-blue); }
.tc-stat-icon.purple { background: #f3ebf7; color: var(--tc-purple); }
.tc-stat-icon.orange { background: #fef5e7; color: var(--tc-orange); }
.tc-stat-icon.green { background: #eafaf1; color: var(--tc-green); }
.tc-stat-icon.navy { background: #e8eaf0; color: var(--tc-navy); }

.tc-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--tc-navy);
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.tc-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--tc-navy);
  margin: 4px 0 2px;
}

.tc-stat-sub {
  font-size: 11px;
  color: var(--tc-muted);
}

/* Main layout */
.tc-main {
  padding-bottom: 48px;
}

.tc-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.tc-card {
  background: var(--tc-white);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.tc-card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--tc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tc-card-head h2 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

/* Calendar toolbar */
.tc-cal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-cal-nav-btn {
  background: var(--tc-bg);
  border: 1px solid var(--tc-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--tc-navy);
  font-family: inherit;
}

.tc-cal-nav-btn:hover {
  border-color: var(--tc-blue);
  color: var(--tc-blue);
}

#public-kra-cal-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--tc-navy);
  min-width: 140px;
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
}

/* Legend */
.tc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 12px 20px;
  background: var(--tc-bg);
  border-bottom: 1px solid var(--tc-border);
  font-size: 12px;
  color: var(--tc-muted);
}

.tc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc-dot.vat { background: var(--tc-blue); }
.tc-dot.paye { background: var(--tc-purple); }
.tc-dot.wht { background: var(--tc-orange); }
.tc-dot.corp { background: var(--tc-red); }
.tc-dot.excise { background: var(--tc-green); }
.tc-dot.other { background: #95a5a6; }

/* Calendar grid */
.tc-calendar-inner {
  padding: 12px 16px 16px;
}

.tc-calendar-inner .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.tc-calendar-inner .cal-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-muted);
  padding: 8px 4px;
  text-transform: uppercase;
  font-family: 'Source Sans 3', sans-serif;
}

.tc-calendar-inner .cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.tc-calendar-inner .cal-cell {
  min-height: 88px;
  border: 1px solid var(--tc-border);
  border-radius: 8px;
  padding: 6px;
  background: var(--tc-white);
  position: relative;
}

.tc-calendar-inner .cal-cell.prev-month {
  opacity: 0.35;
  background: #fafbfc;
}

.tc-calendar-inner .cal-cell.today {
  border-color: var(--tc-blue);
  box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.15);
}

.tc-calendar-inner .cal-cell.kra-cal-focus {
  box-shadow: 0 0 0 2px var(--tc-orange);
}

.tc-calendar-inner .cal-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--tc-navy);
  display: block;
  margin-bottom: 4px;
}

.tc-calendar-inner .cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tc-calendar-inner .cal-event {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 4px;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-calendar-inner .event-blue { background: var(--tc-blue); }
.tc-calendar-inner .event-purple { background: var(--tc-purple); }
.tc-calendar-inner .event-orange { background: var(--tc-orange); }
.tc-calendar-inner .event-red { background: var(--tc-red); }
.tc-calendar-inner .event-green { background: var(--tc-green); }

/* Upcoming deadlines */
.tc-deadlines-list {
  padding: 8px 0;
}

.tc-deadline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tc-border);
  cursor: pointer;
  transition: background 0.15s;
}

.tc-deadline-row:last-child {
  border-bottom: none;
}

.tc-deadline-row:hover {
  background: var(--tc-bg);
}

.tc-deadline-date {
  text-align: center;
  min-width: 56px;
  flex-shrink: 0;
}

.tc-deadline-date .mon {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--tc-blue);
  letter-spacing: 0.05em;
}

.tc-deadline-date .day {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--tc-navy);
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.tc-deadline-date .dow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--tc-muted);
  text-transform: uppercase;
}

.tc-deadline-info {
  flex: 1;
  min-width: 0;
}

.tc-deadline-info h4 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--tc-navy);
}

.tc-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tc-tag.vat { background: var(--tc-blue-soft); color: var(--tc-blue); }
.tc-tag.paye { background: #f3ebf7; color: var(--tc-purple); }
.tc-tag.withholding { background: #fef5e7; color: var(--tc-orange); }
.tc-tag.corporate,
.tc-tag.provisional { background: #fdecea; color: var(--tc-red); }
.tc-tag.excise { background: #eafaf1; color: var(--tc-green); }
.tc-tag.other { background: #f0f0f0; color: #666; }

.tc-countdown {
  font-size: 13px;
  font-weight: 700;
  color: var(--tc-orange);
  white-space: nowrap;
}

.tc-countdown.soon {
  color: var(--tc-red);
}

.tc-countdown.ok {
  color: var(--tc-green);
}

/* Reminder banner */
.tc-reminder-banner {
  background: linear-gradient(135deg, #e8f1fb 0%, #f0f7ff 100%);
  border: 1px solid #c5daf5;
  border-radius: var(--tc-radius);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tc-reminder-banner h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  margin: 0 0 6px;
}

.tc-reminder-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--tc-muted);
}

.tc-reminder-channels {
  display: flex;
  gap: 12px;
  font-size: 22px;
}

/* Heatmap */
.tc-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  padding: 16px 20px 8px;
}

.tc-heatmap-month {
  text-align: center;
}

.tc-heatmap-month span.label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--tc-muted);
  margin-top: 6px;
  text-transform: uppercase;
}

.tc-heatmap-cell {
  height: 36px;
  border-radius: 6px;
  background: #e9ecef;
}

.tc-heatmap-cell.l1 { background: #d5f5e3; }
.tc-heatmap-cell.l2 { background: #f9e79f; }
.tc-heatmap-cell.l3 { background: #f5cba7; }
.tc-heatmap-cell.l4 { background: #f1948a; }

.tc-heatmap-legend {
  display: flex;
  gap: 16px;
  padding: 8px 20px 18px;
  font-size: 11px;
  color: var(--tc-muted);
  flex-wrap: wrap;
}

.tc-heatmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tc-heatmap-legend i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

/* Sidebar widgets */
.tc-sidebar .tc-card {
  padding: 0;
}

.tc-widget-body {
  padding: 18px 20px;
}

.tc-form-group {
  margin-bottom: 14px;
}

.tc-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-muted);
  margin-bottom: 6px;
}

.tc-calc-panel[hidden] {
  display: none !important;
}

.tc-calc-panel {
  margin-bottom: 4px;
}

#tc-tax-calc .tc-form-group select {
  appearance: auto;
  -webkit-appearance: menulist;
  cursor: pointer;
  background-color: #fff;
}

.tc-form-group select,
.tc-form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tc-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--tc-navy);
}

.tc-calc-results {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--tc-border);
}

.tc-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  color: var(--tc-muted);
}

.tc-calc-row strong {
  color: var(--tc-navy);
}

.tc-net-pay {
  margin-top: 12px;
  padding: 14px;
  background: #eafaf1;
  border-radius: 8px;
  text-align: center;
}

.tc-net-pay span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--tc-muted);
  text-transform: uppercase;
}

.tc-net-pay strong {
  font-size: 26px;
  color: var(--tc-green);
  font-family: 'Inter', sans-serif;
}

.tc-ai-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tc-ai-list li {
  border-bottom: 1px solid var(--tc-border);
}

.tc-ai-list li:last-child {
  border-bottom: none;
}

.tc-ai-list a {
  display: block;
  padding: 12px 0;
  font-size: 13px;
  color: var(--tc-blue);
  text-decoration: none;
  font-weight: 500;
}

.tc-ai-list a:hover {
  text-decoration: underline;
}

.tc-kra-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tc-kra-links li {
  border-bottom: 1px solid var(--tc-border);
}

.tc-kra-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  font-size: 13px;
  color: var(--tc-navy);
  text-decoration: none;
  font-weight: 500;
}

.tc-kra-links a:hover {
  color: var(--tc-blue);
}

.tc-tip-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  color: var(--tc-text);
  line-height: 1.5;
}

.tc-tip-card .tip-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--tc-orange);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hidden filters (JS) */
.tc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Year selector in hero area optional */
.tc-year-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tc-year-bar select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--tc-border);
  font-weight: 600;
}

.tc-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-filter-tabs button {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--tc-border);
  background: var(--tc-white);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--tc-muted);
}

.tc-filter-tabs button.active {
  background: var(--tc-blue);
  color: #fff;
  border-color: var(--tc-blue);
}

@media (max-width: 1100px) {
  .tc-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .tc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tc-hero-grid {
    grid-template-columns: 1fr;
  }
  .tc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .tc-compliance-body {
    flex-direction: column;
    text-align: center;
  }
  .tc-calendar-inner .cal-cell {
    min-height: 64px;
  }
  .tc-calendar-inner .cal-event {
    font-size: 8px;
  }
}

@media (max-width: 480px) {
  .tc-stats {
    grid-template-columns: 1fr;
  }
}