/**
 * Eksik Takip - Full Featured Styles
 * Orijinal tasarım + WordPress entegrasyonu
 */

:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #ede9fe;
  --primary-soft: #f5f3ff;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-gradient: linear-gradient(to bottom, #f5f3ff, #ffffff);
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --text-main: #111827;
  --text-soft: #6b7280;
  --text-lighter: #9ca3b8;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --shadow-soft: 0 10px 25px rgba(124, 58, 237, 0.08);
  --shadow-hover: 0 12px 32px rgba(124, 58, 237, 0.15);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Base */
.eksik-takip-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.eksik-takip-app * {
  box-sizing: border-box;
}

/* Header */
.et-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 32px; /* WordPress admin bar */
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.et-header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.et-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.et-logo-text h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.et-logo-text p {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0;
}

.et-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--primary-soft);
  border-radius: 24px;
}

.et-user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.et-user-name {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
}

.et-sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.et-sync-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* Toolbar */
.et-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.et-toolbar-left {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.et-toolbar-right {
  flex: 1;
  max-width: 400px;
}

/* Buttons */
.et-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.et-btn-primary {
  background: var(--primary);
  color: white;
}

.et-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.et-btn-secondary {
  background: var(--bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.et-btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
}

.et-btn-danger {
  background: var(--danger);
  color: white;
}

.et-btn-danger:hover {
  background: #dc2626;
}

.et-btn-link {
  background: transparent;
  color: var(--primary);
  padding: 8px 12px;
}

.et-btn-link:hover {
  background: var(--primary-soft);
}

.et-icon {
  font-size: 16px;
}

/* Search */
.et-search {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.et-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Stats */
.et-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.et-stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}

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

.et-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.et-stat-label {
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Filters */
.et-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.et-filter {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
}

.et-filter:focus {
  outline: none;
  border-color: var(--primary);
}

/* Table */
.et-table-container {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.et-table {
  width: 100%;
  border-collapse: collapse;
}

.et-table thead {
  background: var(--primary-light);
  border-bottom: 2px solid var(--primary);
}

.et-table th {
  padding: 14px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.et-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--text-main);
}

.et-table tbody tr {
  transition: background 0.2s;
}

.et-table tbody tr:hover {
  background: var(--bg-soft);
}

.et-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badge */
.et-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.et-status-completed {
  background: #d1fae5;
  color: #065f46;
}

.et-status-in-progress {
  background: #fef3c7;
  color: #92400e;
}

.et-status-waiting {
  background: #fef08a;
  color: #854d0e;
}

.et-status-pending {
  background: #e5e7eb;
  color: #374151;
}

/* Action Buttons */
.et-action-btns {
  display: flex;
  gap: 8px;
}

.et-action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.et-action-edit {
  background: var(--info);
  color: white;
}

.et-action-edit:hover {
  background: #2563eb;
}

.et-action-delete {
  background: var(--danger);
  color: white;
}

.et-action-delete:hover {
  background: #dc2626;
}

/* Modal */
.et-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.et-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.et-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.et-modal-content {
  position: relative;
  background: var(--bg);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-strong);
  animation: modalSlideIn 0.3s ease;
}

.et-modal-sm {
  max-width: 400px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.et-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.et-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.et-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-soft);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.et-modal-close:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

.et-modal-body {
  padding: 24px;
}

.et-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

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

.et-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.et-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

.et-form-group input,
.et-form-group textarea,
.et-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.et-form-group input:focus,
.et-form-group textarea:focus,
.et-form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.et-form-group small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

/* Notifications */
.et-notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.et-notification {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.et-notification.success {
  border-left-color: var(--success);
}

.et-notification.error {
  border-left-color: var(--danger);
}

.et-notification.info {
  border-left-color: var(--info);
}

.et-notification-icon {
  font-size: 20px;
}

.et-notification-content {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
}

/* Loading */
.et-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

.et-spinner {
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.et-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-soft);
}

.et-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .et-header {
    top: 0;
  }
  
  .et-container {
    padding: 12px;
  }
  
  .et-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .et-toolbar-right {
    max-width: none;
  }
  
  .et-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .et-filters {
    flex-direction: column;
  }
  
  .et-filter {
    width: 100%;
  }
  
  .et-table-container {
    overflow-x: auto;
  }
  
  .et-table {
    min-width: 800px;
  }
  
  .et-form-row {
    grid-template-columns: 1fr;
  }
  
  .et-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .et-notifications {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}
