/* ============================================================
   LAPIN HOUSE — Deliveries Portal
   Παλέτα: Lapin red #C8102E · ink #211D1C · paper #FBF9F6
   Display: Literata · Body: Inter
   ============================================================ */
:root {
  --red: #C8102E;
  --red-dark: #9E0C24;
  --ink: #211D1C;
  --paper: #FBF9F6;
  --card: #FFFFFF;
  --line: #E9E3DA;
  --muted: #8B837A;
  --ok: #2E6E4C;
  --ok-bg: #E8F2EC;
  --late: #A8541B;
  --late-bg: #F8ECE2;
  --soft-bg: #F3EFE9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(33,29,28,.05), 0 6px 20px -12px rgba(33,29,28,.18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
}
h1, h2 { font-family: 'Literata', Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.thin { font-weight: 400; color: var(--muted); }
a { color: var(--red-dark); }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 28px;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 0 24px; height: 60px; position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.brand-mark {
  background: var(--red); color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: .08em; padding: 2px 8px; display: inline-block; width: max-content;
}
.brand-mark.big { font-size: 18px; padding: 4px 12px; }
.brand-sub { font-family: 'Literata', serif; font-style: italic; font-size: 12px; color: var(--muted); margin-top: 2px; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 8px;
  font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--soft-bg); }
.nav a.on { background: var(--ink); color: #fff; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.uname { font-weight: 600; font-size: 14px; }
.urole { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }

/* ---- Κουμπιά ---- */
.btn {
  display: inline-block; border: 1px solid var(--ink); background: var(--card); color: var(--ink);
  padding: 9px 18px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: transform .06s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.danger { border-color: var(--red); color: var(--red); background: #fff; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.full { width: 100%; }
.mini {
  border: none; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer;
  text-decoration: underline; padding: 0; font-family: inherit;
}
.mini.danger { color: var(--red); }
.mini-input { width: 120px; font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* ---- Page head / filters ---- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin: 0; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 14px; flex-wrap: wrap; }
.filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 20px;
}
.filters select, .filters input[type=search] {
  font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff;
}
.sorters { font-size: 13px; color: var(--muted); margin-left: auto; }
.sortlink { color: var(--muted); text-decoration: none; }
.sortlink.on { color: var(--red-dark); font-weight: 600; }
.rescount { margin-left: auto; color: var(--muted); font-size: 13px; }

/* ---- Κάρτες drop + timeline (signature) ---- */
.drop-list { display: flex; flex-direction: column; gap: 14px; }
.drop-card {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
}
.drop-card:hover { border-color: var(--ink); border-left-color: var(--red); }
.drop-id { display: flex; flex-direction: column; gap: 2px; }
.drop-no { font-family: 'Literata', serif; font-size: 20px; font-weight: 600; }
.drop-season { font-size: 12.5px; color: var(--muted); }
.drop-title { font-size: 13px; margin-top: 4px; }

.timeline { display: flex; align-items: center; gap: 0; min-width: 0; }
.timeline.lg { padding: 6px 0 2px; }
.tstep { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 92px; }
.timeline.lg .tstep { min-width: 150px; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--muted); background: #fff;
}
.tstep.done .dot { background: var(--red); border-color: var(--red); }
.tlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tstep.done .tlabel { color: var(--ink); }
.tdate { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tline { flex: 1; height: 2px; background: var(--line); margin: 0 6px 34px; min-width: 24px; }
.tline.done { background: var(--red); }

.drop-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.drop-meta .count { font-size: 13px; color: var(--muted); }
.drop-meta .upd { font-size: 11.5px; color: var(--muted); }

/* ---- Badges ---- */
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px;
  border-radius: 99px; letter-spacing: .02em;
}
.badge.st-expected    { background: var(--soft-bg); color: var(--muted); }
.badge.st-imported    { background: #EEF0F6; color: #3D4A6B; }
.badge.st-warehouse   { background: #F6EFE4; color: #7A5A1E; }
.badge.st-distributed { background: var(--ok-bg); color: var(--ok); }
.badge.ok   { background: var(--ok-bg); color: var(--ok); }
.badge.late { background: var(--late-bg); color: var(--late); }
.badge.soft { background: var(--soft-bg); color: var(--muted); }

/* ---- Κάρτες / φόρμες ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus, .filters :focus, .login-card input:focus {
  outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red);
}
.form small { font-weight: 400; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select { font: inherit; font-size: 13.5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; max-width: 340px; }
.inline { display: inline; }
.notes { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.fineprint { color: var(--muted); font-size: 12.5px; }
.thumb { height: 60px; border-radius: 6px; vertical-align: middle; border: 1px solid var(--line); }

/* ---- Grid κωδικών (lookbook view) ---- */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.style-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.ph { position: relative; aspect-ratio: 4/5; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.ph img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.ph:has(.noimg) { background: var(--soft-bg); border-bottom: none; }
.noimg { color: var(--muted); font-size: 12.5px; font-style: italic; font-family: 'Literata', serif; }
.attr {
  position: absolute; top: 8px; left: 8px; background: var(--ink); color: #fff;
  font-size: 10.5px; padding: 2px 8px; border-radius: 99px; letter-spacing: .04em;
}
.sc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.code { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.sc-body .meta { font-size: 12.5px; color: var(--muted); }
.sc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.sc-actions { display: flex; gap: 12px; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ---- Πίνακες ---- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); }
.table tr.inactive td { opacity: .5; }
.row-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---- Alerts / empty ---- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert.error { background: #FBEAEA; color: var(--red-dark); border: 1px solid #F0C9C9; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #CBE2D4; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---- Login ---- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(160deg, rgba(200,16,46,.05), transparent 45%),
    var(--paper);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 36px; box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
}
.login-brand { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 14px; }
.login-lede { font-family: 'Literata', serif; font-style: italic; color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.login-card input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .userbox { width: 100%; }
  .wrap { padding: 20px 16px 48px; }
  .drop-card { grid-template-columns: 1fr; gap: 14px; }
  .drop-meta { flex-direction: row; align-items: center; }
  .grid3 { grid-template-columns: 1fr; }
  .timeline { overflow-x: auto; padding-bottom: 4px; }
  .sorters { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Επιλογή καταστημάτων στη μάσκα drop ---- */
.storeset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.storeset legend { font-weight: 600; font-size: 13.5px; padding: 0 6px; }
.storeset legend small { font-weight: 400; color: var(--muted); }
.storegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; font-size: 14px; margin: 0 !important; flex-direction: row !important; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }

/* ---- Drop που δεν αφορά το κατάστημα του χρήστη ---- */
.drop-card.dim { opacity: .55; border-left-color: var(--line); }
.drop-card.dim:hover { opacity: 1; }

/* ---- Chips καταστημάτων στο drop ---- */
.storechips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.chips-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px;
  border-radius: 99px; background: var(--soft-bg); color: var(--ink);
  border: 1px solid var(--line);
}
.chip.all { background: var(--ok-bg); color: var(--ok); border-color: transparent; }