:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #f1f5f9;
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --sidebar-bg: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.8);
  --border-color: #e2e8f0;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --font-family: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
}

/* Typography */
h1, h2, h3 { font-weight: 600; color: var(--text-main); }
p { color: var(--text-muted); line-height: 1.5; }

/* Utilities */
.hidden { display: none !important; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Material Symbols Adjustments */
.material-symbols-outlined {
  vertical-align: middle;
  font-size: 1.25rem;
}

/* Glass Panel */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

/* Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: #e2e8f0;
}

.icon-btn {
  padding: 0.5rem;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--secondary); color: var(--text-main); }

.delete-btn { color: var(--danger); }
.delete-btn:hover { background: #fef2f2; color: #dc2626; }

/* Login Page */
#login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  z-index: 1000;
}

.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.login-header h2 { margin-bottom: 0.5rem; }
.login-header p { margin-bottom: 2rem; font-size: 0.9rem; }

.input-group {
  position: relative;
  margin-bottom: 1.25rem;
}
.input-group .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.input-group input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  outline: none;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.login-card .btn-primary { width: 100%; margin-top: 0.5rem; padding: 0.85rem; }
.hata-mesaj { color: var(--danger); font-size: 0.85rem; margin-top: 1rem; height: 1rem; }

/* Layout: Sidebar & Main Content */
.layout {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}
.logo-icon { color: var(--primary); font-size: 1.8rem; }
.sidebar-header h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; }

.sidebar-nav {
  padding: 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 0.85rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border-radius: 10px;
}
.nav-btn.active {
  background: #eef2ff;
  color: var(--primary);
  font-weight: 600;
}
.nav-btn:hover:not(.active) { background: var(--secondary); color: var(--text-main); }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border-color); }
.nav-btn.logout { color: var(--danger); }
.nav-btn.logout:hover { background: #fef2f2; }

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg-color);
}

.topbar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.content-wrapper { padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }

.section-header { margin-bottom: 1.5rem; }
.section-header h2 { font-size: 1.5rem; }

/* Dashboard Cards */
.welcome-banner {
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}
.welcome-banner h1 { color: white; margin-bottom: 0.5rem; font-size: 1.8rem; }
.welcome-banner p { color: #e0e7ff; }
.banner-img { height: 120px; object-fit: contain; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon.blue { background: #e0e7ff; color: var(--primary); }
.stat-icon.green { background: #d1fae5; color: var(--success); }
.stat-icon.red { background: #fee2e2; color: var(--danger); }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-info h3 { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.25rem; }
.stat-info p { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }

/* Forms */
.form-panel { margin-bottom: 2rem; border-left: 4px solid var(--primary); }
.form-panel h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; align-items: end; }
.input-field { display: flex; flex-direction: column; gap: 0.4rem; }
.input-field label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.input-field input {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
}
.input-field input:focus { border-color: var(--primary); }
.form-actions { margin-top: 1.4rem; }

/* Toolbar & Filters */
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}
.search-box .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

.filtre-kutu { position: relative; }
.filtre-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 220px;
  padding: 0.5rem;
  z-index: 20;
}
.filtre-item {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: background 0.1s;
}
.filtre-item:hover { background: var(--secondary); }
.filtre-baslik {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  margin-top: 0.5rem;
}

/* Badges */
.badge {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.badge.green { background: var(--success); }
.badge.yellow { background: var(--warning); }
.badge.red { background: var(--danger); }
.badge.blue { background: var(--primary); }
.status-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-badge.gec { background: #d1fae5; color: #047857; border: 1px solid #10b981; }
.status-badge.kal { background: #fee2e2; color: #b91c1c; border: 1px solid #ef4444; }

/* Table */
.table-container { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); }
th {
  background: var(--secondary);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.2s; }
tbody tr:hover { background: #f8fafc; }
.action-buttons { display: flex; gap: 0.5rem; }

/* Charts */
.charts-container { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1rem; }
.bar-chart { width: 100%; }
.bar-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.bar-header .badge { width: auto; height: auto; padding: 2px 8px; border-radius: 12px; color: white; font-size: 0.75rem; }
.bar-track { width: 100%; height: 12px; background: var(--border-color); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 10px; }
.bar-fill.blue { background: var(--primary); }
.bar-fill.green { background: var(--success); }
.bar-fill.yellow { background: var(--warning); }
.bar-fill.red { background: var(--danger); }

/* Alerts */
.alert-panel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0ea5e9;
}
.alert-icon { color: #0ea5e9; font-size: 1.5rem; }
.alert-content h3 { font-size: 1rem; color: #0369a1; margin-bottom: 0.25rem; }
.alert-content p { color: #0c4a6e; }

/* Profile Detail */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.profile-sidebar { text-align: center; }
.profile-avatar {
  width: 100px;
  height: 100px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 4px solid white;
  box-shadow: var(--shadow-sm);
}
.profile-avatar .material-symbols-outlined { font-size: 4rem; color: #cbd5e1; }
.profile-name { font-size: 1.25rem; margin-bottom: 0.25rem; }
.profile-no { font-size: 0.9rem; }

.panel-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; margin-bottom: 1.25rem; }
.grades-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grade-item {
  background: var(--bg-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
}
.grade-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.grade-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.stat-box { display: flex; align-items: center; gap: 1rem; }
.stat-box .material-symbols-outlined { font-size: 2.5rem; }
.icon-blue { color: #3b82f6; }
.icon-orange { color: #f97316; }
.stat-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.stat-value { font-size: 1.25rem; font-weight: 600; color: var(--text-main); }

/* Responsive */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding: 1rem; }
  .nav-btn { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .topbar { display: none; } /* Hide topbar on mobile, show in sidebar header instead */
  .profile-layout { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr 1fr; }
}
