/* ===== KKES - Kampüs Kaybolan Eşya Sistemi - Stiller ===== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 10px 25px rgba(0,0,0,0.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

h1 { font-size: 1.8rem; margin-bottom: 4px; }
h2 { font-size: 1.4rem; margin-bottom: 8px; }
h3 { font-size: 1.05rem; }

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }
.req { color: var(--danger); }

/* ===== Auth Sayfaları ===== */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  padding: 20px;
}
.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ===== Tab Switch ===== */
.tab-switch {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}
.tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 0.95rem;
}
.tab.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ===== Form ===== */
.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 500; font-size: 0.9rem; color: var(--text); }

input[type="text"], input[type="email"], input[type="password"],
input[type="file"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
textarea { resize: vertical; min-height: 80px; }

.radio-group { display: flex; gap: 12px; }
.radio {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--card);
}
.radio:has(input:checked) { border-color: var(--primary); background: #eef2ff; }

.preview {
  max-width: 200px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ===== Butonlar ===== */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.05s, opacity 0.15s, background 0.15s;
  text-align: center;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-link {
  background: transparent; border: none; cursor: pointer;
  color: var(--primary); padding: 8px 12px; font-size: 0.95rem;
}
.btn-link:hover { text-decoration: underline; }

/* ===== Mesajlar ===== */
.msg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1px;
}
.msg:empty { display: none; }
.msg-error { background: #fee2e2; color: #991b1b; }
.msg-success { background: #d1fae5; color: #065f46; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* ===== Navbar ===== */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
  gap: 8px;
}
.navbar .brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a, .nav-links button {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s;
}
.nav-links a:hover { background: var(--bg); text-decoration: none; }

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.container-narrow { max-width: 720px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Filtreler ===== */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filters input { flex: 2; min-width: 200px; }
.filters select { flex: 1; min-width: 140px; }

/* ===== Kart Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card-img {
  height: 170px;
  background-color: #f3f4f6;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img .no-img { font-size: 3rem; opacity: 0.4; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.card-row h3 { flex: 1; }
.card .desc { color: var(--text-muted); font-size: 0.9rem; }
.card .date { color: var(--text-muted); margin-top: 4px; }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-lost { background: #fee2e2; color: #991b1b; }
.badge-found { background: #d1fae5; color: #065f46; }
.badge-delivered { background: #dbeafe; color: #1e40af; }
.badge-role { background: #ede9fe; color: #5b21b6; }

/* ===== Detay Sayfası ===== */
.detail-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}
.detail-img.no-img {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  opacity: 0.3;
}
.detail-body { padding: 24px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 20px;
  margin: 16px 0;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
}
.detail-desc { white-space: pre-wrap; line-height: 1.6; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--text-muted); }

/* ===== Form Card / Actions ===== */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ===== Profil ===== */
.profile-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
}
.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.stat {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.stat .num { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat .lbl { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.stat-lost { border-color: var(--danger); } .stat-lost .num { color: var(--danger); }
.stat-found { border-color: var(--success); } .stat-found .num { color: var(--success); }
.stat-delivered { border-color: #3b82f6; } .stat-delivered .num { color: #3b82f6; }

/* ===== Tablolar ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table thead { background: var(--bg); }
.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.table th { font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }
.table .status-sel, .table .role-sel { padding: 4px 8px; font-size: 0.85rem; }

/* ===== Diğer ===== */
.loading, .empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  background: var(--card);
  border-radius: var(--radius);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .navbar { padding: 12px 16px; }
  .nav-links a, .nav-links button { padding: 6px 10px; font-size: 0.88rem; }
  .container { padding: 16px; }
  .auth-card { padding: 28px 22px; }
  h1 { font-size: 1.5rem; }
  .filters { flex-direction: column; }
  .filters input, .filters select { width: 100%; }
  .table { font-size: 0.85rem; display: block; overflow-x: auto; }
  .profile-card { flex-direction: column; text-align: center; }
}
