/* Yatırım takip demo — panel stilleri */
:root {
  --bg: #0c0f14;
  --surface: #141a22;
  --surface-hover: #1a222e;
  --border: #263041;
  --text: #eef2f7;
  --muted: #8b9aaf;
  --accent: #0d9b9b;
  --accent-hover: #0cb8b8;
  --danger: #e85d5d;
  --success: #3dd68c;
  --warning: #e9b949;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.hidden { display: none !important; }

/* Auth */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(13, 155, 155, 0.22), transparent),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-brand { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.auth-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #067a7a);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  color: #fff;
}
.auth-card h1 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.auth-tag { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.85rem; }
.auth-hint { font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.auth-hint a { color: var(--accent-hover); }
.auth-form label { display: block; margin-bottom: 0.9rem; font-size: 0.8rem; color: var(--muted); }
.auth-form input {
  width: 100%; margin-top: 0.35rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 155, 155, 0.2);
}
.form-error { color: var(--danger); font-size: 0.85rem; margin: 0 0 0.75rem; }
.auth-roles {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}
.auth-roles p { margin: 0.35rem 0; }

/* Shell */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: 260px;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex !important; }
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.sidebar-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #067a7a);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.95rem;
}
.sidebar-brand strong { display: block; font-size: 0.95rem; }
.sidebar-brand small { color: var(--muted); font-size: 0.75rem; }

.sidebar-nav { flex: 1; padding: 0.5rem 0.65rem; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active {
  background: rgba(13, 155, 155, 0.12);
  color: var(--accent-hover);
  font-weight: 600;
}
.nav-item .ic { width: 1.25rem; text-align: center; opacity: 0.85; }

.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
.sidebar-user #userEmail { display: block; word-break: break-all; color: var(--text); margin-bottom: 0.35rem; }

.role-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.role-pill.admin { background: rgba(233, 185, 73, 0.2); color: var(--warning); }
.role-pill.personel { background: rgba(139, 154, 175, 0.2); color: var(--muted); }

.main-wrap { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 15, 20, 0.6);
  backdrop-filter: blur(8px);
}
.topbar-title { margin: 0; font-size: 1.15rem; font-weight: 600; flex: 1; }
.menu-toggle { display: none; }

.content { padding: 1.25rem 1.5rem 2.5rem; max-width: 1400px; }

/* Components */
.banner {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  border: 1px solid var(--border);
}
.banner-info { background: rgba(13, 155, 155, 0.1); color: #9ee5e5; }
.banner-warn { background: rgba(233, 185, 73, 0.1); color: #f0d48a; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.card label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.card .val { font-size: 1.45rem; font-weight: 700; margin-top: 0.35rem; letter-spacing: -0.02em; }
.card .val.pos { color: var(--success); }
.card .val.neg { color: var(--danger); }
.card .sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
}
.panel h3 { margin: 0 0 1rem; font-size: 1rem; font-weight: 600; }

.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th, table.data td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--surface-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
}
.badge-off { background: rgba(232, 93, 93, 0.15); color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--muted); }
.btn-danger { background: rgba(232, 93, 93, 0.2); color: var(--danger); border-color: rgba(232, 93, 93, 0.35); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-hover); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; color: var(--muted); }
.field input, .field select {
  min-width: 200px;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 0.75rem; font-size: 1.1rem; }

.toast-wrap {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
}
.toast.ok { border-color: rgba(61, 214, 140, 0.4); }
.toast.err { border-color: rgba(232, 93, 93, 0.5); color: #ffb4b4; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.site-form input { flex: 1; min-width: 160px; }

.preview-table { max-height: 280px; overflow: auto; }
