/* Shared styles — Income Tax form worksheets (Guide module) */
:root {
  --primary: #25b7a7;
  --primary-dark: #00b8a9;
  --dark: #0a2123;
  --foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #f8fafc;
  color: var(--foreground);
  line-height: 1.5;
  font-size: 16px;
}

.fm-header {
  background: #f0fdfb;
  border-bottom: 2px solid rgba(37, 183, 167, 0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}
.fm-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.fm-header a { text-decoration: none; color: inherit; }
.fm-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9375rem;
}
.fm-nav a {
  color: var(--primary-dark);
  font-weight: 500;
}
.fm-nav a:hover { text-decoration: underline; }

.fm-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.fm-breadcrumb {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}
.fm-breadcrumb a { color: var(--primary-dark); text-decoration: none; }
.fm-breadcrumb a:hover { text-decoration: underline; }

.fm-main h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.fm-lead {
  color: var(--muted-foreground);
  margin-bottom: 1.75rem;
  font-size: 1.0625rem;
}

/* Official Income Tax Department links */
.official-banner {
  background: #fff;
  border: 1px solid rgba(37, 183, 167, 0.45);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.official-banner strong {
  display: block;
  color: var(--dark);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}
.official-banner p {
  margin: 0 0 0.65rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
.official-banner p:last-child { margin-bottom: 0; }
.official-banner ul {
  margin: 0;
  padding-left: 1.2rem;
}
.official-banner li { margin-bottom: 0.4rem; }
.official-banner a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}
.official-banner a:hover { text-decoration: underline; }

.disclaimer {
  background: rgba(37, 183, 167, 0.1);
  border: 1px solid rgba(37, 183, 167, 0.35);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.worksheet {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.worksheet h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.25rem;
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-grid label,
.field-block label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.field-block input,
.field-block textarea,
.field-block select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
.form-grid textarea,
.field-block textarea { min-height: 72px; resize: vertical; }

.field-block { margin-bottom: 1.25rem; }
.field-block:last-child { margin-bottom: 0; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.section-label:first-child { margin-top: 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
.data-table th {
  background: var(--muted);
  font-weight: 600;
  font-size: 0.8125rem;
}
.data-table input {
  width: 100%;
  border: none;
  padding: 0.25rem;
  font: inherit;
  background: transparent;
}
.data-table input:focus { outline: 2px solid rgba(37, 183, 167, 0.4); border-radius: 4px; }

.print-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.print-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.print-btn:hover { background: var(--primary-dark); }
.print-btn.secondary {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .worksheet { box-shadow: none; border: 1px solid #ccc; }
  .fm-main { padding: 0; max-width: none; }
}
