:root {
  --bg: #f5f7fb;
  --bg-line: rgba(17, 24, 39, 0.045);
  --surface: #ffffff;
  --surface-soft: #f9fafc;
  --surface-tint: #eef8f6;
  --ink: #111827;
  --ink-soft: #273244;
  --muted: #6b7280;
  --line: #dfe5ef;
  --line-strong: #cbd5e1;
  --primary: #3559d6;
  --primary-dark: #2947ad;
  --primary-soft: #edf2ff;
  --accent: #0f8f82;
  --accent-soft: #e6f7f4;
  --warning: #d97706;
  --warning-soft: #fff6df;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --shadow-sm: 0 10px 22px rgba(17, 24, 39, 0.07);
  --shadow-md: 0 18px 42px rgba(17, 24, 39, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(53, 89, 214, 0.08), transparent 34%),
    linear-gradient(220deg, rgba(15, 143, 130, 0.08), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--bg-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.65;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.btn {
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.25;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 4px rgba(53, 89, 214, 0.15);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(53, 89, 214, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(53, 89, 214, 0.4);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-outline-secondary {
  color: #475569;
  border-color: var(--line-strong);
}

.btn-outline-secondary:hover {
  background: #475569;
  border-color: #475569;
}

.btn-outline-warning {
  color: #a16207;
  border-color: rgba(217, 119, 6, 0.38);
}

.btn-outline-warning:hover {
  color: #ffffff;
  background: var(--warning);
  border-color: var(--warning);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.36);
}

.btn-outline-danger:hover {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.42rem 0.68rem;
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background-color: #ffffff;
}

.form-control::placeholder {
  color: #98a2b3;
}

.form-label {
  color: var(--ink-soft);
  font-weight: 700;
}

.alert {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.alert-success {
  color: #0f5132;
  background: #e8f7ee;
}

.alert-danger {
  color: #842029;
  background: #fff1f2;
}

.alert-warning {
  color: #7c4a03;
  background: var(--warning-soft);
}

.uygulama {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 24px;
  background: #161a23;
  color: #ffffff;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 12px 0 34px rgba(17, 24, 39, 0.18);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary), #be5b79);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.logo:hover {
  color: #ffffff;
}

.logo-isaret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 143, 130, 0.24);
}

.menu {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #d7dde8;
  font-weight: 700;
}

.menu a:hover,
.menu a.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.menu a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-alt {
  display: grid;
  gap: 14px;
}

.kullanici-kutu {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.kullanici-kutu span,
.kullanici-kutu small {
  display: block;
  overflow-wrap: anywhere;
}

.kullanici-kutu span {
  color: #ffffff;
  font-weight: 800;
}

.kullanici-kutu small {
  margin-top: 2px;
  color: #bcc6d4;
}

.icerik-alani {
  width: 100%;
  margin-left: 280px;
}

.ustbar {
  min-height: 76px;
  padding: 16px 30px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(203, 213, 225, 0.78);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.ustbar-ic {
  display: flex;
  justify-content: flex-end;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.arama-form,
.sayfa-arama {
  display: flex;
  gap: 10px;
}

.arama-form {
  width: min(430px, 100%);
}

.sayfa-arama {
  max-width: 660px;
  margin-bottom: 22px;
}

.sayfa {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 30px;
}

.sayfa-baslik {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.85);
}

.sayfa-baslik h1 {
  margin: 0;
  color: var(--ink);
  font-size: 31px;
  font-weight: 850;
}

.sayfa-baslik p {
  margin: 6px 0 0;
  color: var(--muted);
}

.istatistik-kart,
.panel,
.not-kart,
.form-panel,
.detay-panel,
.sil-panel,
.auth-kart {
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.istatistik-kart {
  position: relative;
  overflow: hidden;
  min-height: 136px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.istatistik-kart::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--primary);
}

.arsiv-kart::before {
  background: var(--warning);
}

.istatistik-kart span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.istatistik-kart strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.05;
}

.istatistik-kart .isim {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.panel {
  padding: 22px;
}

.panel-baslik {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-baslik h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.panel-linkler {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 800;
}

.liste {
  display: grid;
  gap: 10px;
}

.liste-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.liste-satir:hover {
  border-color: rgba(53, 89, 214, 0.34);
  background: #fbfdff;
  color: var(--ink);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.07);
  transform: translateY(-1px);
}

.liste-satir strong,
.liste-satir small {
  display: block;
  overflow-wrap: anywhere;
}

.liste-satir strong {
  color: var(--ink);
}

.liste-satir small,
.liste-satir span {
  color: var(--muted);
}

.not-kart {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 270px;
  padding: 18px;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.not-kart::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.not-kart:hover {
  border-color: rgba(53, 89, 214, 0.34);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.arsiv-not::before {
  background: var(--warning);
}

.not-ust {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.not-ust small {
  color: var(--muted);
  font-weight: 700;
}

.etiket {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(15, 143, 130, 0.18);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #087267;
  font-size: 13px;
  font-weight: 800;
}

.etiket-grup {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.etiket-arsiv {
  border-color: rgba(217, 119, 6, 0.22);
  background: var(--warning-soft);
  color: #9a5800;
}

.not-kart h2,
.sil-panel h2 {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.not-kart p {
  color: #475569;
  flex: 1;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.not-butonlar,
.form-butonlar,
.satir-butonlar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-form {
  display: inline;
  margin: 0;
}

.form-panel,
.detay-panel,
.sil-panel {
  max-width: 840px;
  padding: 24px;
}

.dar-form {
  max-width: 540px;
}

.not-icerik {
  color: #374151;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guncelleme,
.sonuc-yazi {
  color: var(--muted);
}

.bos-durum {
  padding: 22px;
  border: 1px dashed rgba(53, 89, 214, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
}

.bos-durum a {
  margin-left: 6px;
  font-weight: 800;
}

.kategori-satir {
  align-items: center;
}

.auth-sayfa {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-kart {
  position: relative;
  overflow: hidden;
  width: min(440px, 100%);
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.auth-kart::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--primary), #be5b79);
}

.auth-baslik {
  margin-bottom: 22px;
  text-align: center;
}

.auth-baslik .logo-isaret {
  margin-bottom: 12px;
}

.auth-baslik h1 {
  margin: 0;
  color: var(--ink);
  font-size: 29px;
  font-weight: 850;
}

.auth-baslik p,
.auth-alt {
  color: var(--muted);
}

.auth-alt {
  margin: 18px 0 0;
  text-align: center;
}

.auth-alt a {
  font-weight: 800;
}

.auth-alert {
  position: fixed;
  top: 18px;
  z-index: 10;
  width: min(440px, calc(100% - 32px));
}

@media (max-width: 767px) {
  .icerik-alani {
    margin-left: 0;
  }

  .ustbar {
    padding: 14px 18px;
  }

  .sayfa {
    padding: 22px 18px;
  }

  .arama-form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .sayfa-baslik,
  .liste-satir,
  .kategori-satir {
    align-items: stretch;
    flex-direction: column;
  }

  .sayfa-baslik h1 {
    font-size: 25px;
  }

  .sayfa-arama {
    flex-direction: column;
  }

  .not-ust {
    align-items: flex-start;
    flex-direction: column;
  }
}
