:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

/* Login Wrapper */
.login-wrapper {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  text-align: center;
}

/* Header */
.executive-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.peyzaj-btn {
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
}
.peyzaj-btn:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.hafriyat-btn {
  background: #fffbeb;
  color: #92400e;
  border: 1.5px solid #fde68a;
}
.hafriyat-btn:hover {
  background: #fef3c7;
  transform: translateY(-1px);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 20px;
}

/* Main Container */
.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.kpi-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ciro-card .kpi-icon { background: #eff6ff; color: #2563eb; }
.kasa-card .kpi-icon { background: #f0fdf4; color: #16a34a; }
.alacak-card .kpi-icon { background: #ecfdf5; color: #059669; }
.borc-card .kpi-icon { background: #fef2f2; color: #dc2626; }
.net-card .kpi-icon { background: #f5f3ff; color: #7c3aed; }
.cek-card .kpi-icon { background: #fffbeb; color: #d97706; }

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  margin: 12px 0 6px 0;
  color: #0f172a;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  flex-wrap: wrap;
}

.peyzaj-text { color: #059669; }
.hafriyat-text { color: #d97706; }
.sub-divider { color: #cbd5e1; }

/* Business Comparison Cards */
.businesses-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.biz-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.peyzaj-box { border-top: 4px solid #10b981; }
.hafriyat-box { border-top: 4px solid #f59e0b; }

.biz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.biz-badge {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.peyzaj-badge { background: #ecfdf5; color: #065f46; }
.hafriyat-badge { background: #fffbeb; color: #92400e; }

.peyzaj-link { color: #059669; border-color: #a7f3d0; text-decoration: none; font-weight: 700; }
.hafriyat-link { color: #d97706; border-color: #fde68a; text-decoration: none; font-weight: 700; }

.biz-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.biz-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #334155;
}

/* Content Box */
.content-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

/* Filter Tabs */
.tab-filter-bar {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-weight: 700;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: #1e293b;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #f8fafc;
}

/* Form Controls & Buttons */
.form-control {
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border 0.2s;
}
.form-control:focus {
  border-color: #6366f1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; }

.btn-primary {
  background: #4f46e5;
  color: #ffffff;
}
.btn-primary:hover {
  background: #4338ca;
}

.btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
.btn-outline:hover {
  background: #f1f5f9;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
