/* Reset ve Genel Stiller */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Arial, sans-serif;
  background: #f5f7fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  font-size: 1.1em;
  line-height: 1;
  vertical-align: -0.15em;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }
}

/* Login Ekranı */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #007AFF, #0051D5);
}

.login-box {
  width: 100%;
  max-width: 440px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 48px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  .login-box {
    padding: 32px;
    border-radius: 20px;
    margin: 16px;
  }
}

.login-box h2 {
  margin-bottom: 8px;
  color: #1a1a1a;
  text-align: center;
}

.login-subtitle {
  color: #666;
  text-align: center;
  margin-bottom: 30px;
}

/* Form Elemanları */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007AFF;
  background: white;
  box-shadow: 0 0 0 4px rgba(0,122,255,0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:read-only {
  background: #f3f4f6;
  color: #6b7280;
}

.login-input {
  width: 100%;
  padding: 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fafafa;
}

.login-input:focus {
  outline: none;
  border-color: #007AFF;
  background: white;
  box-shadow: 0 0 0 4px rgba(0,122,255,0.1);
}

/* Şifre Input */
.password-wrapper {
  position: relative;
}

.password-wrapper .login-input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover svg {
  stroke: #0066cc;
}

/* Beni Hatırla */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.remember-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Butonlar */
.btn {
  padding: 14px 28px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,122,255,0.2);
}

.btn:hover {
  background: #0051D5;
  box-shadow: 0 4px 8px rgba(0,122,255,0.3);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: #6b7280;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-success {
  background: #059669;
}

.btn-success:hover {
  background: #047857;
}

.btn-danger {
  background: #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 10px;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}

.login-btn:hover {
  background: #0051D5;
  box-shadow: 0 6px 16px rgba(0,122,255,0.4);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Uyarı Mesajları */
.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
}

.alert-error {
  background: #fee2e2;
  color: #b91c1c;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
}

.login-error {
  color: #dc2626;
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  display: none;
}

/* Header ve Navbar */
.header {
  background: linear-gradient(135deg, #007AFF, #0051D5);
  color: white;
  padding: 24px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .header {
    padding: 20px 16px;
  }
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.header h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.header-left h1 {
  font-size: 24px;
  margin: 0;
}

.header-left p {
  margin: 5px 0 0 0;
  opacity: 0.9;
  font-size: 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-badge {
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.logout-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.logout-btn:hover {
  background: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Navigation */
.nav {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 32px;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px 24px;
}

@media (max-width: 768px) {
  .nav-content {
    padding: 8px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.nav-link {
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #86868b;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.nav-link:hover {
  color: #007AFF;
  border-bottom-color: #007AFF;
}

.nav-link.active {
  color: #007AFF;
  border-bottom-color: #007AFF;
}

@media (max-width: 768px) {
  .nav-link {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Dashboard Kartları */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.stat-card {
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  border-left: 5px solid;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.stat-card.blue { border-left-color: #0066cc; }
.stat-card.green { border-left-color: #059669; }
.stat-card.yellow { border-left-color: #f59e0b; }
.stat-card.red { border-left-color: #dc2626; }

.stat-card h3 {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 5px;
}

/* Card & Panel */
.card {
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .card {
    padding: 20px;
    border-radius: 12px;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.card-header h2 {
  font-size: 20px;
  color: #1a1a1a;
}

.card-body {
  padding-top: 10px;
}

/* Servis Listesi */
.services-list {
  margin-top: 24px;
}

.service-item {
  background: #fafafa;
  padding: 24px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1.5px solid #e5e7eb;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-item:hover {
  border-color: #007AFF;
  box-shadow: 0 4px 12px rgba(0,122,255,0.08);
  transform: translateY(-1px);
}

.service-item.selected {
  border-color: #007AFF;
  background: #f0f7ff;
  box-shadow: 0 4px 12px rgba(0,122,255,0.12);
}

@media (max-width: 768px) {
  .service-item {
    padding: 16px;
    border-radius: 12px;
  }
}

.service-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.service-item-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.service-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.service-code {
  font-size: 18px;
  font-weight: 700;
  color: #0066cc;
}

.service-status {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 2px solid rgba(0,0,0,0.1);
}

.service-details {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 15px;
}

.service-details strong {
  color: #1a1a1a;
}

.service-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  align-items: center;
}

/* Durum Renkleri */
.status-teklif-bekliyor { background: #f3e8ff; color: #7c3aed; }
.status-teklif-onaylandi { background: #dbeafe; color: #1e40af; }
.status-parca-bekleniyor { background: #fef3c7; color: #92400e; }
.status-servis-surecinde { background: #fed7aa; color: #c2410c; }
.status-kalite-kontrol { background: #e0e7ff; color: #4338ca; }
.status-tamamlandi { background: #bbf7d0; color: #166534; }
.status-teslim-edildi { background: #d1fae5; color: #065f46; }
.status-iptal { background: #fee2e2; color: #b91c1c; }

/* Yükleme Animasyonu */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

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

.loading-container {
  text-align: center;
  padding: 60px 20px;
}

.loading-container .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e5e7eb;
  border-top-color: #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #374151;
}

.empty-state p {
  font-size: 14px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* Settings */
.settings-section {
  margin-bottom: 30px;
}

.settings-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #1a1a1a;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f3f4f6;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-info h4 {
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.settings-item-info p {
  font-size: 13px;
  color: #6b7280;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #0066cc;
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
    border-radius: 16px;
    width: 95%;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 20px;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

.modal-close:hover {
  color: #1a1a1a;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-content {
    flex-direction: column;
    gap: 5px;
  }

  .nav-link {
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .nav-link:hover,
  .nav-link.active {
    border-bottom: none;
    border-left-color: #0066cc;
  }

  .login-box {
    margin: 20px;
    padding: 30px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}
