:root {
  --primary: #004080;
  --muted: #f0f4fa;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #f6f8fb;
  color: #222;
  margin: 0;
  padding: 0;
}

.topbar {
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: 0 16px;
  align-items: start; /* grid itemleri üstte sabitler */
}

.left, .right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-card, .card {
  background: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.chat-body {
  height: 420px;
  overflow-y: auto;
  padding: 12px;
  background: var(--muted);
  border-radius: 8px;
}

.msg {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  max-width: 85%;
}

.msg.user {
  background: #e7f0ff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.msg.ai {
  background: #fff;
  margin-right: auto;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.chat-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid #ddd;
}

.chat-input button, .file-btn {
  padding: 8px 12px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: block;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 18px rgba(0,0,0,0.03);
}

.container.single {
  max-width: 900px;
}

.back {
  display: inline-block;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--primary);
}

@media(max-width:900px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Chart canvas sabitle */
#chart {
  width: 100% !important;
  height: 240px !important;
}

/* Genel buton ve form stilleri */
h1 { color: #333; }

a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }

form input, form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}

button {
  padding: 10px 20px;
  background: #007bff;
  color: #fff;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}
