/* =====================================================================
   Mess Mint — ডিজাইন নিয়ম (সব পেজে একই)
   কোণা, ছায়া, ফাঁকা জায়গা, বাটন/ইনপুটের মাপ, focus, motion
   ===================================================================== */
:root {
  --mm-radius-card: 14px;
  --mm-radius-inner: 10px;
  --mm-radius-btn: 10px;
  --mm-radius-input: 10px;
  --mm-radius-pill: 999px;
  --mm-space-1: 4px;
  --mm-space-2: 8px;
  --mm-space-3: 12px;
  --mm-space-4: 16px;
  --mm-space-5: 24px;
  --mm-btn-h: 42px;
  --mm-btn-h-sm: 34px;
  --mm-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 6px 18px -12px rgba(15, 23, 42, .25);
  --mm-focus: 0 0 0 3px color-mix(in srgb, var(--accent, #FF8243) 45%, transparent);
  --mmc-a: var(--accent, #FF8243);
  --mmc-b: #0B8F87;
}

/* ---------- কার্ড ---------- */
html body .container :is(.card, .stat-card, .premium-card, .mmx-card, .mmp-card, .mf-card, .mm-billing-card, .mt-panel, .chart-box, .quick-action-card),
html body .container .tab-panel .mmd-hero,
html body .container .tab-panel .mmx-kitchen-hero {
  border-radius: var(--mm-radius-card) !important;
}

html body .container .card :is(.card, .stat-card, .mini-card, .history-item, .notice-item, .table-wrap, [class*="table-wrap"]) {
  border-radius: var(--mm-radius-inner) !important;
}

/* ---------- বাটন ---------- */
/* display এখানে বদলানো হয় না — লুকানো বাটন লুকানোই থাকবে */
html body :is(.btn, .mh-btn, .mf3-btn) {
  border-radius: var(--mm-radius-btn) !important;
  min-height: var(--mm-btn-h);
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
}

html body :is(.btn-sm, .btn.sm) {
  min-height: var(--mm-btn-h-sm);
}

html body .btn i,
html body .btn .bi {
  flex: 0 0 auto;
  line-height: 1;
}

/* ---------- ইনপুট ---------- */
html body .container :is(.text-input, .select-input, textarea.text-input),
html body .auth-card fieldset.form-group {
  border-radius: var(--mm-radius-input) !important;
}

html body .container :is(.text-input, .select-input) {
  min-height: 42px;
}

/* ---------- focus (কিবোর্ড দিয়ে চালালে স্পষ্ট দেখা যাবে) ---------- */
html body :is(a, button, [role="button"], input, select, textarea, summary, .tab-btn, .dropdown-action):focus-visible {
  outline: none !important;
  box-shadow: var(--mm-focus) !important;
  border-radius: var(--mm-radius-btn);
}

html body :is(input, select, textarea):focus-visible {
  border-color: var(--accent, #FF8243) !important;
}

/* ---------- লেখার স্পষ্টতা (light mode-এ glass-এর উপর) ---------- */
html[data-theme="light"] body .container :is(.card, .stat-card) :is(p, small, .muted, .text-muted, label) {
  color: color-mix(in srgb, var(--text, #1f2937) 78%, transparent);
}

/* ---------- "মূল অংশে যান" লিংক ---------- */
.mm-skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100010;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent, #FF8243);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}

.mm-skip:focus {
  top: 12px;
}

/* ---------- কম নড়াচড়া চাইলে ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- লোডিং skeleton ---------- */
#mmBootLoader {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: var(--bg, #0f1626);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity .3s;
}

#mmBootLoader.out {
  opacity: 0;
}

#mmBootLoader .mmbl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
}

#mmBootLoader .mmbl-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: url("../../logo/logo.svg") center / contain no-repeat;
}

#mmBootLoader .mmbl-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  min-height: 0;
}

#mmBootLoader aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mmBootLoader aside .sk {
  height: 38px;
}

#mmBootLoader main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#mmBootLoader .sk {
  display: block;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(127, 137, 160, .12) 25%, rgba(127, 137, 160, .24) 45%, rgba(127, 137, 160, .12) 65%);
  background-size: 300% 100%;
  animation: mmSk 1.3s ease-in-out infinite;
}

#mmBootLoader .sk.w40 {
  width: 140px;
  height: 22px;
}

#mmBootLoader .sk.hero {
  height: 150px;
  border-radius: 18px;
}

#mmBootLoader .sk.card {
  height: 96px;
  border-radius: 16px;
}

#mmBootLoader .mmbl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

#mmBootLoader .mmbl-text {
  text-align: center;
  color: var(--text2, #8a94a6);
  font-weight: 600;
  margin: 6px 0 0;
}

@keyframes mmSk {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (max-width: 900px) {
  #mmBootLoader .mmbl-body {
    grid-template-columns: 1fr;
  }

  #mmBootLoader aside {
    display: none;
  }
}

/* ---------- শুরু করার চেকলিস্ট ---------- */
.mm-ob .mm-ob-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.mm-ob h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.mm-ob p {
  margin: 0;
  font-size: 13px;
  color: var(--text2, #8a94a6);
}

.mm-ob-x {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2, #8a94a6);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mm-ob-bar {
  height: 8px;
  border-radius: 99px;
  margin: 12px 0 10px;
  background: color-mix(in srgb, var(--text, #888) 12%, transparent);
  overflow: hidden;
}

.mm-ob-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0B8F87, var(--accent, #FF8243));
  transition: width .4s;
}

.mm-ob-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mm-ob-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--g-border, var(--border));
}

.mm-ob-steps li > div {
  flex: 1;
  min-width: 0;
}

.mm-ob-steps small {
  display: block;
  font-size: 12px;
  color: var(--text2, #8a94a6);
}

.mm-ob-ic {
  flex: 0 0 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: color-mix(in srgb, var(--accent, #FF8243) 12%, transparent);
}

.mm-ob-steps li.done {
  opacity: .7;
}

.mm-ob-steps li.done .mm-ob-ic {
  background: #16a34a;
  color: #fff;
  font-weight: 800;
}

.mm-ob-steps li.done b {
  text-decoration: line-through;
}

.mm-ob-steps em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

.mm-pulse {
  animation: mmPulse 1.2s ease-in-out 2;
  border-radius: 14px;
}

@keyframes mmPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #FF8243) 0%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent, #FF8243) 45%, transparent); }
}

@media (max-width: 560px) {
  .mm-ob-steps li {
    flex-wrap: wrap;
  }

  .mm-ob-steps li .btn {
    width: 100%;
  }
}

/* ---------- চার্ট ---------- */
.mmc-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.mmc-wide {
  grid-column: 1 / -1;
}

.mmc-card {
  margin: 0 !important;
}

.mmc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mmc-head h3 {
  margin: 0;
  font-size: 15px;
}

.mmc-head span {
  font-size: 12.5px;
  color: var(--text2, #8a94a6);
  font-weight: 600;
}

.mmc-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.mmc-svg text {
  font-size: 12px;
  fill: var(--text2, #8a94a6);
  font-family: "Hind Siliguri", sans-serif;
}

.mmc-svg .mmc-val {
  font-size: 12.5px;
  font-weight: 700;
  fill: var(--text, #1f2937);
}

.mmc-svg .mmc-axis-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  fill: var(--text2, #8a94a6);
}

/* এখনো না-আসা (ভবিষ্যতের) দিনের তারিখ-লেবেল — হালকা করে দেখানো, যাতে বোঝা যায়
   ওই দিনগুলো এখনো ফাঁকা এবং সময় হলে আপনাআপনি ভরে উঠবে */
.mmc-svg .mmc-axis-future {
  opacity: .45;
}

.mmc-month-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin-bottom: 4px;
}

/* ---------- সদস্য অনুযায়ী বাজার গ্রাফ ---------- */
.mmc-members {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--text, #888) 18%, transparent);
  display: grid;
  gap: 8px;
}

.mmc-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin-top: 4px;
}

.mmc-sub small {
  font-weight: 500;
  color: var(--text2, #8a94a6);
  font-size: 11.5px;
}

.mmc-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  flex: 0 0 auto;
}

.mmc-mbars .mmc-track {
  height: 14px;
}

.mmc-mbars .mmc-track i {
  border-radius: 99px;
}

.mmc-num b.mmc-amt {
  color: var(--text, #1f2937);
  font-weight: 700;
}

.mmc-note.mmc-note-l {
  text-align: left;
  margin: 0 0 4px;
}

/* ---------- তারিখ অনুযায়ী বাজার আপডেট চার্ট ---------- */
.mmc-legend3 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 6px 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #1f2937);
}

.mmc-legend3 span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mmc-legend3 i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.mmc-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.mmc-svg .mmc-xd {
  font-size: 12.5px;
  font-weight: 700;
  fill: var(--text, #1f2937);
}

.mmc-svg .mmc-xt {
  font-size: 11px;
  fill: var(--text2, #8a94a6);
}

/* ---------- তারিখ অনুযায়ী বাজার আপডেট — row-wise স্ট্যাক্‌ড বার চার্ট ---------- */
.mmc-updrows-wrap {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 2px 0 2px;
  padding-right: 2px;
}

.mmc-updrows {
  display: grid;
  gap: 10px;
}

.mmc-updrow2-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.mmc-updrow2-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #1f2937);
}

.mmc-updrow2-total {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text2, #8a94a6);
}

.mmc-updrow2-track {
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--text, #888) 8%, transparent);
  overflow: hidden;
}

.mmc-updrow2-fill {
  height: 100%;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  min-width: 16px;
}

.mmc-updrow2-fill i {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2px;
  overflow: hidden;
  padding: 0 4px;
}

.mmc-seg-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ---------- দিন অনুযায়ী মিল রেট ---------- */
.mmc-daily {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px dashed color-mix(in srgb, var(--text, #888) 18%, transparent);
}

.mmc-daily-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.mmc-daily-head .mmc-month-label {
  margin: 0;
}

.mmc-select {
  font: inherit;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text, #1f2937);
  background: color-mix(in srgb, var(--text, #888) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--text, #888) 20%, transparent);
}

.mmc-note {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--text2, #8a94a6);
  text-align: center;
}

.mmc-axis {
  stroke: color-mix(in srgb, var(--text, #888) 20%, transparent);
  stroke-width: 1;
}

.mmc-svg rect:hover {
  opacity: .8;
}

.mmc-empty {
  margin: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text2, #8a94a6);
}

.mmc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.mmc-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text, #888) 22%, transparent);
  background: var(--card, transparent);
  color: var(--text, #1f2937);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, opacity .15s;
}

.mmc-nav-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--mmc-b) 15%, transparent);
  border-color: var(--mmc-b);
}

.mmc-nav-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.mmc-nav-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2, #8a94a6);
  min-width: 64px;
  text-align: center;
}

.mmc-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin: 0 4px 0 10px;
  vertical-align: middle;
}

.mmc-legend i.p,
.mmc-track i.p {
  background: #0B8F87;
}

.mmc-legend i.d,
.mmc-track i.d {
  background: #ef4444;
}

.mmc-bars {
  display: grid;
  gap: 9px;
}

.mmc-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.mmc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.mmc-track {
  display: flex;
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--text, #888) 10%, transparent);
}

.mmc-track i {
  display: block;
  height: 100%;
}

.mmc-num {
  font-size: 12px;
  color: var(--text2, #8a94a6);
  white-space: nowrap;
}

.mmc-num b {
  color: #ef4444;
}

@media (max-width: 760px) {
  .mmc-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .mmc-row {
    grid-template-columns: 90px 1fr;
  }

  .mmc-mbars .mmc-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
  }

  .mmc-mbars .mmc-num {
    grid-column: 2;
    grid-row: 1;
  }

  .mmc-mbars .mmc-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mmc-num {
    grid-column: 1 / -1;
    text-align: right;
  }
}

/* ---------- বিল বাটন ---------- */
.mm-bill-holder {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

@media (max-width: 560px) {
  .mm-bill-holder .btn {
    width: 100%;
  }
}