/* ===== Variables ===== */
:root {
  --bg-dark: #0c0c0e;
  --bg-card: #141418;
  --bg-elevated: #1a1a1f;
  --bg-hover: #222228;
  --red: #c41e3a;
  --red-dim: #8b1528;
  --red-hover: #e02545;
  --red-glow: rgba(196, 30, 58, 0.15);
  --text: #eae8e5;
  --text-muted: #8e8b87;
  --border: #2c2a28;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --transition: 0.2s ease;
  --nav-height: 56px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-hover); }

/* ===== Layout ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
@media (min-width: 768px) {
  .container { padding: 2rem 1.5rem; }
}

.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-header .subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== Site header (top bar: duyuru + nav) ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100vw;
  background: var(--bg-card);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

/* ===== Announcement ticker (marquee) – tam genişlik, modern ===== */
.announcement-ticker {
  width: 100%;
  min-height: 44px;
  background: linear-gradient(90deg, #1a0a0d 0%, #8b1528 18%, #a01830 50%, #8b1528 82%, #1a0a0d 100%);
  border-bottom: 1px solid rgba(196, 30, 58, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.announcement-ticker-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 2%, black 98%, transparent 100%);
}
.announcement-ticker-track:hover .announcement-ticker-inner { animation-play-state: paused; }
.announcement-ticker-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.7rem 1rem;
  animation: ticker 70s linear infinite;
  white-space: nowrap;
  will-change: transform;
  width: max-content;
}
.announcement-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.97);
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.announcement-author {
  font-weight: 700;
  color: #fff;
  opacity: 0.98;
}
.announcement-sep {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
  font-weight: 700;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-25%); }
}

/* ===== Navigation ===== */
.nav {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: var(--nav-height);
  padding: 0 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--red);
}
.nav-brand:hover { color: var(--red-hover); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.nav-links .kasa {
  padding: 0.4rem 0.75rem;
  margin-right: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-links .kasa:hover { background: var(--bg-hover); color: var(--red-hover); }
.nav-links .kasa-usdt { font-weight: 500; opacity: 0.85; font-size: 0.8em; }
.nav-links form { display: inline; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--red-hover); }
.btn:active { transform: scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-outline:hover {
  background: var(--red-dim);
  color: #fff;
}
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card:last-child { margin-bottom: 0; }
.card h2, .card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card > p:first-of-type,
.card .text-muted { margin-bottom: 1rem; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.1rem; }
.form-group:last-of-type { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.required-star {
  color: var(--red);
  font-weight: 700;
  margin-left: 0.15rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); opacity: 0.8; }
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.form-row .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }
.form-row .btn { flex-shrink: 0; }
.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.form-inline input[type="number"],
.form-inline select { width: auto; min-width: 100px; max-width: 140px; }
@media (max-width: 600px) {
  .form-inline input[type="number"],
  .form-inline select { min-width: 80px; }
}

/* ===== Kasa & Badges ===== */
.kasa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--red);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  color: #22c55e;
  font-size: 0.8rem;
  cursor: help;
  text-decoration: underline dotted;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-transform: capitalize;
}
.badge-pending { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.badge-approved { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.badge-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.badge-active { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.badge-passive { background: rgba(234, 179, 8, 0.2); color: #eab308; }
.iban-passive { opacity: 0.5; }
.iban-passive td { color: var(--text-muted); }

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
}
table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-dark);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }
@media (max-width: 768px) {
  .table-wrap { margin: 0; }
  th, td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }
}

/* ===== Lists ===== */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.notif-list li:last-child { border-bottom: none; }
.notif-list li > span { flex: 1; min-width: 0; }

/* ===== Alerts ===== */
.alert {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.alert-error { background: var(--red-dim); color: #fff; }
.alert-success { background: rgba(34, 197, 94, 0.15); color: #86efac; }

/* ===== Auth (login/register) ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-header {
  margin-bottom: 2rem;
  text-align: center;
}
.auth-logo-icon {
  color: var(--red);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.auth-logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}
.auth-box {
  width: 100%;
  max-width: 400px;
}
.auth-box .card { padding: 1.75rem; }
.auth-box h2 {
  margin: 0 0 1.25rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}
.auth-box .btn { width: 100%; padding: 0.65rem; margin-top: 0.25rem; }
.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.auth-footer a { font-weight: 500; }

/* ===== Account type (register) ===== */
.label-block { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-muted); }
.account-type { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.account-option { flex: 1; min-width: 160px; cursor: pointer; }
.account-option input { position: absolute; opacity: 0; pointer-events: none; }
.account-box {
  display: block;
  padding: 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  transition: border-color var(--transition), background var(--transition);
}
.account-option input:checked + .account-box,
.account-box:hover { border-color: var(--red); background: var(--bg-hover); }
.account-title { display: block; font-weight: 600; font-size: 0.95rem; color: var(--text); margin-bottom: 0.25rem; }
.account-desc { display: block; font-size: 0.82rem; color: var(--text-muted); }
.account-option input[required]:not(:checked) + .account-box { border-color: rgba(220, 53, 69, 0.5); }

/* ===== Utilities ===== */
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.empty-state { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.95rem; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav { padding: 0.6rem 0.75rem; }
  .nav-links { gap: 0.35rem; }
  .nav-links .kasa { font-size: 0.8rem; padding: 0.35rem 0.5rem; }
  .card { padding: 1.15rem; }
  .page-header h1 { font-size: 1.3rem; }
  .btn { padding: 0.5rem 0.9rem; font-size: 0.875rem; }
  .announcement-item { font-size: 0.8rem; }
}
input[type="file"] { font-size: 0.85rem; color: var(--text-muted); }
input[type="file"]::file-selector-button {
  padding: 0.4rem 0.65rem;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  color: var(--red);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ===== Kasa page ===== */
.kasa-hero {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kasa-hero .balance-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.kasa-hero .balance-amount { font-size: 2.25rem; font-weight: 700; color: var(--red); letter-spacing: -0.02em; }
.kasa-hero .balance-usdt { font-size: 0.5em; font-weight: 600; color: var(--text-muted); margin-left: 0.25rem; vertical-align: middle; }
.kasa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.kasa-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.kasa-card h3 { margin: 0 0 0.5rem 0; font-size: 1.05rem; color: var(--text); }
.kasa-card .kasa-card-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.kasa-card .form-group { margin-bottom: 1rem; }
.kasa-card .crypto-options { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kasa-card .crypto-option {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
}
.kasa-card .crypto-option input { display: none; }
.kasa-card .crypto-option:has(input:checked) { border-color: var(--red); background: var(--bg-hover); }
.kasa-card .crypto-option:hover { border-color: var(--border); background: var(--bg-hover); }
.kasa-card .crypto-option-label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.kasa-card .crypto-option-sublabel { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
@media (max-width: 640px) {
  .kasa-hero .balance-amount { font-size: 1.75rem; }
}

/* ===== Sahacı seçimi ===== */
.sahaci-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.sahaci-current-info { display: flex; flex-direction: column; gap: 0.2rem; }
.sahaci-current-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sahaci-current-name { font-size: 1.1rem; font-weight: 600; color: var(--red); }
.sahaci-change-form {
  display: none;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.sahaci-change-form.is-visible { display: block; }
.sahaci-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.sahaci-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.sahaci-option:hover { border-color: var(--text-muted); background: var(--bg-hover); }
.sahaci-option input { flex-shrink: 0; }
.sahaci-option:has(input:checked),
.sahaci-option.is-selected { border-color: var(--red); background: var(--bg-hover); }
.sahaci-option-name { font-weight: 500; color: var(--text); }
.sahaci-iban-talep {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Sahacı çevrimiçi / çevrimdışı göstergesi */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-pill.status-online {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}
.status-pill.status-online .status-dot {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}
.status-pill.status-offline {
  background: rgba(113, 113, 122, 0.25);
  color: var(--text-muted);
}
.status-pill.status-offline .status-dot {
  background: var(--text-muted);
}
.sahaci-current-name .status-pill { margin-left: 0.5rem; }
.sahaci-option .status-pill { margin-left: auto; }

@media (max-width: 480px) {
  .sahaci-options { grid-template-columns: 1fr; }
}
