/* Whitecream — ortak reset + tema görünürlük yardımcıları */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.only-light { display: none !important; }
.only-dark { display: block; }
[data-theme="light"] .only-dark { display: none !important; }
[data-theme="light"] .only-light { display: block !important; }
[data-theme="light"] .only-light.only-flex { display: flex !important; }
[data-theme="light"] .only-light.only-inline { display: inline !important; }
[data-theme="light"] .only-light.only-inline-flex { display: inline-flex !important; }
.only-dark.only-flex { display: flex; }
.only-dark.only-inline { display: inline; }
.only-dark.only-inline-flex { display: inline-flex; }

/* Tema anahtarı — sağ alt, yalnızca ikon */
.theme-switch {
  --ts-line: #28324A;
  --ts-surface: #12182A;
  --ts-accent: #C9A24A;
  --ts-ink: #EEE8D8;
  --ts-glow: rgba(201, 162, 74, 0.16);

  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
}

[data-theme="light"] .theme-switch {
  --ts-line: #D5DAE3;
  --ts-surface: #FFFFFF;
  --ts-accent: #1D4ED8;
  --ts-ink: #141B2E;
  --ts-glow: rgba(29, 78, 216, 0.12);
}

.theme-switch__btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ts-line);
  background: var(--ts-surface);
  color: var(--ts-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18), 0 0 0 3px var(--ts-glow);
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-switch__btn::before,
.theme-switch__btn::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
}
.theme-switch__btn::before {
  top: -1px; left: -1px;
  border-top: 1.5px solid var(--ts-accent);
  border-left: 1.5px solid var(--ts-accent);
}
.theme-switch__btn::after {
  bottom: -1px; right: -1px;
  border-bottom: 1.5px solid var(--ts-accent);
  border-right: 1.5px solid var(--ts-accent);
}
[data-theme="light"] .theme-switch__btn::before,
[data-theme="light"] .theme-switch__btn::after {
  border-width: 2px;
}
.theme-switch__btn:hover {
  transform: translateY(-1px);
  color: var(--ts-ink);
  border-color: var(--ts-accent);
}
.theme-switch__btn:focus-visible {
  outline: 2px solid var(--ts-accent);
  outline-offset: 2px;
}
.theme-switch__btn svg {
  width: 18px;
  height: 18px;
  display: none;
}
[data-theme="dark"] .theme-switch__btn .icon-sun { display: block; }
[data-theme="light"] .theme-switch__btn .icon-moon { display: block; }

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #B14556;
  background: rgba(177, 69, 86, 0.16);
  color: #EEE8D8;
  font-size: 13px;
  line-height: 1.5;
}
[data-theme="light"] .alert {
  border-color: #BE3A2B;
  background: #FBEAE7;
  color: #141B2E;
}
.alert.success {
  border-color: #379489;
  background: rgba(55, 148, 137, 0.16);
  color: #EEE8D8;
}
[data-theme="light"] .alert.success {
  border-color: #12794C;
  background: #E5F5EC;
  color: #141B2E;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert li { color: inherit; }
.modal__body > .alert { margin-bottom: 12px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
