/* Global Styles - Proses Takip Sistemi */

/* CSS Variables for Theming */
:root {
  /* Day Mode - Default */
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --bg-tertiary: #cbd5e1;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Gradients for Day Mode */
  --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
  --gradient-secondary: linear-gradient(135deg, #4a1a5f 0%, #7a3a9f 50%, #4a1a5f 100%);
  --gradient-accent: linear-gradient(135deg, #1a4a3f 0%, #2a7a5f 50%, #1a4a3f 100%);
  --gradient-avatar: conic-gradient(from 0deg, #1e3a5f, #4a1a5f, #1a4a3f, #5a2a0f, #1e3a5f);
  --gradient-text: linear-gradient(90deg, #1e3a5f, #4a1a5f, #1a4a3f, #1e3a5f);
  --gradient-background: radial-gradient(ellipse at top left, rgba(30, 58, 95, 0.1), transparent 50%),
                          radial-gradient(ellipse at bottom right, rgba(74, 26, 95, 0.1), transparent 50%),
                          linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  
  /* UI Colors */
  --accent-primary: #3b82f6;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  /* Cards and Surfaces */
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(203, 213, 225, 0.5);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  
  /* Animation speeds */
  --animation-slow: 8s;
  --animation-medium: 4s;
  --animation-fast: 2s;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* Night Mode */
[data-theme="night"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Gradients for Night Mode */
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #0099ff 50%, #00d4ff 100%);
  --gradient-secondary: linear-gradient(135deg, #a855f7 0%, #7c3aed 50%, #a855f7 100%);
  --gradient-accent: linear-gradient(135deg, #22d3ee 0%, #06b6d4 50%, #22d3ee 100%);
  --gradient-avatar: conic-gradient(from 0deg, #00d4ff, #a855f7, #22d3ee, #f97316, #00d4ff);
  --gradient-text: linear-gradient(90deg, #00d4ff, #a855f7, #22d3ee, #00d4ff);
  --gradient-background: radial-gradient(ellipse at top left, rgba(0, 212, 255, 0.15), transparent 50%),
                          radial-gradient(ellipse at bottom right, rgba(168, 85, 247, 0.15), transparent 50%),
                          linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  
  /* Cards and Surfaces */
  --card-bg: rgba(30, 41, 59, 0.9);
  --card-border: rgba(71, 85, 105, 0.5);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gradient-background);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

/* Animated Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.animated-background::before,
.animated-background::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float var(--animation-slow) ease-in-out infinite;
}

.animated-background::before {
  width: 600px;
  height: 600px;
  background: var(--gradient-primary);
  top: -200px;
  left: -200px;
}

.animated-background::after {
  width: 500px;
  height: 500px;
  background: var(--gradient-secondary);
  bottom: -150px;
  right: -150px;
  animation-delay: -4s;
}

.animated-background .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  animation: float var(--animation-slow) ease-in-out infinite;
}

.animated-background .orb-1 {
  width: 400px;
  height: 400px;
  background: var(--gradient-accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -2s;
}

.animated-background .orb-2 {
  width: 300px;
  height: 300px;
  background: var(--gradient-secondary);
  top: 20%;
  right: 10%;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Gradient Text Animation */
.gradient-text {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift var(--animation-slow) linear infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  background-size: 200% auto;
}

.btn-primary:hover {
  background-position: right center;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.125rem;
}

/* Form Elements */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, 
.form-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

/* Checkbox styling */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 250px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-align: center;
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: 0.875rem;
  box-shadow: var(--card-shadow);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Avatar with animated border */
.avatar-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-border {
  position: absolute;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: 50%;
  background: var(--gradient-avatar);
  animation: spin var(--animation-slow) linear infinite;
}

.avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-primary);
  z-index: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Status indicators */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-completed { background: var(--accent-success); }
.status-current { background: var(--accent-primary); animation: pulse 2s ease-in-out infinite; }
.status-upcoming { background: var(--text-muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg-tertiary);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--spacing-md);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--spacing-xl) + 2px);
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid var(--bg-primary);
}

.timeline-item.completed::before { background: var(--accent-success); }
.timeline-item.current::before { background: var(--accent-primary); animation: pulse 2s ease-in-out infinite; }

/* Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: var(--radius-md); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: var(--radius-md); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-xl);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

.main-content {
  padding-top: 80px;
  min-height: 100vh;
}

/* Tab navigation */
.tabs {
  display: flex;
  gap: var(--spacing-xs);
  border-bottom: 1px solid var(--card-border);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  font-weight: 500;
  text-decoration: none;
}

.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-primary); }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--card-border);
}

.modal-body { padding: var(--spacing-lg); }

.modal-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-secondary);
}

.table tr:hover td { background: var(--bg-secondary); }

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Alert messages */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--accent-success);
  color: var(--accent-success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--accent-warning);
  color: var(--accent-warning);
}

/* Waiting icon animation */
.waiting-icon {
  animation: waitingPulse 1.5s ease-in-out infinite;
}

@keyframes waitingPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}
