/* Measurements taken from the reference orders page: 14px Open Sans, #444 text,
   #2f3e4f navbar, white bordered rows, 12.6px secondary text, #337ab7 links. */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; flex-direction: column;
  font: 14px/20px "Open Sans", "Segoe UI", sans-serif; color: #444; background: #ecf0f5;
}
button, input, select { font-family: inherit; }

/* ---------- navbar ---------- */
.navbar { display: flex; align-items: stretch; height: 50px; background: #2f3e4f; color: #fff; }
.brand { display: flex; align-items: center; padding: 0 22px 0 8px; font-size: 27px; font-weight: 500; letter-spacing: -0.5px; color: #fff; text-decoration: none; }
.nav-tab { display: flex; align-items: center; padding: 15px; color: #fff; text-decoration: none; cursor: default; }
.nav-tab--sales { background: #c7702a; min-width: 78px; justify-content: center; }
.caret { font-size: 10px; margin-left: 4px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 18px; font-size: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a96a3; }
.live-dot.on { background: #5cb85c; box-shadow: 0 0 0 3px rgba(92,184,92,.25); }
.live-dot.err { background: #d9534f; }

.error-bar { background: #f2dede; color: #a94442; border-bottom: 1px solid #ebccd1; padding: 8px 21px; font-size: 13px; }

/* ---------- content ---------- */
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 15px 21px 0; }

.filters {
  background: #fff; border: 1px solid #d2d6de; border-radius: 5px; padding: 12px 14px 10px;
}
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 13px; }
.filter-row--small { gap: 10px; margin-bottom: 8px; }
.f-input {
  width: 269px; height: 36px; padding: 8.4px 11.2px; font-size: 12.6px; line-height: 12.6px; color: #000;
  background: #fff; border: 1px solid #bfccd9; border-radius: 5.6px; outline: none;
}
.f-input::placeholder { color: #757575; }
.f-input:focus { border-color: #66afe9; box-shadow: 0 0 0 1px #66afe9; }
.f-label { font-size: 14px; color: #444; white-space: nowrap; margin-right: -4px; }

/* react-select look: text, a thin separator, then a chevron */
.f-select { position: relative; width: 171px; height: 36px; }
.f-select select {
  appearance: none; width: 100%; height: 100%; padding: 0 44px 0 10px; font-size: 12.6px; color: #444; text-align: left; text-align-last: left;
  background: #fff; border: 1px solid #ccc; border-radius: 4px; outline: none; cursor: pointer;
}
.f-select select:invalid, .f-select select.empty { color: #808080; }
.f-select::before { content: ""; position: absolute; right: 36px; top: 8px; bottom: 8px; width: 1px; background: #ccc; pointer-events: none; }
.f-select::after {
  content: ""; position: absolute; right: 13px; top: 13px; width: 7px; height: 7px; pointer-events: none;
  border-right: 1.5px solid #b3b3b3; border-bottom: 1.5px solid #b3b3b3; transform: rotate(45deg);
}

.f-range {
  display: flex; align-items: center; height: 36px; width: 233px; padding: 0 6px;
  border: 1px solid #bfccd9; border-radius: 2px; background: #fff;
}
.f-range input { width: 92px; padding: 0 4px; border: 0; outline: none; font-size: 12.6px; color: #484848; background: transparent; cursor: pointer; }
.f-range input::placeholder { color: #757575; }
.f-range input::-webkit-calendar-picker-indicator { display: none; }
.f-range .arrow { color: #82888a; font-size: 18px; padding: 0 6px; }

.s-select { height: 24px; font-size: 13px; color: #000; border: 1px solid #767676; border-radius: 3px; background: #fff; padding: 0 2px; }
#fSort { width: 104px; }
#fResult, #fTags { min-width: 36px; }

.pill {
  height: 28px; padding: 4px 9px; font-size: 12.6px; background: transparent; border-radius: 11.2px; cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.pill--red { color: #bc3e2f; border: 1px solid #bc3e2f; }
.pill--green { color: #008000; border: 1px solid #008000; margin-left: -6px; }
.pill:hover { filter: brightness(.85); }

.filters hr { border: 0; border-top: 1px solid #ddd; margin: 4px 0 8px; }
.quick {
  height: 28px; padding: 4px 9px; font-size: 12.6px; color: #427fed; background: #fff;
  border: 1px solid #427fed; border-radius: 2px; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.quick.active { background: #427fed; color: #fff; }

/* ---------- actions bar ---------- */
.actions { display: flex; align-items: center; gap: 16px; padding: 16px 0 10px; }
.select-all { display: flex; align-items: center; gap: 5px; font-size: 12.6px; cursor: pointer; }
.callout {
  padding: 8px; font-size: 12.6px; font-weight: 600; color: #444;
  background: #faebd7; border: 1px solid #deb887;
}
.callout b { color: #337ab7; }
.callout .pos { color: #2e8b3e; }
.callout .neg { color: #c9302c; }
.today-btn { cursor: pointer; color: #337ab7; margin-left: -6px; }
.today-btn:hover { background: #f7dfbf; }
.today-open { display: flex; align-items: center; gap: 4px; margin-left: -6px; }
.today-x { margin-left: 8px; padding: 0 4px; border: 0; background: none; color: #8a6d3b; font-size: 13px; line-height: 1; cursor: pointer; }
.today-x:hover { color: #c9302c; }
.actions-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sel-count { font-size: 12.6px; text-transform: uppercase; }
.btn-primary {
  height: 33px; padding: 6px 12px; font-size: 13px; color: #fff; background: #427fed;
  border: 1px solid #427fed; border-radius: 2px; cursor: pointer;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-clear { border: 0; background: none; color: #999; font-size: 12.6px; cursor: pointer; padding: 0 0 0 10px; }

/* ---------- table ---------- */
.table { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.table::-webkit-scrollbar { width: 10px; }
.table::-webkit-scrollbar-thumb { background: #c1c1c1; }
.table::-webkit-scrollbar-track { background: #f1f1f1; }

.order {
  position: relative; display: flex; align-items: center; min-height: 86px; margin-bottom: 11px; padding: 4px;
  background: #fff; border: 1px solid rgba(0,0,0,.2); cursor: pointer;
}
.order.selected { border-color: #427fed; box-shadow: inset 0 0 0 1px #427fed; }
.order.fresh { animation: flash 3s ease-out; }
@keyframes flash { from { background: #fff7d6; } to { background: #fff; } }
.corner { position: absolute; top: 0; left: 0; width: 0; height: 0; border-top: 22px solid #427fed; border-right: 22px solid transparent; display: none; }
.corner svg { position: absolute; top: -20px; left: 2px; width: 9px; fill: #fff; }
.order.selected .corner { display: block; }

.td { padding: 7px 5px; }
.td--status { width: 200px; flex: none; padding: 7px 14px 7px 5px; border-right: 1px solid rgba(0,0,0,.05); }
.td--event { flex: 1; min-width: 0; }
.td--stock { width: 120px; flex: none; text-align: center; font-size: 12.6px; }
.td--section { width: 225px; flex: none; font-size: 12.6px; line-height: 18px; border-left: 1px solid rgba(0,0,0,.05); padding-left: 14px; }
.td--money { width: 190px; flex: none; font-size: 12.6px; line-height: 18px; }
.td--total { width: 115px; flex: none; text-align: right; padding-right: 15px; border-left: 1px solid rgba(0,0,0,.05); }
.td--created { width: 190px; flex: none; font-size: 12.6px; line-height: 18px; }

.id-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mkt {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: -.2px;
}
.mkt--logo { background: #fff; border: 1px solid #e1e4e8; }
.mkt-img { width: 18px; height: 18px; border-radius: 3px; display: block; }
.order-id { font: 11.9px monaco, Consolas, "Lucida Console", monospace; color: #337ab7; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: 180px; height: 26px; padding: 6px 6px 4px;
  font-size: 12px; font-weight: 500; color: #fff; border-radius: 2px;
}
.label svg { width: 12px; height: 12px; fill: #fff; margin-top: -2px; }
.label--success { background: #5cb85c; }
.label--warning { background: #f0ad4e; }
.label--danger { background: #d9534f; }

.event-name { font-size: 18.2px; font-weight: 700; line-height: 26px; color: #337ab7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12.6px; }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.event-meta svg { height: 13px; width: auto; }
.ic-cal { fill: #444; }
.ic-pin { fill: #c34b3d; }
.ic-ticket { width: 24px; height: 20px; fill: #444; display: block; margin: 0 auto 4px; }
.stock-name { display: block; line-height: 16px; }

.total { font-size: 16.1px; font-weight: 700; line-height: 23px; }
.qty { font-size: 12.6px; line-height: 18px; }

.money-row { display: flex; justify-content: space-between; gap: 10px; }
.money-row span:last-child { font-weight: 600; }

.in-hand { margin-top: 0; padding-top: 3px; border-top: 1px solid #444; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.in-hand svg { width: 12px; height: 12px; }
.pos { color: #2e8b3e; fill: #2e8b3e; }
.neg { color: #c9302c; fill: #c9302c; }
.in-hand b { font-weight: 700; }

.empty { padding: 50px; text-align: center; color: #888; background: #fff; border: 1px solid rgba(0,0,0,.2); }

/* ---------- pager ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 21px;
  background: #ecf0f5; font-size: 12px; text-transform: uppercase; color: #555;
}
.pager-right { display: flex; align-items: center; gap: 22px; }
.s-select--page { height: 30px; width: 70px; border-color: #ccc; font-size: 13px; padding: 0 6px; }
.pages { display: flex; }
.pages button {
  min-width: 32px; height: 30px; padding: 0 9px; font-size: 13px; color: #337ab7; background: #fff;
  border: 1px solid #ddd; margin-left: -1px; cursor: pointer;
}
.pages button:first-child { border-radius: 4px 0 0 4px; }
.pages button:last-child { border-radius: 0 4px 4px 0; }
.pages button.active { background: #337ab7; border-color: #337ab7; color: #fff; z-index: 1; }
.pages button:disabled:not(.active) { color: #999; cursor: default; }
