/* custom.css: Tüm özel stiller burada toplanacak, Bootstrap 5 ile uyumlu, mobil öncelikli ve modern bir görünüm sağlar. */

:root {
  --primary-color: #2196F3;
  --primary-dark: #1976D2;
  --primary-light: #BBDEFB;
  --accent-color: #FF9800;
  --accent-dark: #F57C00;
  --accent-light: #FFE0B2;
  --background-color: #F5F5F5;
  --surface-color: #FFFFFF;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --success-color: #22c55e;
  --success-light: #e7fbe9;
  --error-color: #ef4444;
  --error-light: #fde8e8;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-white: #fff;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  --font-size-body: 1rem;
}

body {
  background-color: var(--background-color);
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  min-height: 100vh;
  color: var(--text-primary);
}

.navbar {
  box-shadow: 0 2px 8px var(--card-shadow);
  border-radius: 0 0 1rem 1rem;
  min-height: 56px;
  background: var(--surface-color);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: var(--surface-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1050;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 8px var(--card-shadow);
}
.bottom-nav-item {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 0.5rem 0 0.2rem 0;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: color 0.2s, background 0.2s;
  border-radius: 0.7rem;
}
.bottom-nav-item.active,
.bottom-nav-item:active,
.bottom-nav-item:focus {
  color: var(--primary-color);
  font-weight: 600;
  background: var(--primary-light);
}
.bottom-nav-item i {
  font-size: 1.3rem;
}

.card {
  border-radius: 1.1rem !important;
  box-shadow: 0 2px 12px var(--card-shadow);
  border: none;
  background: var(--surface-color);
}

.btn {
  border-radius: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  min-height: 48px;
  font-size: var(--font-size-body);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(90deg, var(--primary-color) 60%, #60a5fa 100%);
  border: none;
  color: var(--text-white);
  box-shadow: 0 2px 4px var(--card-shadow);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  box-shadow: 0 4px 8px var(--card-shadow);
}
.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 0.7rem;
}
.btn-success {
  background: var(--success-color);
  color: var(--text-white);
  border: none;
}
.btn-warning {
  background: var(--accent-color);
  color: var(--text-white);
  border: none;
}
.btn-danger {
  background: var(--error-color);
  color: var(--text-white);
  border: none;
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #fff;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  transform: translateY(-50%);
}
@keyframes spin {
  100% { transform: rotate(360deg); }
}

input.form-control, select.form-select, textarea.form-control {
  border-radius: 0.7rem;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: var(--font-size-body);
  min-height: 48px;
}
input.form-control:focus, select.form-select:focus, textarea.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.15rem rgba(33, 150, 243, 0.08);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--font-size-body);
}
.form-label.required::after {
  content: ' *';
  color: var(--error-color);
}

.alert-success {
  background-color: var(--success-light);
  color: var(--success-color);
  border: 1px solid var(--success-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.alert-danger, .alert-error {
  background-color: var(--error-light);
  color: var(--error-color);
  border: 1px solid var(--error-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.mobile-padding {
  padding-bottom: 70px;
  padding-top: 1rem;
}

@media (min-width: 992px) {
  .bottom-nav { display: none !important; }
  .mobile-padding { padding-bottom: 2rem; }
}

.touch-device .btn:active, .touch-device .bottom-nav-item:active {
  background: #e0e7ff !important;
}

::-webkit-scrollbar {
  width: 8px;
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Animasyonlar */
.transition-fast { transition: all 0.2s ease; }
.transition-normal { transition: all 0.3s ease; }
.transition-slow { transition: all 0.5s ease; }

/* İkon boyutları ve renkleri */
.icon-sm { font-size: 16px; }
.icon-md { font-size: 24px; }
.icon-lg { font-size: 32px; }
.icon-xl { font-size: 48px; }
.icon-primary { color: var(--primary-color); }
.icon-accent { color: var(--accent-color); }
.icon-success { color: var(--success-color); }
.icon-error { color: var(--error-color); }

/* Kart ve menü stilleri */
.activity-card {
  background-color: var(--surface-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 1px 4px var(--card-shadow);
}
.customer-card {
  background-color: var(--surface-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 8px var(--card-shadow);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.2s ease;
}
.customer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--card-shadow);
}
.menu-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-md);
  background-color: var(--surface-color);
  border-radius: 12px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 2px 6px var(--card-shadow);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  min-height: 64px;
}
.menu-item:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}
.menu-item-icon {
  font-size: 24px;
  margin-right: var(--spacing-md);
  color: var(--primary-color);
}

/* Yükleme animasyonu */
.loading-spinner {
  border: 3px solid var(--background-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}

@media (prefers-contrast: high) {
  :root {
    --card-shadow: rgba(0, 0, 0, 0.3);
    --text-secondary: #000000;
  }
}
