/* =========================================================
   TERMOPAY — main.css  (auth + admin sayfaları için ortak stil)
   ========================================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, 'Segoe UI', Helvetica, sans-serif;
  background: #F3F5F6;
  color: #17222B;
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Auth (login / setup) sayfaları ---- */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #F3F5F6 0%, #E8EDEF 100%);
}

.authwrap {
  width: 100%;
  max-width: 420px;
}

.authcard {
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(20, 28, 36, 0.10);
}

.authbrand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.authmark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #C1521F, #9E4218);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.authmark svg { width: 22px; height: 22px; }
.authmark { overflow: hidden; padding: 0; }
.authmark img { width: 100%; height: 100%; object-fit: cover; }

.authname {
  font-family: Arial, 'Segoe UI', Helvetica, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.4px;
  color: #17222B;
}

.authsub {
  font-size: 11px;
  color: #5B6670;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.authinfo {
  font-size: 13px;
  color: #5B6670;
  line-height: 1.6;
  margin: 0 0 20px;
  background: #F3F5F6;
  border-radius: 8px;
  padding: 10px 12px;
}

.autherror {
  background: #FBEAEA;
  color: #B23B3B;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid #B23B3B;
}

.authsuccess {
  background: #E3F0F1;
  color: #175A61;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid #175A61;
}

/* ---- Form Elements (auth) ---- */

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #5B6670;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
select,
textarea {
  border: 1px solid #E1E6E6;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  color: #17222B;
  outline: none;
  text-transform: none;
  font-weight: 400;
  background: #fff;
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: #C1521F;
  box-shadow: 0 0 0 3px rgba(193, 82, 31, 0.12);
}

button[type="submit"],
.btn-auth {
  margin-top: 4px;
  background: #C1521F;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: background 0.15s, transform 0.08s;
  letter-spacing: 0.2px;
}

button[type="submit"]:hover,
.btn-auth:hover {
  background: #9E4218;
}

button[type="submit"]:active,
.btn-auth:active {
  transform: scale(0.99);
}

/* ---- Login (split ekran) ---- */

.loginsplit {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "brand panel"
    "hero  panel";
  gap: 34px 64px;
  max-width: 1140px;
  width: 100%;
  font-family: 'Inter', Arial, 'Segoe UI', sans-serif;
}

.loginbrand { grid-area: brand; }
.loginhero { grid-area: hero; }
.loginpanel { grid-area: panel; align-self: center; }
.loginbrand .authname { font-family: 'Inter', Arial, 'Segoe UI', sans-serif; }

.loginherotop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.loginherotext { flex: 1 1 300px; }

.loginheroimg { flex: 0 0 260px; max-width: 260px; }
.loginheroimg img { width: 100%; height: auto; display: block; }

.loginheadline {
  font-family: 'Inter', Arial, 'Segoe UI', sans-serif;
  font-size: 34px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #17222B;
  margin: 0 0 14px;
}

.loginlead {
  font-size: 14.5px;
  color: #5B6670;
  line-height: 1.7;
  margin: 0;
  max-width: 420px;
}

.loginfeatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 30px;
}

.loginfeature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 12px;
  padding: 14px 16px;
}

.loginfeature span {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #FBEFE8;
  color: #C1521F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loginfeature span svg { width: 19px; height: 19px; }

.loginfeature b {
  display: block;
  font-size: 13px;
  color: #17222B;
  margin-bottom: 2px;
}

.loginfeature small {
  display: block;
  font-size: 11.5px;
  color: #5B6670;
  line-height: 1.4;
}

.logindevices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.logindevices > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: #5B6670;
}

.logindevphoto {
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

.logindevphoto img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loginpanel { width: 100%; }
.loginpanel .authwrap { max-width: 400px; margin: 0 auto; }

.logincardicon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FBEFE8;
  color: #C1521F;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.logincardicon svg { width: 23px; height: 23px; }

.logintitle {
  font-family: 'Inter', Arial, 'Segoe UI', sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #17222B;
  text-align: center;
  margin: 0 0 4px;
}

.loginsubtitle {
  font-size: 12.5px;
  color: #5B6670;
  text-align: center;
  margin: 0 0 22px;
}

@media (max-width: 900px) {
  .loginsplit {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "brand"
      "panel"
      "hero";
    gap: 26px;
    max-width: 460px;
  }
  .loginbrand .authbrand { justify-content: center; }
  .loginpanel { align-self: start; }
  .loginheroimg { display: none; }
  .logindevices { grid-template-columns: repeat(2, 1fr); max-width: 280px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .loginsplit { padding: 0 4px; }
}

/* ---- Admin sayfaları (users.php) ---- */

.admin-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-topbar-left h1 {
  font-family: Arial, 'Segoe UI', Helvetica, sans-serif;
  font-size: 22px;
  margin: 0 0 3px;
  font-weight: 700;
}

.admin-topbar-left p {
  font-size: 12.5px;
  color: #5B6670;
  margin: 0;
}

.admin-topbar-right a,
.admin-topbar-right button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5B6670;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.admin-topbar-right a:hover,
.admin-topbar-right button:hover {
  border-color: #17222B;
  color: #17222B;
}

/* ---- Table ---- */

.admin-table-wrap {
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 14px;
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: #F8F9F9;
  color: #5B6670;
  font-weight: 600;
  font-size: 10.8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #E1E6E6;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #E1E6E6;
  font-size: 13px;
  white-space: nowrap;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: #FAFBFB;
}

/* Badges */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.8px;
  font-weight: 700;
}

.badge-user   { background: #FBEEE3; color: #9A4A16; }
.badge-admin  { background: #E3F0F1; color: #175A61; }
.badge-active { background: #E4F3E9; color: #2E7D4F; }
.badge-passive{ background: #FBEAEA; color: #B23B3B; }

/* Inline form buttons */

.rowform { display: inline; }

.rowbtn {
  background: none;
  border: none;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 3px 6px;
  margin-right: 4px;
  border-radius: 5px;
  color: #5B6670;
  font-family: inherit;
  transition: background 0.1s, color 0.1s;
}

.rowbtn:hover {
  background: #F3F5F6;
  color: #17222B;
}

.rowbtn.danger { color: #B23B3B; }
.rowbtn.danger:hover { background: #FBEAEA; }

/* ---- Add card ---- */

.addcard {
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 6px;
}

.addcard-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
  color: #17222B;
}

.addcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.addcard-grid label {
  text-transform: none;
  font-size: 12px;
  font-weight: 600;
  color: #5B6670;
  letter-spacing: 0;
}

.addcard-grid select {
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13px;
}

.addcard-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.addcard-footer button {
  width: auto;
  padding: 10px 22px;
  font-size: 13.5px;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .authcard {
    padding: 28px 20px;
  }

  .addcard-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-topbar-right {
    width: 100%;
  }

  .admin-topbar-right a,
  .admin-topbar-right button {
    width: 100%;
    justify-content: center;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* ---- Print ---- */
@media print {
  .admin-topbar-right,
  .addcard,
  .rowbtn { display: none !important; }

  /* Fatura/daire listelerinde yalnızca ekranda görünmesi gereken,
     yazdırmada anlamsız olan aksiyon sütun/butonlarını gizler. */
  .no-print,
  .sidebar,
  .topbar,
  .page-header .btn-base,
  .back-link { display: none !important; }
}

/* ---- Muhasebe (muhasebe.php) ---- */

.acc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.acc-stat {
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FBEEE3;
  color: #C1521F;
}
/* Renk kodlaması (kullanıcı isteği): tahsil edilen/alınan tutarlar YEŞİL,
   bekleyen/kalan bakiye (borç) KIRMIZI ikon kutusuyla ayırt edilir — üçü de
   aynı turuncu olduğunda hangisinin ne anlama geldiği bir bakışta belli
   olmuyordu. */
.acc-stat-icon.success { background: #E3F3EA; color: #2E7D4F; }
.acc-stat-icon.danger { background: #FBEAEA; color: #B23B3B; }

.acc-stat-num {
  font-family: Arial, 'Segoe UI', Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #17222B;
  line-height: 1.2;
}

.acc-stat-label {
  font-size: 11.3px;
  color: #5B6670;
  margin-top: 1px;
}

.acc-row-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.acc-money-owed { color: #B23B3B; font-weight: 700; font-size: 1.05em; }
.acc-money-paid { color: #2E7D4F; font-weight: 700; font-size: 1.05em; }
.acc-money-zero { color: #5B6670; font-weight: 700; }

.acc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5B6670;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

.acc-back-link:hover { color: #17222B; }

.acc-section-title {
  font-weight: 700;
  font-size: 14px;
  margin: 26px 0 12px;
  color: #17222B;
}

.acc-empty {
  padding: 22px;
  text-align: center;
  color: #5B6670;
  font-size: 13px;
}

@media (max-width: 600px) {
  .acc-stats { grid-template-columns: 1fr 1fr; }
}

.acc-search-wrap { position: relative; max-width: 420px; }

.acc-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #E1E6E6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 34, 43, 0.12);
  max-height: 280px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}

.acc-search-dropdown.open { display: block; }

.acc-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: #17222B;
  text-decoration: none;
  border-bottom: 1px solid #F1F3F6;
}

.acc-search-item:last-child { border-bottom: none; }
.acc-search-item:hover { background: #F7F8FA; }

.acc-search-item-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  color: #5B6670;
  background: #F1F3F6;
  flex-shrink: 0;
}

/* =========================================================
   MODERNİZASYON (31 Temmuz 2026)
   Bu bölüm, React tarafındaki assets/app.css'e uygulanan modern görünümün
   (katmanlı gölge, yumuşak köşe, akıcı geçiş, büyük dokunma hedefleri)
   PHP sayfalarına — giriş, kullanıcılar, muhasebe — de taşınmış hâli.
   RENK PALETİ BİLEREK DEĞİŞTİRİLMEDİ: iki dosya aynı renkleri kullanıyor,
   biri değişse diğeriyle uyumsuz görünürdü. Sadece derinlik ve his eklendi.
   Yeni sınıf/yapı YOK — mevcut sınıflara görsel katman ekleniyor, bu yüzden
   HTML tarafında hiçbir değişiklik gerekmez.
   ========================================================= */

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Klavyeyle gezinenler için belirgin odak halkası. */
:focus-visible { outline: 2px solid #C1521F; outline-offset: 2px; }

/* Kartlar/tablolar artık yalnız çerçeveyle değil, hafif gölgeyle de
   zeminden ayrılıyor. */
.admin-table-wrap,
.addcard,
.acc-stat {
  box-shadow: 0 1px 2px rgba(23,34,43,.04), 0 2px 6px rgba(23,34,43,.04);
}

.admin-table tr:hover td { background: #F6F8F9; }

/* Butonlarda yumuşak gölge + basılınca hafif "içeri batma". */
button[type="submit"],
.btn-auth {
  box-shadow: 0 1px 2px rgba(193,82,31,.20);
  transition: background .15s cubic-bezier(.4,0,.2,1),
              box-shadow .15s cubic-bezier(.4,0,.2,1),
              transform .08s;
}
button[type="submit"]:hover,
.btn-auth:hover { box-shadow: 0 2px 8px rgba(193,82,31,.28); }

.rowbtn { transition: background .15s cubic-bezier(.4,0,.2,1), color .15s cubic-bezier(.4,0,.2,1); }
.acc-row-link { transition: color .15s cubic-bezier(.4,0,.2,1); }

/* Giriş kartı biraz daha yumuşak/derin. */
.authcard { box-shadow: 0 20px 56px rgba(20,28,36,.12), 0 2px 8px rgba(20,28,36,.06); }

@media (max-width: 768px) {
  /* Telefonda dokunma hedefleri ve iOS'un otomatik yakınlaştırmasını
     engelleyen 16px yazı boyutu (16px altındaki bir alana dokununca iOS
     Safari sayfayı zorla yakınlaştırır). */
  input[type="text"], input[type="password"], input[type="email"],
  input[type="number"], input[type="date"], select, textarea {
    font-size: 16px;
  }
  .rowbtn { min-height: 38px; }
  button[type="submit"], .btn-auth { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
