/* Family Karma Ledger — Temple Night theme */

.fk-ledger-outer {
  background: linear-gradient(165deg, #1a0808 0%, #2d1212 48%, #1f0e0e 100%);
  border: 1px solid rgba(212, 160, 74, 0.38);
  border-radius: 16px;
  padding: 22px 24px 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  color: #f5e6d3;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(212, 160, 74, 0.12);
}

.fk-ledger-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 160, 74, 0.1) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(120, 40, 40, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.fk-ledger-header {
  position: relative;
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.25);
}

.fk-ledger-header::after {
  content: 'ॐ';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 28px;
  opacity: 0.08;
  color: #d4a04a;
}

.fk-ledger-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 700;
  color: #e8c56a;
  letter-spacing: 0.04em;
}

.fk-ledger-sub {
  font-size: 14px;
  color: rgba(245, 230, 211, 0.65);
  margin-top: 4px;
}

.fk-ledger-sub b {
  color: #d4a04a;
}

.fk-ledger-intro {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  color: rgba(245, 230, 211, 0.75);
  text-align: center;
  margin: 0 0 18px;
  position: relative;
}

.fk-ledger-run-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #1a0808;
  background: linear-gradient(135deg, #e8c56a 0%, #c9922e 50%, #a87220 100%);
  border: 1px solid rgba(255, 220, 140, 0.5);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 16px rgba(212, 160, 74, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.fk-ledger-run-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 160, 74, 0.45);
}

.fk-member-grid-title {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #d4a04a;
  margin: 24px 0 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 160, 74, 0.2);
  position: relative;
}

/* Results panel */
.fk-ledger-wrap {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 100%);
  border: 1px solid rgba(212, 160, 74, 0.28);
  border-radius: 12px;
  padding: 18px 16px 20px;
  margin-bottom: 20px;
  position: relative;
}

.fk-banner {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
}

.fk-banner-ok {
  background: rgba(69, 201, 122, 0.12);
  border: 1px solid rgba(69, 201, 122, 0.45);
  color: #7ddea8;
}

.fk-banner-warn {
  background: rgba(176, 32, 32, 0.15);
  border: 1px solid rgba(220, 80, 80, 0.45);
}

.fk-banner-title {
  font-weight: 700;
  font-size: 16px;
  color: #ff8a8a;
  margin-bottom: 10px;
}

.fk-warn-item {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #f5e6d3;
}

.fk-resume-date {
  color: #e8c56a;
  margin-top: 4px;
  font-weight: 600;
}

.fk-warn-note {
  font-size: 13px;
  color: rgba(245, 230, 211, 0.6);
  margin-top: 4px;
}

.fk-banner-action {
  margin-top: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #ff8a8a;
}

.fk-banner-action--gold {
  color: #e8c56a;
}

/* Summary chips */
.fk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.fk-chip {
  flex: 1;
  min-width: 140px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(212, 160, 74, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
}

.fk-chip--alert {
  border-color: rgba(220, 80, 80, 0.5);
  background: rgba(176, 32, 32, 0.12);
}

.fk-chip--ok {
  border-color: rgba(69, 201, 122, 0.35);
}

.fk-chip-label {
  display: block;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 13px;
  color: rgba(245, 230, 211, 0.55);
  margin-bottom: 4px;
}

.fk-chip-val {
  display: block;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #e8c56a;
}

.fk-chip--alert .fk-chip-val {
  color: #ff9a9a;
}

/* Section title */
.fk-ledger-section-title {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #e8c56a;
  margin-bottom: 6px;
}

.fk-ledger-hint {
  font-size: 14px;
  color: rgba(245, 230, 211, 0.55);
  margin: 0 0 12px;
}

/* Main table */
.fk-ledger-scroll {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(212, 160, 74, 0.22);
  margin-bottom: 20px;
}

.fk-ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  min-width: 900px;
}

.fk-ledger-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.fk-ledger-table th {
  background: linear-gradient(180deg, #3d1818 0%, #2a1010 100%);
  color: #e8c56a;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 2px solid rgba(212, 160, 74, 0.4);
  white-space: nowrap;
}

.fk-ledger-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.12);
  color: #f5e6d3;
  vertical-align: middle;
  line-height: 1.45;
}

.fk-main-row {
  cursor: pointer;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.15s;
}

.fk-main-row:hover,
.fk-main-row--open {
  background: rgba(212, 160, 74, 0.1);
}

.fk-td-num {
  color: rgba(245, 230, 211, 0.45);
  font-weight: 700;
  width: 32px;
  text-align: center;
}

.fk-td-name {
  min-width: 120px;
}

.fk-name-main {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 700;
  color: #e8c56a;
}

.fk-name-role {
  font-size: 12px;
  color: rgba(245, 230, 211, 0.5);
  margin-top: 2px;
}

.fk-lagna-tag {
  display: inline-block;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.fk-lagna-tag--chara {
  background: rgba(220, 100, 60, 0.2);
  color: #ffb088;
  border: 1px solid rgba(220, 100, 60, 0.35);
}

.fk-lagna-tag--sthira {
  background: rgba(100, 140, 220, 0.15);
  color: #a8c8ff;
  border: 1px solid rgba(100, 140, 220, 0.3);
}

.fk-lagna-tag--ubaya {
  background: rgba(160, 100, 220, 0.15);
  color: #d4b0ff;
  border: 1px solid rgba(160, 100, 220, 0.3);
}

.fk-td-karma {
  font-size: 14px;
  line-height: 1.5;
}

.fk-karma-none {
  color: rgba(245, 230, 211, 0.35);
}

.fk-urg {
  display: inline-block;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 160px;
}

.fk-urg--triple {
  background: rgba(220, 50, 50, 0.25);
  color: #ff9090;
  border: 1px solid rgba(220, 50, 50, 0.45);
}

.fk-urg--double {
  background: rgba(200, 80, 40, 0.2);
  color: #ffaa70;
  border: 1px solid rgba(200, 80, 40, 0.4);
}

.fk-urg--active {
  background: rgba(200, 140, 40, 0.18);
  color: #e8c56a;
  border: 1px solid rgba(200, 140, 40, 0.35);
}

.fk-urg--dormant {
  background: rgba(69, 201, 122, 0.12);
  color: #7ddea8;
  border: 1px solid rgba(69, 201, 122, 0.3);
}

.fk-td-dasa {
  font-size: 14px;
}

.fk-dasa--red { color: #ff8a8a; font-weight: 700; }
.fk-dasa--gold { color: #e8c56a; font-weight: 600; }
.fk-dasa--green { color: #7ddea8; }

.fk-td-shiva {
  font-size: 14px;
  color: #e8c56a;
  max-width: 180px;
}

.fk-td-day {
  font-size: 14px;
}

.fk-date-sub {
  font-size: 13px;
  color: rgba(245, 230, 211, 0.55);
}

.fk-status {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.fk-status--ok {
  background: rgba(69, 201, 122, 0.15);
  color: #7ddea8;
}

.fk-status--ready {
  background: rgba(212, 160, 74, 0.15);
  color: #e8c56a;
}

.fk-status--warn {
  background: rgba(200, 140, 40, 0.18);
  color: #e8c56a;
}

.fk-status--block {
  background: rgba(176, 32, 32, 0.2);
  color: #ff8a8a;
}

.fk-td-expand {
  color: #d4a04a;
  font-size: 12px;
  text-align: center;
  width: 28px;
  transition: transform 0.2s;
}

.fk-td-expand--open {
  color: #e8c56a;
}

/* Expandable detail row */
.fk-detail-row td {
  padding: 0;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 2px solid rgba(212, 160, 74, 0.25);
}

.fk-detail-panel {
  padding: 16px 18px 20px;
}

.fk-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 20px;
  margin-bottom: 16px;
  font-size: 15px;
}

.fk-detail-label {
  display: block;
  font-size: 12px;
  color: rgba(245, 230, 211, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.fk-detail-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #d4a04a;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.2);
}

.fk-detail-karma-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(212, 160, 74, 0.15);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 15px;
}

.fk-detail-karma-head {
  font-size: 15px;
  margin-bottom: 6px;
}

.fk-detail-shiva {
  color: #e8c56a;
  font-weight: 600;
  margin-bottom: 6px;
}

.fk-detail-remedy {
  color: rgba(245, 230, 211, 0.8);
  margin-top: 6px;
}

.fk-detail-timing {
  margin-top: 8px;
  font-size: 14px;
  color: #8ecfcf;
}

.fk-detail-muted {
  font-size: 14px;
  color: rgba(245, 230, 211, 0.55);
  margin-top: 4px;
}

.fk-detail-bhairava {
  font-size: 14px;
  margin-top: 4px;
  color: #d4b0ff;
}

.fk-detail-lagna {
  font-size: 14px;
  color: #d4b0ff;
  margin-top: 6px;
}

.fk-detail-blocked {
  font-size: 14px;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
}

.fk-detail-blocked--red {
  background: rgba(176, 32, 32, 0.2);
  color: #ff8a8a;
}

.fk-detail-blocked--gold {
  background: rgba(200, 140, 40, 0.15);
  color: #e8c56a;
}

.fk-detail-ok {
  color: #7ddea8;
  font-size: 15px;
}

.fk-mandhi {
  color: #ff8a8a;
  font-weight: 700;
}

.fk-rahu-box {
  border: 1px solid rgba(212, 160, 74, 0.3);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 15px;
}

.fk-rahu-title {
  font-weight: 700;
  color: #e8c56a;
  margin-bottom: 6px;
}

.fk-rahu-warn {
  color: #ff8a8a;
  font-size: 14px;
  margin-top: 6px;
}

.fk-rahu-btn {
  margin-top: 10px;
  padding: 8px 16px;
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1a0808;
  background: linear-gradient(135deg, #e8c56a, #c9922e);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.fk-rahu-btn:hover {
  filter: brightness(1.08);
}

/* Tabs */
.fk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(212, 160, 74, 0.2);
  padding-bottom: 10px;
}

.fk-tab-btn {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: rgba(245, 230, 211, 0.55);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.fk-tab-btn:hover {
  color: #e8c56a;
  background: rgba(212, 160, 74, 0.08);
}

.fk-tab-btn--active {
  color: #e8c56a;
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(212, 160, 74, 0.35);
  border-bottom: 1px solid rgba(26, 8, 8, 0.9);
  margin-bottom: -1px;
}

.fk-tab-panel {
  display: none;
  padding: 4px 0 8px;
}

.fk-tab-panel--active {
  display: block;
}

.fk-ledger-table--sub {
  min-width: 0;
  font-size: 15px;
}

.fk-ledger-table--sub th {
  font-size: 14px;
  padding: 10px 12px;
}

.fk-ledger-table--sub td {
  padding: 10px 12px;
}

.fk-tab-note {
  font-size: 14px;
  color: rgba(245, 230, 211, 0.6);
  margin-top: 10px;
  line-height: 1.5;
}

.fk-tab-empty {
  font-size: 15px;
  color: rgba(245, 230, 211, 0.5);
  padding: 16px 0;
}

.fk-tab-ok {
  color: #7ddea8;
  font-size: 15px;
}

.fk-intensity {
  font-weight: 700;
  color: #e8c56a;
}

.fk-mandatory {
  color: #ff8a8a;
  font-weight: 700;
  font-size: 13px;
}

.fk-matrix-hi {
  color: #e8c56a !important;
  font-weight: 700;
}

.fk-matrix-table th,
.fk-matrix-table td {
  text-align: center;
}

.fk-migration-box {
  background: rgba(176, 32, 32, 0.12);
  border: 1px solid rgba(220, 80, 80, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
}

.fk-migration-title {
  font-weight: 700;
  color: #ff8a8a;
  font-size: 16px;
  margin-bottom: 8px;
}

.fk-dasa-alert {
  color: #ff8a8a;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 14px;
  background: rgba(176, 32, 32, 0.15);
  border-radius: 8px;
}

/* Member cards inside ledger outer — soften for theme */
.fk-ledger-outer .intel-action-card {
  background: rgba(0, 0, 0, 0.25) !important;
  border-color: rgba(212, 160, 74, 0.22) !important;
  color: #f5e6d3;
}

.fk-ledger-outer .intel-action-card [style*="color:var(--gold2)"] {
  color: #e8c56a !important;
}

.fk-ledger-outer .intel-action-card [style*="color:var(--text)"] {
  color: #f5e6d3 !important;
}

.fk-ledger-outer .intel-action-card [style*="color:var(--text-dim)"] {
  color: rgba(245, 230, 211, 0.55) !important;
}
