/* ==========================================================================
   VERGİ TAKVİMİ — en yakın son gün kartı, aylık ızgara + liste, kural özeti
   Tür renkleri: beyan = lacivert, ödeme = kırmızı, bildirim = turuncu
   ========================================================================== */

.tc-section { --c-beyan: var(--navy-700); --c-odeme: var(--red-600); --c-bildirim: var(--amber-500); }

/* ---------- En yakın son gün ---------- */
.next-due {
  display: grid;
  gap: 10px;
  width: min(440px, 100%);
  margin-inline: auto;
  padding: clamp(26px, 3vw, 36px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(80% 60% at 100% 0%, rgb(211 20 28 / .3), transparent 60%),
    var(--navy-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.next-due__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ff6b72;
}
.next-due__label .i { width: 16px; height: 16px; }
.next-due__count { display: flex; align-items: baseline; gap: 10px; }
.next-due__count b { font-size: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.next-due__count span { font-size: 1.125rem; font-weight: 700; color: rgb(255 255 255 / .7); }
.next-due__title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.next-due__date { font-size: 14.5px; color: rgb(255 255 255 / .65); }
.next-due__more {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgb(255 255 255 / .12);
}
.next-due__more:empty { display: none; }
.next-due__more li { display: flex; gap: 12px; font-size: 14px; color: rgb(255 255 255 / .85); }
.next-due__more span { flex: none; min-width: 74px; font-weight: 700; color: #fff; }
.next-due__portal {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgb(255 255 255 / .07);
  font-size: 13.5px;
  line-height: 1.5;
  color: rgb(255 255 255 / .8);
}
.next-due__portal .i { flex: none; margin-top: 2px; color: #3fd39b; stroke-width: 3; }

/* ---------- Takvim ---------- */
.tc-section { padding-top: 0; scroll-margin-top: var(--header-h); }
.tc {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tc__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tc__nav { display: flex; align-items: center; gap: 10px; }
.tc__month { min-width: 170px; font-size: 1.375rem; text-align: center; }
.tc__legend { display: flex; flex-wrap: wrap; gap: 8px; }

.tc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: border-color .2s, color .2s, background-color .2s;
}
.tc-chip span { width: 10px; height: 10px; border-radius: 3px; background: currentColor; opacity: .4; }
.tc-chip.is-on { color: var(--ink); border-color: var(--line-2); }
.tc-chip.is-on span { opacity: 1; }
.tc-chip--beyan span { color: var(--c-beyan); background: var(--c-beyan); }
.tc-chip--odeme span { background: var(--c-odeme); }
.tc-chip--bildirim span { background: var(--c-bildirim); }
.tc-chip:not(.is-on) { text-decoration: line-through; }

.tc__body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.tc__grid-wrap { padding: 20px 22px 24px; border-right: 1px solid var(--line); }
.tc__weekdays, .tc__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.tc__weekdays { margin-bottom: 8px; }
.tc__weekdays span { font-size: 12px; font-weight: 700; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.tc-day {
  position: relative;
  display: grid;
  align-content: space-between;
  aspect-ratio: 1 / .9;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: left;
  font-size: 14px;
  transition: background-color .2s, box-shadow .2s;
}
.tc-day b { font-weight: 600; color: var(--ink-2); }
.tc-day.is-empty { background: none; }
.tc-day.is-off b { color: var(--muted); }
.tc-day.is-past { opacity: .55; }
.tc-day.has-events { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.tc-day.has-events:hover { box-shadow: inset 0 0 0 1.5px var(--navy-700); }
.tc-day.has-events b { font-weight: 800; color: var(--ink); }
.tc-day.is-today { box-shadow: inset 0 0 0 2px var(--red-600); }
.tc-day.is-today b::after {
  content: "Bugün";
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--red-600);
}
.tc-day.is-selected { background: var(--navy-900); box-shadow: none; }
.tc-day.is-selected b { color: #fff; }
.tc-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.tc-dot { width: 7px; height: 7px; border-radius: 50%; }
.tc-dot--beyan { background: var(--c-beyan); }
.tc-dot--odeme { background: var(--c-odeme); }
.tc-dot--bildirim { background: var(--c-bildirim); }
.tc-day.is-selected .tc-dot { box-shadow: 0 0 0 1.5px #fff; }

/* Liste */
.tc__list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 560px;
  padding: 20px;
  overflow-y: auto;
}
.tc-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--c-beyan));
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}
.tc-item--beyan { --c: var(--c-beyan); }
.tc-item--odeme { --c: var(--c-odeme); }
.tc-item--bildirim { --c: var(--c-bildirim); }
.tc-item:hover { background: var(--surface-2); }
.tc-item.is-selected { background: var(--navy-50); box-shadow: 0 0 0 1px var(--navy-200); }
.tc-item.is-past { opacity: .5; }
.tc-item__date { display: grid; justify-items: center; line-height: 1.1; }
.tc-item__date b { font-size: 1.5rem; font-weight: 800; }
.tc-item__date small { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.tc-item__body { display: grid; gap: 2px; min-width: 0; }
.tc-item__body strong { font-size: 15px; line-height: 1.35; }
.tc-item__body small { font-size: 13px; color: var(--muted); }
.tc-item__body em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--amber-600); }
.tc-item__left { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tc-item.is-soon .tc-item__left { padding: 3px 9px; border-radius: 999px; background: var(--red-50); color: var(--red-600); }
.tc-empty { padding: 24px; font-size: 15px; text-align: center; color: var(--muted); }

.tc__noscript { padding: 20px; color: var(--muted); }

.tc__disclaimer {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff8e8;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.tc__disclaimer .i { flex: none; margin-top: 2px; color: var(--amber-600); }
.tc__disclaimer a { font-weight: 700; color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kural özeti ---------- */
.tc-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tc-rule {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--c, var(--navy-700));
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.tc-rule--beyan { --c: var(--navy-700); }
.tc-rule--odeme { --c: var(--red-600); }
.tc-rule--bildirim { --c: var(--amber-500); }
.tc-rule__day { font-size: 1.25rem; font-weight: 800; color: var(--c); }
.tc-rule__day small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.tc-rule h3 { font-size: 1.0625rem; }
.tc-rule p:not(.tc-rule__day) { font-size: 14px; color: var(--muted); }
.tc-rule__type { justify-self: start; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--bg-alt); font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* ---------- CTA ---------- */
.tc-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 140% at 100% 0%, rgb(211 20 28 / .3), transparent 60%),
    var(--navy-900);
  color: #fff;
}
.tc-cta > div { flex: 1; display: grid; gap: 8px; }
.tc-cta h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem); letter-spacing: -.03em; }
.tc-cta p { font-size: 16px; color: rgb(255 255 255 / .7); }
.tc-cta__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 18px;
  background: var(--red-600);
}
.tc-cta__icon .i { width: 30px; height: 30px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1060px) {
  .tc__body { grid-template-columns: 1fr; }
  .tc__grid-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
  .tc__list { max-height: none; }
  .tc-cta { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .tc__bar { padding: 14px; }
  .tc__nav { width: 100%; justify-content: space-between; }
  .tc__month { min-width: 0; font-size: 1.125rem; }
  .tc__grid-wrap { padding: 14px 10px; }
  .tc__weekdays, .tc__grid { gap: 4px; }
  .tc-day { padding: 5px; border-radius: 8px; font-size: 12.5px; aspect-ratio: 1; }
  .tc-day.is-today b::after { content: none; }
  .tc-dot { width: 5px; height: 5px; }
  .tc__list { padding: 12px; }
  .tc-item { grid-template-columns: 44px minmax(0, 1fr); }
  .tc-item__left { grid-column: 2; justify-self: start; }
  .tc-cta__icon { display: none; }
}
