/* Greek Legend — клиентский портал. Оливково-средиземноморская палитра,
   в стиле бренда greekelegend.ru / дашборда Greek Legend. */

:root {
  --bg: #faf6ed;          /* тёплая кремовая основа, как этикетка */
  --card: #ffffff;
  --text: #1f2410;        /* почти-чёрный с оливковым оттенком */
  --muted: #7a7a6e;
  --border: #e9e2cf;      /* пшеничная окантовка */
  --accent: #556b2f;      /* классический Olive */
  --accent-hover: #455824;
  --accent-bg: #eef2e3;
  --gold: #b8860b;        /* «масло» — золотисто-янтарный */
  --shadow: 0 1px 3px rgba(40, 50, 20, 0.05), 0 1px 2px rgba(40, 50, 20, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.muted { color: var(--muted); }

/* ───────────────── login ───────────────── */

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-visual {
  position: relative;
  background: #0a0a0a;
}
.login-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.login-visual .veil {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(15,20,10,0.55) 0%, rgba(15,20,10,0.15) 55%, rgba(15,20,10,0.5) 100%);
}
.login-visual .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 44px;
  color: #fffbe6;
}
.login-visual .caption .eyebrow {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #d4b97c; font-weight: 600; margin-bottom: 8px;
}
.login-visual .caption h2 {
  margin: 0; font-size: 26px; font-weight: 700; letter-spacing: 0.01em;
  max-width: 380px; line-height: 1.2;
}

.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 56px;
}
.login-card { width: 100%; max-width: 360px; margin: 0 auto; }
.login-card .logo { height: 22px; margin-bottom: 28px; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: 0.01em; }
.login-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 28px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 18px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-hover); }

.error {
  background: #fbeaea; border: 1px solid #ecc9c9; color: #a14242;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
}

.login-foot { margin-top: 26px; font-size: 12px; color: var(--muted); }
.login-foot a { color: var(--muted); text-decoration: underline; }

@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { min-height: 220px; }
  .login-panel { padding: 36px 24px; }
}

/* ───────────────── topbar ───────────────── */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar::before {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 50%, var(--accent) 100%);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar .brand { display: flex; align-items: center; gap: 14px; }
.topbar .brand img { height: 20px; }
.topbar .brand .tag {
  font-size: 12px; color: var(--muted);
  padding-left: 14px; border-left: 1px solid var(--border);
}
.topbar .logout { font-size: 13px; color: var(--muted); }
.topbar .logout:hover { color: var(--text); }

/* ───────────────── hero ───────────────── */

main { max-width: 1100px; margin: 0 auto; padding: 24px 24px 64px; }

.hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #0a0a0a; box-shadow: var(--shadow);
  height: 240px; margin-bottom: 28px;
}
.hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; }
.hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,20,10,0.78) 0%, rgba(15,20,10,0.4) 50%, rgba(15,20,10,0) 80%);
  display: flex; align-items: center; padding: 28px 36px;
}
.hero .overlay .eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #d4b97c; font-weight: 600; margin-bottom: 8px;
}
.hero .overlay h1 {
  color: #fffbe6; margin: 0 0 8px; font-size: 26px; font-weight: 700;
  max-width: 520px; line-height: 1.2;
}
.hero .overlay p { color: rgba(255,251,230,0.82); margin: 0; max-width: 440px; font-size: 14px; }

/* ───────────────── sections ───────────────── */

.section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; margin: 0; letter-spacing: 0.01em; }
.section-head .count {
  font-size: 12px; color: var(--accent);
  background: var(--accent-bg); padding: 2px 9px; border-radius: 20px; font-weight: 600;
}

/* галерея изображений */
.gallery {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.tile {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(40,50,20,0.10); }
.tile .thumb {
  aspect-ratio: 4 / 3; background: #f3efe2;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .meta { padding: 12px 14px; }
.tile .meta .t { font-size: 14px; font-weight: 600; }
.tile .meta .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* документы */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.1s;
}
.doc:hover { border-color: var(--accent); transform: translateX(2px); }
.doc .badge {
  flex: none; width: 46px; height: 46px; border-radius: 10px;
  background: var(--accent-bg); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.doc .info { flex: 1 1 auto; min-width: 0; }
.doc .info .t { font-size: 15px; font-weight: 600; color: var(--text); }
.doc .info .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.doc .dl { flex: none; color: var(--muted); font-size: 13px; }

.empty {
  background: var(--card); border: 1px dashed var(--border);
  border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted);
}

footer.site {
  max-width: 1100px; margin: 0 auto; padding: 24px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

@media (max-width: 560px) {
  .hero { height: 200px; }
  .hero .overlay { padding: 18px 18px; }
  .hero .overlay h1 { font-size: 20px; }
}

/* ───────────────── nav ───────────────── */
.topnav { display: flex; align-items: center; gap: 16px; }
.topbar .brand a { display: flex; }
.topnav a { font-size: 14px; color: var(--muted); }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--accent); font-weight: 600; }

/* промо-карточка календаря на главной портала */
.cal-promo {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, var(--accent-bg), #fff);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 28px; box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.15s;
}
.cal-promo:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(40,50,20,0.10); }
.cal-promo-ico { font-size: 26px; flex: none; }
.cal-promo-txt { flex: 1 1 auto; min-width: 0; }
.cal-promo-txt .t { font-size: 16px; font-weight: 700; color: var(--text); }
.cal-promo-txt .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cal-promo-go { flex: none; color: var(--accent); font-weight: 600; font-size: 14px; }

/* ───────────────── calendar ───────────────── */
.cal-head { margin-bottom: 18px; }
.cal-h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: 0.01em; }

/* теги-чипы */
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--accent-bg); color: var(--accent); white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.t-plan  { background: #eef2e3; color: #556b2f; }
.t-oz    { background: #e3eef9; color: #2f6fb0; }
.t-wb    { background: #efe9fb; color: #7a4fc0; }
.t-ym    { background: #fcecdb; color: #c2772b; }

/* месячные сетки */
.months { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 32px; }
.month { padding: 16px 16px 10px; }
.month-title { font-size: 15px; margin: 0 0 12px; letter-spacing: 0.02em; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-grid th {
  font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; padding: 0 0 8px; text-align: center;
}
.cal-grid td { padding: 2px; vertical-align: top; }
.cell {
  height: 46px; border-radius: 9px; border: 1px solid transparent;
  background: #faf8f1; position: relative;
}
.cell.out { background: transparent; }
.cell.out .dnum { color: #cfc8b6; }
.cell .dnum { display: block; font-size: 12.5px; text-align: right; padding: 5px 7px 0; color: var(--muted); }
.cell.today { border-color: var(--accent); }
.cell.today .dnum { color: var(--accent); font-weight: 700; }
.cell.has { background: #fff; border-color: var(--border); }
.cell.has .dnum { color: var(--text); font-weight: 600; }
.cell.has.past { opacity: 0.55; }
.celllink { display: block; height: 100%; text-decoration: none; }
.dots { position: absolute; left: 6px; bottom: 5px; display: flex; gap: 3px; flex-wrap: wrap; max-width: 80%; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.dot.t-plan { background: #556b2f; } .dot.t-oz { background: #2f6fb0; }
.dot.t-wb { background: #7a4fc0; } .dot.t-ym { background: #c2772b; }

/* agenda */
.agenda { display: flex; flex-direction: column; gap: 10px; }
.ag-item {
  display: flex; gap: 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
}
.ag-item.today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.ag-item.past { opacity: 0.62; }
.ag-date { flex: none; width: 56px; text-align: center; }
.ag-date .ag-d { display: block; font-size: 24px; font-weight: 700; line-height: 1; color: var(--accent); }
.ag-date .ag-m { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.03em; }
.ag-body { flex: 1 1 auto; min-width: 0; }
.ag-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ag-plan {
  display: inline-block; font-size: 13px; font-weight: 600; color: #455824;
  background: #eef2e3; border: 1px solid #d6e0c2; border-radius: 8px;
  padding: 5px 11px; margin-bottom: 10px;
}

/* строка заявки-поставки */
.ag-order { display: flex; align-items: baseline; gap: 9px; padding: 5px 0; border-top: 1px solid var(--border); }
.ag-order:first-of-type { border-top: none; }
.ag-order.cancelled { opacity: 0.5; }
.ag-order.cancelled .o-main b { text-decoration: line-through; }
.o-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); }
.o-dot.t-oz { background: #2f6fb0; } .o-dot.t-wb { background: #7a4fc0; }
.o-dot.t-ym { background: #c2772b; } .o-dot.t-plan { background: #556b2f; }
.o-main { font-size: 14px; line-height: 1.55; }
.o-main b { font-weight: 600; }
.o-wh { color: var(--muted); }
.o-wh::before { content: "· "; }
.o-clusters { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.o-cl {
  font-size: 11.5px; padding: 1px 8px; border-radius: 6px;
  background: #f3efe2; color: #6b6452; white-space: nowrap;
}
.o-cl.cx { text-decoration: line-through; opacity: 0.55; }

/* бейдж статуса */
.stbadge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px;
  border-radius: 20px; margin-left: 6px; vertical-align: 1px; white-space: nowrap;
}
.st-plan    { background: #eef2e3; color: #556b2f; }
.st-planned { background: #e8eef4; color: #4a6585; }
.st-fill    { background: #fbf1dd; color: #9c7012; }
.st-accept  { background: #e0f0eb; color: #2f7d68; }
.st-cancel  { background: #f1e9e9; color: #9a6a6a; }

.ag-lines { margin: 6px 0 0; padding-left: 18px; }
.ag-lines li { font-size: 13.5px; color: var(--text); line-height: 1.5; margin: 1px 0; }

.past-wrap { margin-top: 24px; }
.past-wrap summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 0; }
.past-wrap summary:hover { color: var(--text); }
.past-wrap[open] summary { margin-bottom: 12px; }

@media (max-width: 560px) {
  .ag-date { width: 46px; }
  .ag-date .ag-d { font-size: 20px; }
  .cell { height: 42px; }
}
