/* Modern CSS Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #f8fafc;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --dark-color: #1e293b;
  --light-color: #f1f5f9;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
  --border-radius-lg: 16px;
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Login Page Styles */
.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-page .card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-page .card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 2rem;
  text-align: center;
  border: none;
  font-size: 1.5rem;
  font-weight: 600;
}

.login-page .card-body {
  padding: 2rem;
}

.login-page .form-control {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.login-page .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: white;
}

.login-page .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  width: 100%;
  transition: all 0.3s ease;
}

.login-page .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Dashboard Layout - Düzeltilmiş */
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background: var(--secondary-color);
}

/* Modern Sidebar - Düzeltilmiş */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: white;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar .components {
  padding: 1rem 0;
}

.sidebar .components li {
  margin: 0.5rem 0;
}

.sidebar .components li a {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0 25px 25px 0;
  margin-right: 1rem;
  font-weight: 500;
}

.sidebar .components li a:hover {
  background: rgba(99, 102, 241, 0.2);
  color: white;
  transform: translateX(5px);
}

.sidebar .components li a.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

/* Main Content - Düzeltilmiş */
#content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  background: var(--secondary-color);
  min-height: 100vh;
  width: calc(100% - 280px);
  max-width: calc(100% - 280px);
  overflow-x: hidden;
}

/* Modern Cards */
.card {
  background: white;
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.card-body {
  padding: 2rem;
}

/* Modern Forms */
.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Modern Buttons */
.btn {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Modern Tables */
.table {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead th {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: none;
  padding: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.table tbody td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Modern Alerts */
.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
  color: #065f46;
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  color: #991b1b;
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  color: #92400e;
  border-left: 4px solid var(--warning-color);
}

/* Stats Cards - Düzeltilmiş */
.stats-card {
  background: linear-gradient(135deg, white, #f8fafc);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 150px;
}

.stats-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stats-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stats-card p {
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* Chart Container */
.chart-container {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

/* Badge Styles */
.badge {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 12px;
}

.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

/* Container düzeltmeleri */
.container-fluid {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}

.row {
  margin-left: 0;
  margin-right: 0;
}

.col-md-6,
.col-md-3,
.col-md-4,
.col-md-12 {
  padding-left: 15px;
  padding-right: 15px;
}

/* Responsive Design - Düzeltilmiş */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  #content {
    margin-left: 0;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .card-body {
    padding: 1.5rem;
  }

  .stats-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 992px) {
  #content {
    padding: 1.5rem;
  }

  .stats-card {
    margin-bottom: 1rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Transitions */
* {
  transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
