/* BuildConnect */

:root {
  --ink:        #101820;
  --ink-2:      #18222D;
  --ink-3:      #22303E;
  --paper:      #EEF1F3;
  --surface:    #FFFFFF;
  --rule:       #D2DAE0;
  --rule-soft:  #E7ECEF;
  --muted:      #62717E;
  --faint:      #94A3AE;
  --blue:       #14568B;
  --blue-lift:  #2C7CBD;
  --blue-wash:  #E6EFF7;
  --red:        #BE2F27;
  --red-wash:   #FBEBEA;
  --green:      #256D4E;
  --green-wash: #E4F1EA;
  --amber:      #8A5D06;
  --amber-wash: #FAEFDA;

  --sidebar-w: 232px;
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
button { font-family: inherit; }

/* ============ ΚΕΛΥΦΟΣ ============ */
.shell { display: flex; min-height: 100vh; }

.side {
  width: var(--sidebar-w);
  flex: none;
  background: var(--ink);
  color: #C7D3DD;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side__brand {
  padding: 20px 20px 18px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-3);
}
.side__brand i { font-style: normal; color: var(--blue-lift); }

.side__nav { padding: 14px 0; flex: 1; overflow-y: auto; }
.side__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #61707D;
  padding: 14px 20px 6px;
}
.side__link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 20px;
  color: #C7D3DD;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 2px solid transparent;
}
.side__link:hover { background: var(--ink-2); color: #fff; }
.side__link[aria-current="page"] {
  background: var(--ink-2);
  border-left-color: var(--blue-lift);
  color: #fff;
  font-weight: 600;
}
.side__link .tick {
  margin-left: auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}

.side__foot {
  border-top: 1px solid var(--ink-3);
  padding: 14px 20px;
  font-size: 12.5px;
}
.side__foot b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.side__foot span { color: #61707D; }
.side__foot button {
  margin-top: 8px; background: none; border: 0; padding: 0;
  color: #8A99A6; font-size: 12.5px; cursor: pointer; text-decoration: underline;
}
.side__foot button:hover { color: #fff; }

.main { flex: 1; min-width: 0; }

/* ============ ΚΕΦΑΛΙΔΑ ΣΕΛΙΔΑΣ ============ */
.head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 18px 28px 0;
  position: sticky; top: 0; z-index: 20;
}
.head__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.022em;
}
.head .code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--blue);
  background: var(--blue-wash);
  padding: 2px 7px;
}
.head__spacer { flex: 1; }
.head__sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }

.tabs { display: flex; gap: 22px; margin-top: 14px; }
.tabs a {
  padding: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); }

.body { padding: 24px 28px 72px; }

/* ============ ΚΑΡΤΕΣ ΕΡΓΩΝ ============ */
.rows { display: flex; flex-direction: column; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.row-item {
  display: block; background: var(--surface); padding: 14px 18px;
  text-decoration: none; color: inherit;
}
.row-item:hover { background: var(--blue-wash); }
.row-item__top { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.row-item__title { font-weight: 650; font-size: 15px; letter-spacing: -0.012em; }
.row-item__meta {
  margin-top: 5px; font-size: 12.5px; color: var(--muted);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.row-item__meta b { font-weight: 600; color: var(--ink); }
.bar { height: 3px; background: var(--rule-soft); margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--blue); }

/* ============ ΣΗΜΑΤΑ ============ */
.tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em; padding: 2px 8px; white-space: nowrap;
  border: 1px solid currentColor;
}
.tag--info { color: var(--blue); background: var(--blue-wash); }
.tag--ok { color: var(--green); background: var(--green-wash); }
.tag--warn { color: var(--amber); background: var(--amber-wash); }
.tag--alert { color: var(--red); background: var(--red-wash); }
.tag--muted { color: var(--muted); background: var(--rule-soft); }

/* ============ ΠΙΝΑΚΕΣ ============ */
.panel { border: 1px solid var(--rule); background: var(--surface); }
.panel + .panel { margin-top: 20px; }
.panel__head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--rule);
  background: #FAFCFD;
}
.panel__head h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.panel__head .n { font-size: 12px; color: var(--muted); }
.panel__head .sp { flex: 1; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 8px 14px; border-bottom: 1px solid var(--rule);
  background: #FAFCFD; white-space: nowrap; position: sticky; top: 0;
}
tbody td { padding: 9px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFCFD; }
td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
th.num { text-align: right; }
.dim { color: var(--muted); }
.nil { color: var(--faint); }
.nil::before { content: "·"; }

/* ============ ΣΤΟΙΧΕΙΑ ============ */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.facts > div { padding: 12px 16px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.facts dt {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.facts dd { margin: 0; font-size: 14px; }

/* ============ ΣΥΝΟΨΗ ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stats > div { padding: 13px 16px; border-right: 1px solid var(--rule-soft); }
.stats > div:last-child { border-right: 0; }
.stats dt {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.stats dd {
  margin: 0; font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.025em;
}
.stats dd.over { color: var(--red); }
.stats dd.under { color: var(--green); }

/* ============ ΕΡΓΑΛΕΙΟΘΗΚΗ ============ */
.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--rule); background: #FAFCFD;
}
.search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.search input { width: 100%; padding-left: 30px; }
.search::before {
  content: "⌕"; position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--faint); font-size: 15px;
}

input[type=text], input[type=url], input[type=number], input[type=email],
input[type=password], input[type=search], input[type=file], select, textarea {
  font: inherit; font-size: 13.5px; padding: 6px 10px;
  border: 1px solid var(--rule); background: var(--surface);
  color: var(--ink); border-radius: 0; width: 100%;
}
select { padding-right: 26px; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue); outline-offset: -2px; border-color: var(--blue);
}
textarea { resize: vertical; min-height: 60px; }
.w-auto { width: auto; }

/* ============ ΚΟΥΜΠΙΑ ============ */
.btn {
  font-size: 13px; font-weight: 650; cursor: pointer;
  padding: 7px 14px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; border-radius: 0; white-space: nowrap;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }
.btn:focus-visible { outline: 2px solid var(--blue-lift); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: var(--blue-wash); border-color: var(--blue); color: var(--blue); }
.btn--sm { padding: 4px 9px; font-size: 12px; }
.btn--ok { color: var(--green); border-color: var(--green); background: var(--surface); }
.btn--ok:hover { background: var(--green); border-color: var(--green); color: #fff; }
.btn--no { color: var(--red); border-color: var(--red); background: var(--surface); }
.btn--no:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn--wide { width: 100%; justify-content: center; }
.acts { display: flex; gap: 5px; flex-wrap: nowrap; }

/* ============ INLINE ΕΠΕΞΕΡΓΑΣΙΑ ============ */
.cell-edit {
  display: inline-block; min-width: 62px; padding: 3px 6px;
  border: 1px solid transparent; cursor: text;
  font-variant-numeric: tabular-nums; text-align: right;
}
.cell-edit:hover { border-color: var(--rule); background: #fff; }
.cell-edit:hover::after { content: "✎"; color: var(--faint); margin-left: 5px; font-size: 11px; }
.cell-input {
  width: 84px; padding: 3px 6px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============ ΕΙΚΟΝΕΣ ============ */
.thumb { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--rule); display: block; }
.thumb--none {
  width: 42px; height: 42px; border: 1px dashed var(--rule);
  display: grid; place-items: center; color: var(--faint); font-size: 15px;
}

.item-name { font-weight: 600; }
.item-note { color: var(--muted); font-size: 12px; margin-top: 1px; }
.item-note--bad { color: var(--red); }
.chip-alt {
  font-size: 10.5px; font-weight: 700; color: var(--blue);
  background: var(--blue-wash); padding: 1px 5px; margin-left: 5px;
}

/* ============ SLIDE-OVER ============ */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(16,24,32,.5); z-index: 60;
}
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--surface); z-index: 61; display: flex; flex-direction: column;
  box-shadow: -2px 0 20px rgba(16,24,32,.2);
  animation: slidein .16s ease-out;
}
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
.sheet__head {
  display: flex; align-items: center; padding: 15px 20px;
  border-bottom: 1px solid var(--rule);
}
.sheet__head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.sheet__head button {
  margin-left: auto; background: none; border: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--muted); padding: 0 4px;
}
.sheet__head button:hover { color: var(--ink); }
.sheet__body { padding: 20px; overflow-y: auto; flex: 1; }
.sheet__foot { padding: 14px 20px; border-top: 1px solid var(--rule); display: flex; gap: 8px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.fields .f--full { grid-column: 1 / -1; }
label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.tip { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.bad { font-size: 11.5px; color: var(--red); margin-top: 3px; }

/* ============ ΕΙΔΟΠΟΙΗΣΕΙΣ ============ */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px;
  font-size: 13.5px; z-index: 80; box-shadow: 0 4px 18px rgba(16,24,32,.3);
  animation: rise .18s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast--bad { background: var(--red); }

/* ============ ΚΕΝΟ ============ */
.void { padding: 46px 24px; text-align: center; color: var(--muted); }
.void b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ============ ΣΥΝΔΕΣΗ ============ */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--ink); }
.gate__box { width: 100%; max-width: 360px; background: var(--surface); padding: 30px 28px; }
.gate__box h1 { margin: 0 0 3px; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.gate__box h1 i { font-style: normal; color: var(--blue); }
.gate__box p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.gate .f { margin-bottom: 14px; }
.alert {
  border-left: 3px solid var(--red); background: var(--red-wash);
  color: var(--red); padding: 9px 13px; font-size: 13px; margin-bottom: 16px;
}
.alert ul { margin: 0; padding-left: 17px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 18px; }
.check input { width: auto; }
.check label { margin: 0; font-weight: 400; }

/* ============ ΦΟΡΤΩΣΗ ============ */
[wire\:loading] { opacity: .55; }
.spin { display: inline-block; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .side__nav { display: flex; padding: 0; flex: 1; }
  .side__label { display: none; }
  .side__link { border-left: 0; border-bottom: 2px solid transparent; }
  .side__link[aria-current="page"] { border-left: 0; border-bottom-color: var(--blue-lift); }
  .side__foot { border-top: 0; }
  .head, .body { padding-left: 16px; padding-right: 16px; }
  .fields { grid-template-columns: 1fr; }
}
