/* ORDERS — the order management centre of superi.ge.
   The same family as BUGALTERIA: a cool pale ground, white rounded blocks, navy ink
   and one strong blue; each status has its own quiet colour. No capitals transform
   anywhere: Georgian has none. The page uses the whole screen. */
/* FiraGO (bBox Type; SIL Open Font License — FiraGO-OFL.txt beside this file). */
@font-face { font-family: "FiraGO"; src: url("FiraGO-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("FiraGO-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("FiraGO-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "FiraGO"; src: url("FiraGO-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ground: #f2f5fb;
  --paper: #ffffff;
  --paper-soft: #f7f9fd;
  --line: #e3e8f2;
  --line-strong: #ccd5e5;
  --ink: #01143d;
  --ink-soft: #2c3b60;
  --muted: #66728f;
  --blue: #0050fb;
  --blue-deep: #0036c4;
  --blue-soft: #e5edff;
  --sky: #00a6f8;
  --ok: #17693f;
  --ok-soft: #e4f1e8;
  --warn: #855600;
  --warn-soft: #f9eed3;
  --bad: #ad241c;
  --bad-soft: #f9e6e4;
  /* the four statuses of the first section */
  --st-O: #0050fb;   /* ღია */
  --st-Y: #d97a00;   /* ელოდება ზარს */
  --st-P: #13854b;   /* გადახდილია */
  --st-E: #6a3fd8;   /* დამტკიცებული */
  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 10px;
  --pill: 999px;
  --gutter: 1.6rem;
  --shadow: 0 1px 2px rgba(1, 20, 61, .04), 0 8px 24px rgba(1, 20, 61, .05);
  font-size: 15px;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "FiraGO", "Noto Sans Georgian", "Segoe UI", "BPG Arial", system-ui, sans-serif;
  line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 1.4rem; }
h2 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; margin: 0; }
h3 { font-size: .92rem; font-weight: 600; margin: 0; }
p { margin: 0 0 1rem; }

/* --- top bar ------------------------------------------------------------------ */
.top {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.1rem var(--gutter) 0; padding: .45rem .55rem .45rem 1.1rem; min-height: 58px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--pill); box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: .55rem; flex: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand b { font-size: 1.22rem; font-weight: 700; letter-spacing: -.03em; }
.mark {
  display: inline-block; width: 26px; height: 26px; border-radius: 8px; flex: none;
  background:
    linear-gradient(var(--paper), var(--paper)) 7px 7px / 12px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 7px 12px / 12px 3px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 7px 17px / 7px 3px no-repeat,
    linear-gradient(135deg, var(--blue), var(--sky));
}
.shop { color: var(--muted); font-weight: 400; font-size: .8rem; padding-left: .65rem; margin-left: .15rem; border-left: 1px solid var(--line-strong); letter-spacing: .02em; }
.top nav { display: flex; align-items: center; gap: .1rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top nav a { white-space: nowrap; color: var(--ink-soft); padding: .46rem .8rem; font-size: .875rem; border-radius: var(--pill); }
.top nav a:hover { color: var(--ink); background: var(--ground); text-decoration: none; }
.top nav a.on { color: #fff; background: var(--blue); font-weight: 600; }
.logout { display: flex; align-items: center; gap: .7rem; flex: none; font-size: .86rem; margin: 0; }
.logout .who { color: var(--ink); }
.top .link { color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: var(--pill); padding: .42rem 1rem; font: inherit; cursor: pointer; }
.top .link:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }

.wrap { padding: 1.4rem var(--gutter) 4rem; }
.narrow { max-width: 420px; margin: 12vh auto 0; padding: 0 1rem; }

/* --- forms, cards, messages ----------------------------------------------------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 2.2rem 2rem 1.9rem; }
.small-card { max-width: 440px; }
h1.logo { display: flex; align-items: center; gap: .6rem; font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; margin-bottom: 1.6rem; }
h1.logo .mark { width: 34px; height: 34px; border-radius: 10px; background-size: auto; background:
    linear-gradient(var(--paper), var(--paper)) 9px 9px / 16px 4px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 9px 15px / 16px 4px no-repeat,
    linear-gradient(var(--paper), var(--paper)) 9px 21px / 9px 4px no-repeat,
    linear-gradient(135deg, var(--blue), var(--sky)); }
label { display: block; font-size: .84rem; color: var(--ink-soft); margin: 1rem 0 .35rem; }
input[type=text], input[type=password] {
  width: 100%; padding: .7rem .9rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
button { font: inherit; cursor: pointer; }
.actions { margin-top: 1.4rem; }
.actions button, .card button {
  width: 100%; padding: .75rem 1rem; color: #fff; background: var(--blue); border: 0; border-radius: var(--pill); font-weight: 600;
}
.actions button:hover { background: var(--blue-deep); }
.flash { padding: .75rem 1.15rem; border-radius: var(--r-md); margin: 0 0 1rem; font-size: .92rem; background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }

/* --- a section of the board ------------------------------------------------------ */
.sec {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 1.1rem 1.1rem 1.2rem; margin-bottom: 1.4rem;
}
.sec-head { display: flex; align-items: center; gap: 1rem; padding: .15rem .35rem .95rem; }
.sync { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--muted); padding: .28rem .8rem; border-radius: var(--pill); background: var(--paper-soft); border: 1px solid var(--line); }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.sync.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.sync.warn i { background: var(--warn); box-shadow: none; }
.sync.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }

.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; align-items: start; }
.col { --c: var(--blue); background: var(--ground); border-radius: var(--r-lg); padding: .7rem .6rem .6rem; min-width: 0; }
.st-O { --c: var(--st-O); }
.st-Y { --c: var(--st-Y); }
.st-P { --c: var(--st-P); }
.st-E { --c: var(--st-E); }
.col-head { display: flex; align-items: center; gap: .5rem; padding: .1rem .35rem .7rem; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.col-head h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head .n {
  min-width: 1.6rem; padding: 0 .5rem; line-height: 1.5rem; text-align: center; border-radius: var(--pill);
  background: var(--paper); color: var(--c); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.col-head .sum { margin-left: auto; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cards { display: flex; flex-direction: column; gap: .55rem; max-height: 74vh; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.empty { color: var(--muted); font-size: .86rem; text-align: center; padding: 1.6rem 0; margin: 0; }

/* --- an order card ------------------------------------------------------------- */
.order {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: .7rem .8rem .75rem .95rem; transition: box-shadow .15s, border-color .15s, opacity .2s;
}
.order::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.order:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(1, 20, 61, .07); }
.order.busy { opacity: .55; pointer-events: none; }
.order.moved { opacity: .35; }
.o-top { display: flex; align-items: baseline; gap: .55rem; }
.num { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.num:hover { color: var(--blue); }
.o-top time { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.o-top time span { margin-left: .4rem; padding: 0 .4rem; border-radius: var(--pill); background: var(--ground); font-size: .72rem; }
.o-sum { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.buyer { margin-top: .3rem; font-weight: 500; overflow-wrap: anywhere; }
.contact { display: flex; flex-wrap: wrap; gap: .2rem .7rem; font-size: .84rem; color: var(--ink-soft); }
.contact a { color: var(--blue); font-variant-numeric: tabular-nums; }
.items { list-style: none; margin: .45rem 0 0; padding: .45rem 0 0; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--ink-soft); }
.items li { display: flex; gap: .4rem; }
.items li + li { margin-top: .15rem; }
.items .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .q { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.items .more { color: var(--muted); }
.cnote { margin: .45rem 0 0; padding: .45rem .6rem; font-size: .8rem; color: var(--warn); background: var(--warn-soft); border-radius: 8px; overflow-wrap: anywhere; }
.o-top .ago { padding: 0 .4rem; border-radius: var(--pill); background: var(--ground); color: var(--muted); font-size: .72rem; white-space: nowrap; }
.o-foot { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; }
.pay { flex: 1; min-width: 0; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-btn {
  flex: none; display: inline-flex; align-items: center; gap: .45rem; max-width: 62%;
  padding: .34rem .75rem .34rem .85rem; font-size: .8rem; font-weight: 600; color: var(--c);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--pill);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-btn::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .7;
}
.st-btn:hover, .menu-open .st-btn { border-color: var(--c); background: var(--paper-soft); }
.menu-open { border-color: var(--c); box-shadow: 0 6px 18px rgba(1, 20, 61, .08); }

/* --- the status menu (one for the whole page) ----------------------------------------- */
.st-menu {
  position: fixed; z-index: 40; max-height: min(70vh, 560px); overflow-y: auto; padding: .4rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 18px 44px rgba(1, 20, 61, .18);
}
.st-menu .sep { height: 1px; margin: .35rem .5rem; background: var(--line); }
.st-item {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .48rem .7rem; text-align: left;
  font-size: .86rem; color: var(--ink-soft); background: none; border: 0; border-radius: var(--r-md);
}
.st-item i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.st-item.main { color: var(--ink); font-weight: 500; }
.st-item.main i { background: var(--c); }
.st-item:hover { background: var(--ground); }
.st-item.now { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.st-item.loud::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

/* --- a short message at the bottom ---------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 50;
  padding: .7rem 1.2rem; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: .9rem;
  box-shadow: 0 12px 30px rgba(1, 20, 61, .25); max-width: min(92vw, 640px);
}
.toast.error { background: var(--bad); }

@media (max-width: 1250px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  :root { --gutter: .7rem; }
  .cols { grid-template-columns: 1fr; }
  .shop { display: none; }
  .cards { max-height: none; }
}
