/* ============================================================
   MCS — Milk Collection System CSS
   Hadlay Kalan Dairy Software
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mcs-primary:   #1a73e8;
  --mcs-secondary: #34a853;
  --mcs-danger:    #ea4335;
  --mcs-warning:   #fbbc04;
  --mcs-purple:    #9c27b0;
  --mcs-orange:    #ff6d00;
  --mcs-bg:        #f0f4ff;
  --mcs-card:      #ffffff;
  --mcs-border:    #e8ecf0;
  --mcs-text:      #1a1a2e;
  --mcs-text2:     #5f6368;
  --mcs-radius:    14px;
  --mcs-shadow:    0 2px 12px rgba(0,0,0,.08);
  --mcs-header-h:  60px;
  --mcs-tab-h:     56px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--mcs-bg);
  color: var(--mcs-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SPLASH ─── */
.mcs-splash {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a237e 0%, #1565c0 50%, #0288d1 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s, visibility .5s;
}
.mcs-splash.hide { opacity: 0; visibility: hidden; }
.mcs-splash-inner { text-align: center; color: #fff; }
.mcs-splash-icon { font-size: 64px; margin-bottom: 16px; animation: bounce 1s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.mcs-splash-inner h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.mcs-splash-inner p { font-size: 14px; opacity: .8; margin-bottom: 32px; }
.mcs-splash-bar {
  width: 200px; height: 4px; background: rgba(255,255,255,.3);
  border-radius: 99px; margin: 0 auto; overflow: hidden;
}
.mcs-splash-fill {
  height: 100%; width: 0; background: #fff; border-radius: 99px;
  animation: fill 1.8s ease forwards;
}
@keyframes fill { to { width: 100%; } }

/* ─── HEADER ─── */
.mcs-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--mcs-header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: linear-gradient(135deg, #1a237e, #1565c0);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.mcs-back-btn {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  transition: background .2s;
}
.mcs-back-btn:hover { background: rgba(255,255,255,.25); }
.mcs-header-center { display: flex; align-items: center; gap: 10px; flex: 1; }
.mcs-header-icon { font-size: 28px; }
.mcs-header-title { font-size: 17px; font-weight: 700; line-height: 1.1; }
.mcs-header-sub { font-size: 11px; opacity: .8; }
.mcs-header-menu {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; position: relative; flex-shrink: 0;
}
.mcs-dropdown {
  position: absolute; top: calc(var(--mcs-header-h) - 4px); right: 16px;
  background: #fff; border-radius: var(--mcs-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  min-width: 180px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all .2s;
  z-index: 200;
}
.mcs-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mcs-dropdown-item {
  padding: 13px 16px; display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--mcs-text); cursor: pointer;
  border-bottom: 1px solid var(--mcs-border);
  transition: background .2s;
}
.mcs-dropdown-item:last-child { border-bottom: none; }
.mcs-dropdown-item:hover { background: var(--mcs-bg); }
.mcs-dropdown-item i { color: var(--mcs-primary); width: 16px; }

/* ─── MAIN ─── */
.mcs-main {
  padding-bottom: 24px;
  min-height: calc(100vh - var(--mcs-header-h));
}
.mcs-section { display: none; }
.mcs-section.active { display: block; }

/* ─── LANDING ─── */
.mcs-landing-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1a237e, #0288d1);
  padding: 48px 24px 40px;
  text-align: center; color: #fff;
}
.mcs-landing-bg {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Ccircle cx='350' cy='50' r='120' fill='rgba(255,255,255,.05)'/%3E%3Ccircle cx='50' cy='150' r='80' fill='rgba(255,255,255,.05)'/%3E%3C/svg%3E") no-repeat center/cover;
}
.mcs-landing-content { position: relative; z-index: 1; }
.mcs-landing-emoji { font-size: 64px; margin-bottom: 12px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.mcs-landing-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.mcs-landing-hero p { font-size: 13px; opacity: .85; }
.mcs-landing-tagline { margin-top: 8px; font-size: 13px; opacity: .9;
  background: rgba(255,255,255,.12); display: inline-block;
  padding: 4px 14px; border-radius: 99px; }

.mcs-role-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; padding: 20px 16px;
}
@media(max-width: 480px) { .mcs-role-cards { grid-template-columns: 1fr; } }

.mcs-role-card {
  background: var(--mcs-card); border-radius: 18px;
  padding: 22px 18px; box-shadow: var(--mcs-shadow);
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  border: 2px solid transparent;
}
.mcs-role-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.owner-card { border-color: rgba(26,115,232,.2); }
.customer-card { border-color: rgba(52,168,83,.2); }
.mcs-role-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
}
.owner-card .mcs-role-icon { background: linear-gradient(135deg, #1a73e8, #0d47a1); }
.customer-card .mcs-role-icon { background: linear-gradient(135deg, #34a853, #1b5e20); }
.mcs-role-card h3 { font-size: 17px; font-weight: 700; color: var(--mcs-text); }
.mcs-role-card > p { font-size: 12px; color: var(--mcs-text2); }
.mcs-role-card ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mcs-role-card ul li { font-size: 12px; color: var(--mcs-text2); display: flex; align-items: center; gap: 6px; }
.mcs-role-card ul li i { color: var(--mcs-secondary); font-size: 10px; }

/* ─── FORM PAGE ─── */
.mcs-form-page {
  max-width: 420px; margin: 32px auto; padding: 0 16px;
}
.mcs-form-header { text-align: center; margin-bottom: 28px; }
.mcs-form-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff; margin: 0 auto 14px;
}
.owner-icon { background: linear-gradient(135deg, #1a73e8, #0d47a1); }
.customer-icon { background: linear-gradient(135deg, #34a853, #1b5e20); }
.mcs-form-header h2 { font-size: 22px; font-weight: 700; }
.mcs-form-header p { font-size: 13px; color: var(--mcs-text2); }

/* ─── FORMS ─── */
.mcs-form { display: flex; flex-direction: column; gap: 14px; }
.mcs-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media(max-width: 380px) { .mcs-form-row { grid-template-columns: 1fr; } }
.mcs-field { display: flex; flex-direction: column; gap: 6px; }
.mcs-field label { font-size: 13px; font-weight: 600; color: var(--mcs-text2); }
.mcs-input-wrap {
  position: relative; display: flex; align-items: center;
  background: var(--mcs-bg); border: 1.5px solid var(--mcs-border);
  border-radius: 10px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.mcs-input-wrap:focus-within {
  border-color: var(--mcs-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.1);
}
.mcs-input-wrap > i:first-child {
  width: 40px; text-align: center; color: var(--mcs-text2); font-size: 14px; flex-shrink: 0;
}
.mcs-input-wrap input,
.mcs-input-wrap select,
.mcs-input-wrap textarea {
  flex: 1; border: none; outline: none; background: transparent;
  padding: 11px 10px 11px 0; font-size: 14px; font-family: inherit;
  color: var(--mcs-text); min-width: 0;
}
.mcs-input-wrap select { cursor: pointer; }
.mcs-eye-toggle {
  width: 40px; text-align: center; color: var(--mcs-text2);
  cursor: pointer; font-size: 14px; flex-shrink: 0;
}

/* ─── BUTTONS ─── */
.mcs-btn {
  padding: 12px 20px; border-radius: 10px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; transition: all .2s;
}
.mcs-btn-primary {
  background: linear-gradient(135deg, #1a73e8, #1557b0);
  color: #fff; box-shadow: 0 4px 12px rgba(26,115,232,.35);
}
.mcs-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,115,232,.4); }
.mcs-btn-secondary {
  background: linear-gradient(135deg, #34a853, #1b7a3c);
  color: #fff; box-shadow: 0 4px 12px rgba(52,168,83,.35);
}
.mcs-btn-secondary:hover { transform: translateY(-2px); }
.mcs-btn-ghost {
  background: var(--mcs-bg); color: var(--mcs-text2);
  border: 1.5px solid var(--mcs-border);
}
.mcs-btn-ghost:hover { background: var(--mcs-border); }
.mcs-btn-full { width: 100%; }
.mcs-btn-sm { padding: 8px 14px; font-size: 12px; border-radius: 8px; }
.mcs-btn-icon {
  width: 30px; height: 30px; border-radius: 8px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.mcs-btn-icon.danger { background: #fce8e6; color: var(--mcs-danger); }

/* ─── MESSAGES ─── */
.mcs-error-msg { background: #fce8e6; color: #c5221f; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.mcs-success-msg { background: #e6f4ea; color: #1e8e3e; border-radius: 8px; padding: 10px 14px; font-size: 13px; }

/* ─── TAB BAR ─── */
.mcs-tab-bar {
  display: flex; overflow-x: auto; gap: 0;
  background: #fff; border-bottom: 2px solid var(--mcs-border);
  position: sticky; top: var(--mcs-header-h); z-index: 90;
  scrollbar-width: none;
}
.mcs-tab-bar::-webkit-scrollbar { display: none; }
.mcs-tab {
  flex: 0 0 auto; display: flex; flex-direction: column;
  align-items: center; gap: 3px; padding: 10px 16px;
  font-size: 11px; font-weight: 600; color: var(--mcs-text2);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all .2s; white-space: nowrap;
}
.mcs-tab i { font-size: 16px; }
.mcs-tab.active { color: var(--mcs-primary); border-bottom-color: var(--mcs-primary); }
.mcs-tab-content { display: none; padding: 16px; }
.mcs-tab-content.active { display: block; }

/* ─── DATE SELECTOR ─── */
.mcs-date-selector {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: var(--mcs-shadow); margin-bottom: 16px;
}
.mcs-date-nav {
  background: var(--mcs-bg); border: none; width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--mcs-primary); font-size: 14px;
  flex-shrink: 0;
}
.mcs-date-selector input[type="date"] {
  flex: 1; border: none; outline: none; font-family: inherit;
  font-size: 15px; font-weight: 600; color: var(--mcs-text);
  background: transparent; text-align: center;
}
.mcs-today-btn {
  background: var(--mcs-primary); color: #fff; border: none;
  padding: 6px 12px; border-radius: 8px; font-size: 12px;
  font-family: inherit; font-weight: 600; cursor: pointer;
  flex-shrink: 0;
}

/* ─── STAT CARDS ─── */
.mcs-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 20px;
}
.mcs-stat-card {
  background: #fff; border-radius: 14px; padding: 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--mcs-shadow); overflow: hidden; position: relative;
}
.mcs-stat-card::before {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%; opacity: .08;
}
.mcs-stat-card.blue::before { background: var(--mcs-primary); }
.mcs-stat-card.green::before { background: var(--mcs-secondary); }
.mcs-stat-card.orange::before { background: var(--mcs-orange); }
.mcs-stat-card.purple::before { background: var(--mcs-purple); }
.mcs-stat-card.red::before { background: var(--mcs-danger); }
.mcs-stat-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.mcs-stat-card.blue .mcs-stat-icon   { background: linear-gradient(135deg,#1a73e8,#0d47a1); }
.mcs-stat-card.green .mcs-stat-icon  { background: linear-gradient(135deg,#34a853,#1b5e20); }
.mcs-stat-card.orange .mcs-stat-icon { background: linear-gradient(135deg,#ff6d00,#e65100); }
.mcs-stat-card.purple .mcs-stat-icon { background: linear-gradient(135deg,#9c27b0,#6a1b9a); }
.mcs-stat-card.red .mcs-stat-icon    { background: linear-gradient(135deg,#ea4335,#b71c1c); }
.mcs-stat-value { font-size: 20px; font-weight: 800; color: var(--mcs-text); line-height: 1; }
.mcs-stat-label { font-size: 11px; color: var(--mcs-text2); margin-top: 3px; }

/* ─── SECTION TITLE ─── */
.mcs-section-title {
  font-size: 13px; font-weight: 700; color: var(--mcs-text2);
  text-transform: uppercase; letter-spacing: .5px;
  margin: 16px 0 8px; display: flex; align-items: center; gap: 6px;
}

/* ─── COLLECTION LIST ─── */
.mcs-collection-list { display: flex; flex-direction: column; gap: 10px; }
.mcs-coll-card {
  background: #fff; border-radius: 12px; padding: 13px 14px;
  box-shadow: var(--mcs-shadow); display: flex; align-items: center;
  gap: 12px; position: relative; overflow: hidden;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.mcs-coll-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0;
  width: 4px; border-radius: 2px 0 0 2px;
}
.mcs-coll-card.morning::before { background: #fbbc04; }
.mcs-coll-card.evening::before { background: #9c27b0; }
.mcs-coll-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.mcs-coll-card.morning .mcs-coll-avatar { background: #fff8e1; }
.mcs-coll-card.evening .mcs-coll-avatar { background: #f3e5f5; }
.mcs-coll-info { flex: 1; min-width: 0; }
.mcs-coll-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcs-coll-meta { font-size: 11px; color: var(--mcs-text2); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.mcs-coll-meta span { display: flex; align-items: center; gap: 3px; }
.mcs-coll-right { text-align: right; flex-shrink: 0; }
.mcs-coll-amount { font-size: 16px; font-weight: 800; color: var(--mcs-secondary); }
.mcs-coll-qty { font-size: 11px; color: var(--mcs-text2); }
.mcs-coll-actions { display: flex; gap: 6px; margin-top: 4px; justify-content: flex-end; }
.mcs-coll-action-btn {
  width: 28px; height: 28px; border-radius: 7px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.edit-btn { background: #e8f0fe; color: #1a73e8; }
.del-btn  { background: #fce8e6; color: #ea4335; }

/* ─── CUSTOMER CARDS ─── */
.mcs-customers-list { display: flex; flex-direction: column; gap: 10px; }
.mcs-cust-card {
  background: #fff; border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--mcs-shadow); display: flex; align-items: center; gap: 12px;
}
.mcs-cust-card-avatar {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.mcs-cust-card-info { flex: 1; min-width: 0; }
.mcs-cust-card-name { font-size: 15px; font-weight: 700; }
.mcs-cust-card-id {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: #e8f0fe; color: var(--mcs-primary);
  padding: 2px 8px; border-radius: 99px; margin-top: 2px;
}
.mcs-cust-card-meta { font-size: 11px; color: var(--mcs-text2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.mcs-cust-card-actions { display: flex; flex-direction: column; gap: 5px; }
.mcs-inactive-badge {
  font-size: 10px; background: #fce8e6; color: var(--mcs-danger);
  padding: 2px 8px; border-radius: 99px; font-weight: 600;
}

/* ─── FILTER BAR ─── */
.mcs-filter-bar {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
}
.mcs-filter-bar .mcs-input-wrap { flex: 1; min-width: 120px; }
.mcs-filter-bar select {
  flex: 0 0 auto; padding: 10px 12px; border-radius: 10px;
  border: 1.5px solid var(--mcs-border); background: #fff;
  font-size: 13px; font-family: inherit; outline: none;
}

/* ─── TOOLBAR ─── */
.mcs-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.mcs-search {
  flex: 1; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--mcs-border); background: #fff;
  font-size: 13px; font-family: inherit; outline: none;
}
.mcs-search:focus { border-color: var(--mcs-primary); }

/* ─── RECORDS SUMMARY ─── */
.mcs-records-summary {
  display: flex; gap: 12px; flex-wrap: wrap;
  background: #e8f0fe; border-radius: 10px; padding: 10px 14px;
  margin-bottom: 12px; font-size: 13px; color: var(--mcs-primary);
}
.mcs-records-summary span { display: flex; align-items: center; gap: 6px; }

/* ─── CARD ─── */
.mcs-card {
  background: #fff; border-radius: 16px; padding: 18px 16px;
  box-shadow: var(--mcs-shadow); margin-bottom: 16px;
}
.mcs-card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; color: var(--mcs-text);
}
.mcs-card-title i { color: var(--mcs-primary); }

/* ─── AMOUNT PREVIEW ─── */
.mcs-amount-preview {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-radius: 12px; padding: 12px 16px;
  border: 1.5px solid #a5d6a7;
}
.mcs-amount-label { font-size: 14px; font-weight: 600; color: var(--mcs-secondary); }
.mcs-amount-value { font-size: 22px; font-weight: 800; color: #1b5e20; }

/* ─── GRAND TOTAL ─── */
.mcs-grand-total {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 16px;
}
.mcs-gt-item {
  background: #fff; border-radius: 12px; padding: 12px;
  box-shadow: var(--mcs-shadow); text-align: center;
}
.mcs-gt-item span { display: block; font-size: 11px; color: var(--mcs-text2); margin-bottom: 4px; }
.mcs-gt-item b { font-size: 18px; font-weight: 800; color: var(--mcs-text); }
.mcs-gt-item.due b { color: var(--mcs-danger); }

/* ─── REPORT TABLE ─── */
.mcs-report-wrap { overflow-x: auto; }
.mcs-report-table {
  width: 100%; border-collapse: collapse; background: #fff;
  border-radius: 12px; overflow: hidden; box-shadow: var(--mcs-shadow);
  font-size: 13px;
}
.mcs-report-table th {
  background: linear-gradient(135deg, #1a237e, #1565c0);
  color: #fff; padding: 10px 12px; text-align: left; font-weight: 600;
  white-space: nowrap;
}
.mcs-report-table td { padding: 10px 12px; border-bottom: 1px solid var(--mcs-border); }
.mcs-report-table tr:last-child td { border-bottom: none; }
.mcs-report-table tr:hover td { background: var(--mcs-bg); }
.mcs-report-table .due-cell { color: var(--mcs-danger); font-weight: 700; }
.mcs-report-table tfoot td {
  background: #f8f9ff; font-weight: 700; border-top: 2px solid var(--mcs-border);
}

/* ─── BILL ─── */
.mcs-bill {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: var(--mcs-shadow);
}
.mcs-bill-header { text-align: center; padding-bottom: 14px; border-bottom: 2px dashed var(--mcs-border); margin-bottom: 14px; }
.mcs-bill-header h3 { font-size: 18px; font-weight: 800; }
.mcs-bill-header p { font-size: 12px; color: var(--mcs-text2); }
.mcs-bill-cust { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.mcs-bill-cust-row { display: flex; justify-content: space-between; font-size: 13px; }
.mcs-bill-cust-row span { color: var(--mcs-text2); }
.mcs-bill-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 14px; }
.mcs-bill-table th { background: var(--mcs-bg); padding: 7px 8px; text-align: left; font-size: 11px; color: var(--mcs-text2); }
.mcs-bill-table td { padding: 7px 8px; border-bottom: 1px solid var(--mcs-border); }
.mcs-bill-summary { background: var(--mcs-bg); border-radius: 12px; padding: 14px; }
.mcs-bill-summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.mcs-bill-summary-row.total { font-weight: 800; font-size: 16px; border-top: 2px solid var(--mcs-border); margin-top: 6px; padding-top: 10px; }
.mcs-bill-summary-row.due { color: var(--mcs-danger); font-weight: 700; }

/* ─── FAT BANDS ─── */
.mcs-fat-band {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.mcs-fat-band input {
  flex: 1; padding: 9px 10px; border: 1.5px solid var(--mcs-border);
  border-radius: 8px; font-size: 13px; font-family: inherit;
  outline: none; background: var(--mcs-bg); min-width: 0;
}
.mcs-fat-band input:focus { border-color: var(--mcs-primary); }
.mcs-fat-band span { color: var(--mcs-text2); font-size: 14px; }

/* ─── ACTIVE RATES ─── */
.mcs-rate-display { display: flex; flex-direction: column; gap: 8px; }
.mcs-rate-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--mcs-bg); border-radius: 10px;
  font-size: 13px;
}
.mcs-rate-item b { color: var(--mcs-secondary); font-size: 15px; }

/* ─── CUSTOMER PROFILE (owner panel) ─── */
.mcs-cust-profile {
  background: linear-gradient(135deg, #1a237e, #0288d1);
  color: #fff; padding: 20px 16px;
  display: flex; align-items: center; gap: 14px;
}
.mcs-cp-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex-shrink: 0;
}
.mcs-cp-name { font-size: 18px; font-weight: 700; }
.mcs-cp-id { font-size: 13px; opacity: .8; }
.mcs-cp-animal { font-size: 12px; opacity: .7; margin-top: 3px; }

/* ─── MONTH SELECTOR ─── */
.mcs-month-selector {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: var(--mcs-shadow); margin-bottom: 16px;
}
.mcs-month-selector label { font-size: 13px; color: var(--mcs-text2); white-space: nowrap; }
.mcs-month-selector input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; font-weight: 600; background: transparent; }

/* ─── MODAL ─── */
.mcs-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 1000; opacity: 0; visibility: hidden;
  transition: all .25s;
}
.mcs-modal-overlay.open { opacity: 1; visibility: visible; }
.mcs-modal {
  background: #fff; border-radius: 20px 20px 0 0;
  width: 100%; max-width: 540px; max-height: 90vh;
  overflow-y: auto; padding: 20px 18px 30px;
  transform: translateY(100%); transition: transform .3s;
}
.mcs-modal-overlay.open .mcs-modal { transform: translateY(0); }
.mcs-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.mcs-modal-header h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mcs-modal-header h3 i { color: var(--mcs-primary); }
.mcs-modal-header button {
  background: var(--mcs-bg); border: none; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 14px; color: var(--mcs-text2);
}

/* ─── TOAST ─── */
.mcs-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #323232; color: #fff; padding: 12px 20px;
  border-radius: 99px; font-size: 13px; z-index: 2000;
  opacity: 0; visibility: hidden; transition: all .3s; white-space: nowrap;
}
.mcs-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mcs-toast.success { background: #1e8e3e; }
.mcs-toast.error { background: #c5221f; }

/* ─── EMPTY ─── */
.mcs-empty {
  text-align: center; padding: 40px 20px;
  color: var(--mcs-text2); font-size: 14px;
}
.mcs-empty::before { content: '📭'; display: block; font-size: 36px; margin-bottom: 10px; }

/* ─── SHIMMER ─── */
.mcs-shimmer {
  background: linear-gradient(90deg, #f0f4ff 25%, #e8ecf0 50%, #f0f4ff 75%);
  background-size: 200% 100%; border-radius: 10px;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── PAYMENT CARD ─── */
.mcs-pay-card {
  background: #fff; border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--mcs-shadow); display: flex; align-items: center;
  gap: 12px; animation: fadeIn .3s;
}
.mcs-pay-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.mcs-pay-icon.cash   { background: #e8f5e9; }
.mcs-pay-icon.upi    { background: #e8f0fe; }
.mcs-pay-icon.bank   { background: #fce8e6; }
.mcs-pay-icon.other  { background: #fff8e1; }
.mcs-pay-info { flex: 1; min-width: 0; }
.mcs-pay-name { font-size: 14px; font-weight: 700; }
.mcs-pay-meta { font-size: 11px; color: var(--mcs-text2); }
.mcs-pay-amount { font-size: 18px; font-weight: 800; color: var(--mcs-secondary); text-align: right; }
.mcs-pay-del {
  width: 28px; height: 28px; background: #fce8e6; color: var(--mcs-danger);
  border: none; border-radius: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  margin-top: 4px;
}

/* ─── PRINT STYLES ─── */
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; margin: 0; padding: 20px; }
  .no-print { display: none !important; }
}

/* ─── MOBILE IMPROVEMENTS ─── */
/* Make tab bar more compact and scrollable on small screens */
@media (max-width: 480px) {
  :root {
    --mcs-header-h: 56px;
    --mcs-tab-h: 50px;
  }
  .mcs-header-title { font-size: 15px; }
  .mcs-header-sub   { font-size: 10px; }
  .mcs-header-icon  { font-size: 22px; }

  /* Tab bar: smaller icons + text */
  .mcs-tab { padding: 8px 12px; font-size: 10px; }
  .mcs-tab i { font-size: 15px; }

  /* Stat cards: full 2-col grid with smaller values */
  .mcs-stats-grid { gap: 8px; }
  .mcs-stat-card { padding: 12px; gap: 8px; }
  .mcs-stat-icon { width: 40px; height: 40px; font-size: 17px; border-radius: 10px; }
  .mcs-stat-value { font-size: 17px; }
  .mcs-stat-label { font-size: 10px; }

  /* Tab content: reduce padding */
  .mcs-tab-content { padding: 12px; }

  /* Form rows: always single column on tiny screens */
  .mcs-form-row { grid-template-columns: 1fr; }

  /* Role cards always stacked */
  .mcs-role-cards { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .mcs-landing-hero { padding: 32px 16px 28px; }
  .mcs-landing-emoji { font-size: 48px; }
  .mcs-landing-hero h2 { font-size: 18px; }

  /* Customer profile panel */
  .mcs-cp-card { padding: 14px; }
  .mcs-cp-avatar { width: 50px; height: 50px; font-size: 22px; }

  /* Report table overflow */
  .mcs-report-wrap { overflow-x: auto; }
  .mcs-report-wrap table { min-width: 480px; }

  /* Grand totals: 2 per row instead of 4 */
  .mcs-grand-total { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }

  /* Date selector input font */
  .mcs-date-selector input[type="date"] { font-size: 13px; }

  /* Buttons full-width in forms */
  .mcs-form .mcs-btn { padding: 11px 16px; font-size: 13px; }

  /* Toast bottom position */
  .mcs-toast { bottom: 16px; font-size: 12px; }

  /* Modal */
  .mcs-modal-overlay { padding: 0; align-items: flex-end; }
  .mcs-modal-box {
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .mcs-tab span { display: none; } /* icon-only on very tiny screens */
  .mcs-tab { padding: 8px 8px; min-width: 44px; justify-content: center; }
  .mcs-stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .mcs-stat-value { font-size: 15px; }
}
