/* dokuce.me — prototype styling
   Friendly, warm, mobile-first design */

:root {
  --color-primary: #ff6b4a;
  --color-primary-dark: #e2512f;
  --color-secondary: #1f3a5f;
  --color-secondary-light: #2d5280;
  --color-bg: #fffaf4;
  --color-bg-alt: #fff1e6;
  --color-card: #ffffff;
  --color-text: #2b2520;
  --color-text-muted: #6b6258;
  --color-success: #2fa86a;
  --color-warning: #e2a63a;
  --color-border: #f0e2d4;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 10px 30px rgba(31, 58, 95, 0.08);
  --shadow-pop: 0 16px 40px rgba(255, 107, 74, 0.25);
  --font-main: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}
.btn-secondary:hover { background: var(--color-secondary-light); }

.btn-ghost {
  background: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-secondary); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 244, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--color-secondary);
}
.brand .logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand small {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  text-transform: uppercase;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-desktop a {
  text-decoration: none;
  font-weight: 700;
  color: var(--color-secondary);
  font-size: 0.98rem;
}
.nav-desktop a:hover { color: var(--color-primary); }

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--color-bg-alt);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch a {
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--color-text-muted);
}
.lang-switch a.active {
  background: var(--color-secondary);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--color-secondary); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 20px 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 6px;
  text-decoration: none;
  font-weight: 700;
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
}
.nav-mobile .lang-switch { align-self: flex-start; margin-top: 10px; }

/* ---------- Badge ---------- */
.proto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff1e6;
  color: var(--color-primary-dark);
  border: 1px solid #ffd9c9;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 70px;
  background: linear-gradient(180deg, #fff1e6 0%, #fffaf4 60%);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 18px 0 14px;
  color: var(--color-secondary);
}
.hero h1 .accent { color: var(--color-primary); }
.hero p.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 0 28px;
}

.hero-art { position: relative; }

/* ---------- Tracking widget ---------- */
.track-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  border: 1px solid var(--color-border);
}
.track-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.track-form input[type="text"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  background: #fff;
}
.track-form input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
}
.track-form input[type="text"]::placeholder { color: #b9ad9e; font-weight: 600; }

.track-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.track-hint button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: var(--color-primary-dark);
  text-decoration: underline;
  cursor: pointer;
}

.track-error {
  margin-top: 14px;
  background: #fff1e6;
  border: 1px solid #ffcdb8;
  color: var(--color-primary-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  display: none;
}
.track-error.show { display: block; }

/* ---------- Result timeline ---------- */
.result-section { padding: 10px 0 70px; display: none; }
.result-section.show { display: block; }

.result-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  padding: 28px;
}
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--color-border);
}
.result-head h2 { margin: 0 0 4px; font-size: 1.3rem; color: var(--color-secondary); }
.result-code { font-weight: 800; color: var(--color-primary-dark); letter-spacing: 0.03em; }
.result-route { font-weight: 800; color: var(--color-primary-dark); margin-bottom: 6px; font-size: 1.02rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  background: var(--color-bg-alt);
  color: var(--color-secondary);
}
.status-pill.is-delivered { background: #e4f6ec; color: var(--color-success); }
.status-pill.is-ready { background: #fff4d9; color: #a8791f; }
.status-pill.is-hold { background: #ffe6e0; color: var(--color-primary-dark); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 26px 38px;
  border-left: 2px solid var(--color-border);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-border);
  border: 3px solid var(--color-bg);
}
.timeline li.done::before { background: var(--color-primary); }
.timeline li.done.final::before { background: var(--color-success); }
.timeline .t-title { font-weight: 800; color: var(--color-secondary); }
.timeline .t-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 2px; }
.timeline li:not(.done) .t-title,
.timeline li:not(.done) .t-meta { color: #c7bdae; }

/* ---------- Generic sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section h2.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--color-secondary);
  text-align: center;
  margin: 0 0 10px;
}
.section p.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card, .step-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.step-card { position: relative; }
.step-num {
  position: absolute;
  top: -14px;
  left: 22px;
  background: var(--color-primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(255,107,74,0.4);
}
.feature-card .icon-wrap, .step-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card .icon-wrap svg, .step-card .icon-wrap svg {
  width: 26px; height: 26px; color: var(--color-primary);
}
.feature-card h3, .step-card h3 { margin: 0 0 8px; color: var(--color-secondary); font-size: 1.1rem; }
.feature-card p, .step-card p { margin: 0; color: var(--color-text-muted); font-size: 0.95rem; }

/* ---------- Agency CTA ---------- */
.cta-banner {
  background: var(--color-secondary);
  border-radius: var(--radius-lg);
  padding: 46px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 8px; font-size: 1.5rem; }
.cta-banner p { margin: 0; color: #c9d6e6; max-width: 480px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-secondary);
  color: #c9d6e6;
  padding: 50px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-grid h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; color: #c9d6e6; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #a9b9cf; font-size: 0.9rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #92a4bd;
}

/* ---------- Agency login / dashboard ---------- */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  background: linear-gradient(180deg, #fff1e6 0%, #fffaf4 60%);
}
.auth-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  padding: 40px 34px;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { color: var(--color-secondary); font-size: 1.5rem; margin: 10px 0 6px; }
.auth-card p.sub { color: var(--color-text-muted); margin: 0 0 26px; font-size: 0.95rem; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--color-secondary);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border);
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--color-text);
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.demo-hint {
  margin-top: 18px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.demo-hint code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: var(--color-secondary);
}

.auth-error {
  display: none;
  background: #ffe6e0;
  color: var(--color-primary-dark);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.auth-error.show { display: block; }

/* ---------- Dashboard ---------- */
.dash-wrap { display: none; padding: 40px 0 70px; }
.dash-wrap.show { display: block; }
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}
.dash-top h1 { margin: 0; color: var(--color-secondary); font-size: 1.5rem; }
.dash-top p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.92rem; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 26px;
  align-items: start;
}

.panel {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 26px;
}
.panel h2 { margin: 0 0 18px; font-size: 1.1rem; color: var(--color-secondary); }

.shipment-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.shipment-list li {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.shipment-list li:hover { border-color: var(--color-primary); background: var(--color-bg-alt); }
.shipment-list li.active { border-color: var(--color-primary); background: #fff1e6; }
.shipment-list .sl-code { font-weight: 800; color: var(--color-secondary); font-size: 0.95rem; }
.shipment-list .sl-meta { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 2px; }

.empty-note { color: var(--color-text-muted); font-size: 0.9rem; text-align: center; padding: 30px 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-secondary);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 260px; margin: 0 auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 720px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 480px) {
  .track-form { flex-direction: column; }
  .track-form input[type="text"] { width: 100%; }
  .track-form button { width: 100%; }
  .result-head { flex-direction: column; }
  .auth-card { padding: 30px 22px; }
}
