/* Khemisi — dashboard mock styles */

.m-window {
  background: #FBFBF8;
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 11px;
  color: #1F2E45;
  height: 540px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.05);
}

.m-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  background: #ECEDE9;
  border-bottom: 1px solid #DEDFD9;
  position: relative;
}
.m-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.m-dot.r { background: #F25F5C; }
.m-dot.y { background: #F4BB44; }
.m-dot.g { background: #54C457; }
.m-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px;
  color: #5B6373; letter-spacing: 0.02em;
}

.m-body { flex: 1; display: grid; grid-template-columns: 180px 1fr 240px; min-height: 0; }

/* sidebar */
.m-side {
  background: #FBFBF8;
  border-right: 1px solid #E7E8E2;
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 11px;
  overflow: hidden;
}
.m-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 14px;
}
.m-k {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0B2540; color: #fff;
  font-family: var(--font-serif); font-weight: 600;
  font-size: 14px; border-radius: 2px;
  position: relative;
}
.m-k::after {
  content: ""; position: absolute; right: -3px; bottom: 2px;
  width: 5px; height: 5px; background: var(--orange-500);
  transform: rotate(45deg);
}
.m-kw {
  font-weight: 600; letter-spacing: 0.16em;
  font-size: 10.5px; color: #0B2540;
}
.m-section {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.12em; color: #97A3B4;
  padding: 14px 6px 6px; text-transform: uppercase;
}
.m-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  color: #2A3A4F;
  font-size: 11.5px;
  cursor: default;
}
.m-link.sub {
  padding-left: 26px; font-size: 11px;
  color: #4B5B70;
}
.m-link.active {
  background: #EEF1F5;
  font-weight: 600;
  color: #0B2540;
}
.m-link.current {
  background: #EEF1F5;
  font-weight: 600;
  color: #0B2540;
  position: relative;
}
.m-link.current::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 2px; background: #0B2540; border-radius: 2px;
}
.m-ic {
  width: 14px; text-align: center;
  color: #6A7A90;
  font-size: 12px;
}

/* main */
.m-main {
  background: #F7F8FA;
  display: flex; flex-direction: column;
  min-height: 0;
}
.m-topbar {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 14px;
  background: #FBFBF8;
  border-bottom: 1px solid #E7E8E2;
}
.m-search {
  flex: 1;
  background: #fff;
  border: 1px solid #E7E8E2;
  border-radius: 4px;
  padding: 6px 10px;
  color: #97A3B4;
  font-size: 11px;
  display: flex; align-items: center; gap: 6px;
}
.kbd {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px;
  background: #F4F6F9;
  border: 1px solid #E7E8E2;
  padding: 1px 5px; border-radius: 3px;
  color: #6A7A90;
}
.kbd.dark { background: rgba(0,0,0,0.18); border-color: rgba(0,0,0,0.25); color: rgba(255,255,255,0.9); }
.m-pill {
  font-family: var(--font-mono); font-size: 10px;
  border: 1px solid #E7E8E2;
  padding: 4px 8px; border-radius: 3px;
  color: #4B5B70;
  letter-spacing: 0.04em;
  background: #fff;
}
.m-pill strong { color: #0B2540; margin-left: 4px; }
.m-pill.ok {
  border-color: rgba(40,160,90,0.3);
  background: rgba(40,160,90,0.06);
  color: #157046;
}
.m-pill.ok strong { color: #157046; }

.m-tabs {
  display: flex; gap: 2px;
  padding: 10px 12px 0;
  background: #F7F8FA;
}
.m-tab {
  padding: 5px 9px;
  font-size: 10.5px;
  color: #4B5B70;
  border-radius: 4px;
}
.m-tab.active { background: #0B2540; color: #fff; }

.m-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-content: start;
}
.m-card {
  background: #fff;
  border: 1px solid #E7E8E2;
  border-radius: 4px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.m-cip {
  font-family: var(--font-mono); font-size: 9.5px;
  background: #F4F6F9;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 2px;
  color: #6A7A90;
  width: fit-content;
}
.m-name {
  font-size: 11px; font-weight: 600; color: #0B2540;
  letter-spacing: 0.01em;
}
.m-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 2px; }
.m-price {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 15px; color: #0B2540;
}
.m-stock {
  font-family: var(--font-mono); font-size: 9.5px;
  color: #97A3B4; letter-spacing: 0.04em;
}
.m-stock.low { color: #B45A1D; }

/* ticket */
.m-ticket {
  background: #FBFBF8;
  border-left: 1px solid #E7E8E2;
  padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 11px;
  overflow: hidden;
}
.m-ticket-head {
  display: flex; justify-content: space-between; align-items: center;
}
.m-ticket-head strong {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 15px; color: #0B2540;
}
.m-badge {
  font-family: var(--font-mono); font-size: 10px;
  background: #F4F6F9; border: 1px solid #E7E8E2;
  padding: 2px 7px; border-radius: 3px;
  color: #6A7A90;
}
.m-line {
  display: flex; gap: 8px; align-items: center;
  border-top: 1px solid #E7E8E2;
  padding-top: 8px;
}
.m-line-name { font-size: 11px; font-weight: 600; color: #0B2540; display: flex; gap: 6px; align-items: center; }
.m-rx {
  font-family: var(--font-mono); font-size: 8.5px;
  color: #F85A40; border: 1px solid rgba(248,90,64,0.3);
  background: rgba(248,90,64,0.07);
  padding: 1px 5px; border-radius: 2px;
  letter-spacing: 0.04em;
}
.m-line-meta {
  font-family: var(--font-mono); font-size: 9.5px;
  color: #97A3B4; margin-top: 2px;
}
.m-qty {
  margin-left: auto;
  background: #fff; border: 1px solid #E7E8E2;
  border-radius: 3px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #0B2540;
}
.m-pays {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 4px;
}
.m-pay {
  text-align: center; font-size: 9.5px;
  padding: 6px 0; border-radius: 3px;
  background: #fff; border: 1px solid #E7E8E2;
  color: #4B5B70;
}
.m-pay.active { background: #0B2540; color: #fff; border-color: #0B2540; }
.m-total-row {
  display: flex; justify-content: space-between;
  font-size: 11px; color: #4B5B70;
  border-top: 1px solid #E7E8E2;
  padding-top: 6px;
}
.m-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid #E7E8E2;
  padding-top: 8px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  color: #0B2540;
}
.m-total em { font-style: normal; font-size: 11px; color: #6A7A90; font-family: var(--font-mono); }
.m-cash {
  margin-top: auto;
  background: var(--orange-500);
  color: #fff;
  border: none; border-radius: 4px;
  padding: 10px;
  font-family: var(--font-sans); font-weight: 600;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: default;
}
.m-cash .kbd { margin-left: 0; background: rgba(0,0,0,0.2); color: #fff; border-color: rgba(0,0,0,0.3); }

@media (max-width: 900px) {
  .m-window { height: 460px; }
  .m-body { grid-template-columns: 0 1fr 200px; }
  .m-side { display: none; }
  .m-body { grid-template-columns: 1fr 220px; }
}
@media (max-width: 640px) {
  .m-window { height: 420px; }
  .m-body { grid-template-columns: 1fr; }
  .m-ticket { display: none; }
  .m-grid { grid-template-columns: 1fr 1fr; }
}
