/* AmigoKargo — ortak tema */
:root {
  --bg-deep: #f6f7ff;
  --bg-card: #ffffff;
  --bg-elevated: #f9faff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  padding-top: 68px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(246, 247, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.05);
}

.site-nav .brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
}
.site-nav .brand img.brand-full-logo{
  width: 132px;
  max-width: 132px;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent !important;
}
.lang-switch{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-left:10px;
}
.lang-switch a{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--text-muted);
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.02em;
  text-decoration:none;
}
.lang-switch a:hover{
  color:var(--text);
  background:var(--bg-elevated);
  text-decoration:none;
}
.site-nav .brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  text-decoration: none;
  background: transparent;
}
.lang-switch a.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
  font-weight: 700;
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.back-home:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--bg-elevated);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover {
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
}

.nav-links a.btn-nav {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
.nav-links a.btn-nav:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.section {
  padding: 72px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: 1.75rem;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 36px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.footer-grid strong {
  color: var(--text);
  display: block;
  margin-bottom: 10px;
}

/* Form controls */
.input,
select.input {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.input:focus,
select.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: #334155;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}
.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.hero-track {
  text-align: center;
  padding: 56px 24px 80px;
  background: linear-gradient(180deg, #f8f9ff 0%, #f6f7ff 100%);
  border-bottom: 1px solid var(--border);
}

.hero-track h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}

.hero-track .sub {
  color: var(--text-muted);
       max-width: 520px;
  margin: 0 auto 28px;
}

.track-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
}
.track-form .input {
  flex: 1 1 200px;
}

/* Takip sonucu */
.result-card {
  max-width: 720px;
  margin: 32px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.05);
}

.result-card .status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.meta-row strong {
  color: var(--text);
}

/* Adım göstergesi */
.steps {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 24px 0;
  position: relative;
}
.step {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  padding-top: 28px;
}
.step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--border);
  transform: translateX(-50%);
}
.step.done::before {
  background: var(--success);
  border-color: var(--success);
}
.step.active::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}
.step .label {
  line-height: 1.2;
}

.timeline-clean {
  border-left: 3px solid rgba(99, 102, 241, 0.7);
  margin: 20px 0;
  padding-left: 20px;
}
.timeline-clean .event {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.timeline-clean .event:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.timeline-clean .event strong {
  color: var(--accent);
}
.timeline-clean .event .when {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.timeline-stages .stage-row .stage-name {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.timeline-stages .stage-row .stage-detail {
  color: var(--text);
  line-height: 1.45;
  font-size: 0.92rem;
}
.timeline-stages .stage-row .when {
  margin-top: 6px;
}

.takip-map-wrap {
  max-width: 400px;
  width: 100%;
  margin: 12px auto 0;
}

#takip-map {
  height: 160px;
  max-height: 40vh;
  border-radius: var(--radius);
  margin-top: 0;
  border: 1px solid var(--border);
  width: 100%;
}

/* Auth pages (admin / müşteri) */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-aside {
  background: linear-gradient(145deg, #eef2ff 0%, #f6f7ff 70%);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
}
.auth-aside h1 {
  font-size: 1.75rem;
  margin: 0 0 12px;
}
.auth-aside p {
  color: var(--text-muted);
  margin: 0;
  max-width: 400px;
  line-height: 1.6;
}
.auth-aside .aside-stats {
  margin-top: 40px;
  display: grid;
  gap: 16px;
}
.auth-aside .stat {
  background: #ffffff;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.auth-aside .stat b {
  font-size: 1.4rem;
  color: var(--accent);
}
.auth-logo {
  width: 120px;
  height: auto;
  max-width: 60%;
  margin-bottom: 10px;
  object-fit: contain;
  background: transparent !important;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-deep);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.auth-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}
.auth-card .hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

/* Admin panel */
.admin-body {
  background: var(--bg-deep);
  min-height: 100vh;
}
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(246, 247, 255, 0.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-top .logo {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-top .logo .admin-inline-logo{
  width: 105px;
  height: auto;
  object-fit: contain;
  background: transparent !important;
}
.admin-top .lang-switch{ margin-left:4px; }
.admin-top a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}
.admin-top a:hover {
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
}

.admin-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  position: sticky;
  top: 76px;
  z-index: 25;
  background: var(--bg-deep);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-tab-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab-btn:hover {
  background: #f7f8ff;
  color: var(--text);
}

.admin-tab-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  color: #3730a3;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
}
.admin-card h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th,
table.data td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tr:hover td {
  background: #f7f8ff;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--success);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  display: none;
  z-index: 200;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

code {
  font-size: 0.88em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

#admin-map {
  height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Akilli kargo modern tema */
body.smart-light,
.smart-light {
  --bg-deep: #f6f7ff;
  --bg-card: #ffffff;
  --bg-elevated: #eef2ff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #16a34a;
  color: var(--text);
  background: var(--bg-deep);
}

.smart-live-box {
  margin-top: 14px;
  background: #f8f9ff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}
.smart-live-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.smart-pill {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
}
.smart-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #374151;
}
.smart-progress {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 10px;
  overflow: hidden;
}
.smart-progress > span {
  display: block;
  height: 9px;
  background: linear-gradient(90deg, #6366f1, #22c55e);
  transition: width 0.4s ease;
}
.smart-mini-map {
  margin-top: 10px;
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
}
.smart-timeline-mini {
  margin-top: 10px;
  border-top: 1px dashed #d1d5db;
  padding-top: 8px;
}
.smart-mini-row {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 6px;
}

.js-kargo-card.live-priority {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 12px 24px rgba(17, 24, 39, 0.06);
}
