@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-input: #f1f3f8;
  --border: #e2e5f1;
  --text: #1a1d2e;
  --text-secondary: #6b7194;
  --text-muted: #9ba2c0;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-bg: rgba(99,102,241,0.08);
  --success: #22c55e;
  --success-bg: rgba(34,197,94,0.08);
  --warning: #f59e0b;
  --warning-bg: rgba(245,158,11,0.08);
  --danger: #ef4444;
  --info: #3b82f6;
  --info-bg: rgba(59,130,246,0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============ HEADER ============ */
.app-header {
  text-align: center;
  padding: 40px 0 28px;
}

.header-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 18px;
  box-shadow: 0 8px 28px rgba(99,102,241,0.25);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.app-header h1 {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.app-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============ SEARCH BOX ============ */
.search-section {
  margin-bottom: 24px;
}

.search-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.search-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.search-input-wrap {
  display: flex;
  gap: 10px;
}

.search-input-wrap input {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.search-input-wrap input::placeholder {
  color: var(--text-muted);
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

.search-btn {
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.4);
}

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

.search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.search-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ============ RESULT ============ */
.result-section {
  flex: 1;
  display: none;
  animation: slideUp 0.4s ease;
}

.result-section.visible { display: block; }

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

/* Status Banner */
.status-banner {
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.status-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
}

.status-banner.status-teslim-alindi { background: var(--info-bg); border: 1px solid rgba(59,130,246,0.2); }
.status-banner.status-ariza-tespiti { background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.2); }
.status-banner.status-onay-bekleniyor { background: var(--warning-bg); border: 1px solid rgba(245,158,11,0.2); }
.status-banner.status-onarimda { background: rgba(14,165,233,0.08); border: 1px solid rgba(14,165,233,0.2); }
.status-banner.status-hazir { background: var(--success-bg); border: 1px solid rgba(34,197,94,0.2); }
.status-banner.status-teslim-edildi { background: rgba(107,114,128,0.08); border: 1px solid rgba(107,114,128,0.2); }
.status-banner.status-iptal { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); }

.status-banner .status-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.status-banner .status-text {
  font-size: 20px;
  font-weight: 800;
}

.status-banner .status-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Info Cards */
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-secondary); }
.info-row .value { font-weight: 600; text-align: right; max-width: 60%; }

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-step {
  position: relative;
  padding-bottom: 24px;
}

.timeline-step:last-child { padding-bottom: 0; }

.timeline-step .dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.timeline-step.completed .dot {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 0 4px var(--success-bg);
}

.timeline-step.completed .dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8px;
  font-weight: 800;
}

.timeline-step.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-bg); }
  50% { box-shadow: 0 0 0 8px rgba(99,102,241,0.1); }
}

.timeline-step .step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.timeline-step.pending .step-title {
  color: var(--text-muted);
}

.timeline-step .step-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.timeline-step .step-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============ PARTS ============ */
.parts-list {
  list-style: none;
}

.parts-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.parts-list li:last-child { border-bottom: none; }

.parts-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 2px solid var(--border);
  font-weight: 800;
  font-size: 15px;
  margin-top: 4px;
}

/* ============ ERROR ============ */
.error-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: none;
  animation: slideUp 0.4s ease;
}

.error-card.visible { display: block; }

.error-card .error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.error-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============ FOOTER ============ */
.app-footer {
  text-align: center;
  padding: 28px 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ LOADING ============ */
.loading-overlay {
  display: none;
  text-align: center;
  padding: 40px;
}

.loading-overlay.visible { display: block; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

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

.loading-overlay p {
  color: var(--text-secondary);
  font-size: 14px;
}
