:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #22c55e;
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 10% 10%, #0b1229 0%, var(--bg) 60%);
  color: var(--text);
}
.container {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  width: 100%;
  max-width: none;
}
.card {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
h2 { margin: 16px 0 8px; }
.card-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 32px; 
  margin-top: 24px; 
}

.card-item { 
  border: 1px solid rgba(255,255,255,0.12); 
  border-radius: 16px; 
  padding: 32px; 
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
}

.chart-container {
  width: 100%;
  height: 500px;
  padding: 20px;
  position: relative;
}

.chart-container canvas {
  max-height: 500px !important;
}

.department-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.department-chart-item {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  backdrop-filter: blur(8px);
}

.department-chart-item h4 {
  margin: 0 0 16px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.chart-container-small {
  width: 100%;
  height: 250px;
  position: relative;
  margin-bottom: 16px;
}

.chart-container-small canvas {
  max-height: 250px !important;
}

.dept-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.dept-summary .summary-item {
  text-align: center;
  flex: 1;
}

.dept-summary .label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.dept-summary .value {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.dept-summary .value.revenue {
  color: #22c55e;
}

.dept-summary .value.profit {
  color: #2563eb;
}

.dept-summary .value.margin {
  color: #7c3aed;
}

/* Yıllık Toplam Kartları */
.yearly-total-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yearly-total-card {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yearly-total-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.yearly-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.yearly-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 14px;
  color: white;
}

.yearly-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.yearly-card-values {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yearly-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.yearly-value-label {
  font-size: 12px;
  color: var(--muted);
}

.yearly-value-amount {
  font-size: 14px;
  font-weight: 600;
}

.yearly-value-amount.revenue {
  color: #22c55e;
}

.yearly-value-amount.profit {
  color: #3b82f6;
}

/* Çeyrek Seçim Butonları */
.quarter-selector {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  backdrop-filter: blur(8px);
}

.quarter-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quarter-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}

.quarter-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.quarter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.quarter-btn i {
  margin-right: 6px;
}

/* Dönem Toplamları */
.period-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.total-item {
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  text-align: center;
}

.total-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.total-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.total-value.revenue {
  color: #22c55e;
}

.total-value.profit {
  color: #3b82f6;
}

@media (max-width: 768px) {
  .department-charts {
    grid-template-columns: 1fr;
  }
  
  .dept-summary {
    flex-direction: column;
    gap: 8px;
  }
  
  /* Yıllık toplam kartları mobil düzeni */
  div[style*="display: flex; gap: 20px; align-items: flex-start;"] {
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  .yearly-total-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
  }
  
  .quarter-buttons {
    gap: 6px;
  }
  
  .quarter-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .period-totals {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.delete-btn {
  background: none !important;
  border: none !important;
  color: #ef4444 !important;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #dc2626 !important;
}

/* Modern Select Dropdown */
.select-wrapper {
  position: relative;
  display: block;
}

.modern-select {
  width: 100%;
  padding: 12px 45px 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.modern-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
}

.modern-select:hover {
  border-color: rgba(255,255,255,0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

.modern-select option {
  background: #1f2937;
  color: #e5e7eb;
  padding: 8px 12px;
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  transition: all 0.2s ease;
}

.modern-select:focus + .select-arrow {
  color: #2563eb;
  transform: translateY(-50%) rotate(180deg);
}

.modern-select:hover + .select-arrow {
  color: var(--text);
}

/* Modern Form Styles */
form input[type="text"],
form input[type="number"],
form textarea {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

form input[type="text"]:focus,
form input[type="number"]:focus,
form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
}

form label {
  display: block;
  margin-bottom: 16px;
  color: var(--text);
  font-weight: 500;
}

form label br {
  margin-bottom: 8px;
}

form hr {
  margin: 32px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
}

#forms h2 {
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 600;
}

.card-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #16a34a);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(34, 197, 94, 0.3);
}

.card-item:hover::before {
  opacity: 1;
}

@media (max-width: 768px) {
  .card-grid { 
    grid-template-columns: 1fr; 
    gap: 24px;
  }
  
  .card-item {
    padding: 24px;
    min-height: 350px;
  }
}
.card-item h3 { 
  margin: 0 0 12px; 
  font-size: 20px; 
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-item .department-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #16a34a);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #03130a;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
}

.card-item .department-description {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.card-item .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item {
  background: rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.card-item .links { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.card-item .action-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.card-item .action-link:hover {
  background: rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}

/* Data sections styles */
.data-sections {
  margin: 20px 0;
}

.data-section {
  margin-bottom: 24px;
}

.data-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  padding-bottom: 6px;
}

.data-section .section-content {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 8px;
}

.data-section .section-content::-webkit-scrollbar {
  width: 4px;
}

.data-section .section-content::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
}

.data-section .section-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.data-item {
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  transition: all 0.2s ease;
}

.data-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.data-item:last-child {
  margin-bottom: 0;
}

.target-value {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

.empty-message {
  padding: 16px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  font-style: italic;
}

.empty-state-card {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}

.empty-state-card i {
  font-size: 48px;
  color: var(--muted);
  margin-bottom: 16px;
  opacity: 0.7;
}

.empty-state-card h3 {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Performance indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-meter {
  background: rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

.performance-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Dashboard analytics cards */
.analytics-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.analytics-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.analytics-card .metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.analytics-card .metric-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analytics-card .metric-change {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.change-positive {
  color: #22c55e;
}

.change-negative {
  color: #ef4444;
}

.change-neutral {
  color: var(--muted);
}
h1 { margin: 0 0 8px; font-size: 36px; letter-spacing: -0.02em; }
p { margin: 0 0 24px; color: var(--muted); }
.actions { display: flex; gap: 12px; align-items: center; }
.button {
  display: inline-block;
  padding: 10px 16px;
  background: var(--primary);
  color: #03130a;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

h1 { margin: 0 0 8px; font-size: 36px; letter-spacing: -0.02em; }
p { margin: 0 0 24px; color: var(--muted); }
.actions { display: flex; gap: 12px; align-items: center; }
.button-red {
  display: inline-block;
  padding: 10px 16px;
  background: red;
  color: #000000;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}
.button:hover { filter: brightness(1.05); }
.link { color: var(--text); opacity: 0.9; text-decoration: underline; }
footer { margin-top: 16px; opacity: 0.8; }
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}
.table th, .table td { border: 1px solid rgba(255,255,255,0.12); padding: 8px; vertical-align: top; }
.table th { text-align: left; background: rgba(255,255,255,0.06); }
input[type="text"], input[type="number"], input[type="date"], textarea, select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.row-actions { display: flex; gap: 8px; }
.small { font-size: 12px; color: var(--muted); }

/* Sidebar Styles */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-right: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
  box-shadow: 4px 0 15px rgba(0,0,0,0.3);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #16a34a);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #03130a;
  font-weight: bold;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-header .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .title {
  opacity: 0;
}

.sidebar-toggle {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 8px;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(255,255,255,0.2);
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.nav-section {
  margin-bottom: 32px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding: 0 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-section-title {
  opacity: 0;
}

.nav-item {
  display: block;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  border-left-color: var(--primary);
  color: var(--primary);
}

.nav-item.active {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: var(--primary);
  color: var(--primary);
}

.nav-item i {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-text {
  opacity: 1;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
}

.sidebar.collapsed .nav-item {
  padding: 12px 15px;
  justify-content: center;
  display: flex;
  align-items: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.sidebar.collapsed .user-info {
  opacity: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #03130a;
  font-weight: bold;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  width: calc(100vw - var(--sidebar-width));
  max-width: none;
}

.sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed);
  width: calc(100vw - var(--sidebar-collapsed));
}

.page-header {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title i {
  color: var(--primary);
}

.page-content {
  padding: 32px;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100vw;
  }
  
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .mobile-menu-btn:hover {
    background: rgba(255,255,255,0.2);
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}

