/* =========================================================
   e-Tarkari – Main Stylesheet
   Marathi Agricultural Market Application
   ========================================================= */

:root {
  --green: #2e7d32;
  --green-light: #4caf50;
  --green-pale: #e8f5e9;
  --green-mid: #a5d6a7;
  --red: #c62828;
  --red-light: #ef5350;
  --red-pale: #ffebee;
  --orange: #e65100;
  --orange-light: #ff9800;
  --blue: #1565c0;
  --blue-light: #42a5f5;
  --blue-pale: #e3f2fd;
  --purple: #6a1b9a;
  --grey-bg: #f0f4f0;
  --grey-card: #ffffff;
  --grey-border: #c8e6c9;
  --grey-text: #424242;
  --grey-muted: #757575;
  --sidebar-bg: #1b5e20;
  --sidebar-hover: #2e7d32;
  --sidebar-text: #e8f5e9;
  --header-height: 56px;
  --sidebar-collapsed: 56px;
  --sidebar-expanded: 220px;
  --font-main: 'Poppins', 'Noto Sans Devanagari', sans-serif;
  --font-mr: 'Noto Sans Devanagari', 'Poppins', sans-serif;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.16);
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: var(--font-main);
  background: var(--grey-bg);
  color: var(--grey-text);
  font-size: 14px;
  min-height: 100vh;
}

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  padding: 16px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.5px;
}

.auth-logo p {
  color: var(--grey-muted);
  font-size: 13px;
  font-family: var(--font-mr);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--grey-text);
  text-align: center;
}

/* ── Form Controls ──────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--grey-text);
  font-family: var(--font-mr);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #c8e6c9;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  color: var(--grey-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.form-control:disabled {
  background: #f5f5f5;
  color: var(--grey-muted);
  cursor: not-allowed;
}

.input-group {
  position: relative;
}

.input-group .form-control { padding-right: 42px; }

.input-group .eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-muted);
  font-size: 18px;
  padding: 4px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-mr);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
  line-height: 1.4;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--green);
  color: white;
  width: 100%;
  padding: 12px;
  font-size: 15px;
}
.btn-primary:hover { background: #1b5e20; }

.btn-success {
  background: var(--green-light);
  color: white;
}
.btn-success:hover { background: var(--green); }

.btn-danger {
  background: var(--red-light);
  color: white;
}
.btn-danger:hover { background: var(--red); }

.btn-warning {
  background: var(--orange-light);
  color: white;
}

.btn-secondary {
  background: #e0e0e0;
  color: var(--grey-text);
}
.btn-secondary:hover { background: #bdbdbd; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn-outline:hover { background: var(--green-pale); }

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-family: var(--font-mr);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-success { background: var(--green-pale); color: #1b5e20; border-left: 4px solid var(--green); }
.alert-danger { background: var(--red-pale); color: var(--red); border-left: 4px solid var(--red); }
.alert-warning { background: #fff3e0; color: var(--orange); border-left: 4px solid var(--orange-light); }
.alert-info { background: var(--blue-pale); color: var(--blue); border-left: 4px solid var(--blue); }

.alert .close-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
}

/* ── Auth Links ─────────────────────────────────────────── */
.auth-links {
  text-align: center;
  margin-top: 16px;
}

.auth-links a {
  color: var(--green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.auth-links a:hover { text-decoration: underline; }

.auth-divider {
  text-align: center;
  margin: 12px 0;
  color: var(--grey-muted);
  font-size: 12px;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e0e0e0;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── Dashboard Layout ───────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-collapsed);
  background: var(--sidebar-bg);
  transition: width 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  position: relative;
}

.sidebar:hover, .sidebar.expanded {
  width: var(--sidebar-expanded);
}

.sidebar-logo {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: white;
  font-weight: 700;
}

.sidebar-logo .logo-text {
  color: white;
  font-size: 18px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar:hover .logo-text, .sidebar.expanded .logo-text { opacity: 1; }

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 13px 12px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  gap: 12px;
  border: none;
  background: none;
  width: 100%;
  font-family: var(--font-mr);
  font-size: 14px;
  position: relative;
}

.nav-item:hover { background: var(--sidebar-hover); }
.nav-item.active { background: rgba(255,255,255,0.15); }
.nav-item.disabled { opacity: 0.4; pointer-events: none; }

.nav-item .nav-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.nav-item .nav-label {
  opacity: 0;
  transition: opacity 0.2s;
}

.sidebar:hover .nav-label, .sidebar.expanded .nav-label { opacity: 1; }

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--green);
  flex: 1;
  font-family: var(--font-mr);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
}

.user-dropdown.show { display: block; }

.user-dropdown .dd-header {
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  color: var(--grey-muted);
}

.user-dropdown .dd-username {
  font-weight: 600;
  color: var(--grey-text);
  font-size: 14px;
}

.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--grey-text);
  text-decoration: none;
  font-size: 13px;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-mr);
}

.user-dropdown a:hover, .user-dropdown button:hover { background: var(--grey-bg); }

.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

.module-panel {
  display: none;
  height: 100%;
}

.module-panel.active { display: flex; flex-direction: column; height: 100%; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  background: #e8eaf6;
  font-weight: 600;
  font-family: var(--font-mr);
  color: var(--grey-text);
  font-size: 14px;
  border-bottom: 1px solid var(--grey-border);
  text-align: center;
}

.card-body { padding: 16px; }

/* ── Transaction Page Layout ────────────────────────────── */
.tx-layout {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.tx-left {
  width: 70%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--grey-border);
}

.tx-right {
  width: 30%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tx-top {
  display: flex;
  gap: 12px;
  padding: 12px;
}

.tx-top .card { flex: 1; }

.tx-bill-details { padding: 10px 12px; }
.tx-nond { padding: 10px 12px; }

.tx-bottom {
  flex: 1;
  overflow: hidden;
  padding: 0 12px 12px;
}

.tx-shetimal {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tx-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px;
}

.preview-iframe-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px dashed var(--grey-border);
  border-radius: var(--radius);
  min-height: 200px;
}

/* Bill Details form */
.bill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.bill-row label {
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mr);
  color: var(--grey-text);
  white-space: nowrap;
  min-width: 60px;
}

.bill-row .form-control { flex: 1; min-width: 80px; padding: 7px 10px; font-size: 13px; }

.bill-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.bill-btn-row .btn { flex: 1; font-size: 12px; padding: 8px 10px; }

/* Nond links */
.nond-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nond-link {
  color: var(--purple);
  text-decoration: none;
  font-size: 12px;
  font-family: var(--font-mr);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.nond-link:hover { text-decoration: underline; }
.nond-link.orange { color: var(--orange); }

/* Shetimal Table */
.shetimal-table-wrapper {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.shetimal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.shetimal-table th {
  background: #b0bec5;
  padding: 8px 6px;
  text-align: center;
  font-family: var(--font-mr);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.shetimal-table td {
  padding: 6px;
  border-bottom: 1px solid #eceff1;
  font-family: var(--font-mr);
  text-align: center;
}

.shetimal-table tr:hover td { background: #f5f5f5; }

.shetimal-table .item-col { text-align: left; }

/* Charges section */
.charges-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 0;
}

.charges-grid label {
  font-size: 12px;
  font-family: var(--font-mr);
  text-align: right;
  white-space: nowrap;
}

.charges-grid .form-control {
  padding: 5px 8px;
  font-size: 12px;
}

/* Totals bar */
.totals-bar {
  padding: 8px 12px;
  background: #f5f5f5;
  border-top: 1px solid var(--grey-border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.total-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mr);
}

.total-item label { color: var(--grey-muted); }
.total-item span { font-weight: 600; color: var(--green); }

/* Preview action bar */
.preview-actions {
  display: flex;
  gap: 8px;
  padding: 8px 0 4px;
  justify-content: flex-end;
}

/* ── Farmer/Vendor/Item List ────────────────────────────── */
.list-page {
  min-height: 100vh;
  background: var(--grey-bg);
  padding: 16px;
}

.list-card {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 700px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-header {
  background: #c5cae9;
  padding: 14px 16px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-mr);
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-border);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 180px;
  position: relative;
}

.search-box .form-control { padding-left: 34px; }

.search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-muted);
}

.list-table-wrapper {
  max-height: 500px;
  overflow-y: auto;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.list-table th {
  background: #546e7a;
  color: white;
  padding: 10px 12px;
  font-family: var(--font-mr);
  position: sticky;
  top: 0;
  font-weight: 600;
}

.list-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-family: var(--font-mr);
}

.list-table tr:hover td { background: var(--green-pale); }

.action-btns { display: flex; gap: 6px; }

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.action-btn.edit { background: #fff3e0; color: var(--orange); }
.action-btn.delete { background: var(--red-pale); color: var(--red); }

/* ── Profile Page ───────────────────────────────────────── */
.profile-page {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.profile-section {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.profile-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--green);
  font-family: var(--font-mr);
  border-bottom: 2px solid var(--green-pale);
  padding-bottom: 8px;
}

.sub-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.sub-free { background: #fff3e0; color: var(--orange); }
.sub-3months { background: var(--blue-pale); color: var(--blue); }
.sub-6months { background: #e8f5e9; color: var(--green); }
.sub-annual { background: #f3e5f5; color: var(--purple); }

/* ── Reporting ──────────────────────────────────────────── */
.report-page {
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.report-table-wrapper {
  overflow-y: auto;
  max-height: 60vh;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table th {
  background: #546e7a;
  color: white;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  font-family: var(--font-mr);
  white-space: nowrap;
}

.report-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-family: var(--font-mr);
  text-align: right;
}

.report-table td:first-child, .report-table td:nth-child(2) { text-align: left; }

.report-table tfoot td {
  font-weight: 700;
  background: #eceff1;
  border-top: 2px solid var(--grey-text);
}

/* ── Dropdown with Search ───────────────────────────────── */
.custom-select-wrapper {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1.5px solid #c8e6c9;
  border-radius: var(--radius);
  cursor: pointer;
  background: white;
  font-family: var(--font-mr);
  font-size: 13px;
  color: var(--grey-text);
  user-select: none;
}

.custom-select-trigger:focus { outline: none; border-color: var(--green-light); }
.custom-select-trigger .placeholder { color: var(--grey-muted); }

.custom-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 500;
  max-height: 220px;
  display: none;
  flex-direction: column;
}

.custom-dropdown.open { display: flex; }

.custom-dropdown .dd-search {
  padding: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.custom-dropdown .dd-search input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mr);
}

.custom-dropdown .dd-list {
  overflow-y: auto;
  flex: 1;
}

.custom-dropdown .dd-option {
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--font-mr);
  font-size: 13px;
  transition: background 0.1s;
}

.custom-dropdown .dd-option:hover { background: var(--green-pale); }
.custom-dropdown .dd-option.selected { background: var(--green-pale); font-weight: 600; }
.custom-dropdown .dd-option.highlighted { background: #e3f2fd; }

/* ── Bill Preview (iframe content) ─────────────────────── */
.bill-preview-content {
  font-family: 'Noto Sans Devanagari', monospace;
  font-size: 12px;
  width: 100%;
  padding: 10px;
  color: #212121;
}

.bill-preview-content .bill-header {
  text-align: center;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.bill-preview-content .bill-header p {
  font-size: 11px;
  line-height: 1.5;
  margin: 1px 0;
}

.bill-preview-content .bill-header .company-name {
  font-size: 13px;
  font-weight: 700;
}

.bill-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
}

.bill-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin: 6px 0;
}

.bill-items-table th, .bill-items-table td {
  border: 0.5px solid #888;
  padding: 4px 5px;
  font-family: var(--font-mr);
}

.bill-items-table th { background: #e0e0e0; font-weight: 600; }
.bill-items-table .num { text-align: right; }

.bill-charges {
  width: 100%;
  font-size: 11px;
  margin-top: 4px;
}

.bill-charges td { padding: 3px 4px; }
.bill-charges .label-col { font-family: var(--font-mr); }
.bill-charges .val-col { text-align: right; }
.bill-charges .total-row { font-weight: 700; border-top: 1px solid #333; }

.bill-sign { text-align: right; margin-top: 20px; font-family: var(--font-mr); font-size: 11px; }

/* ── Modal / Dialog ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show { display: flex; }

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.modal-box h3 {
  font-family: var(--font-mr);
  margin-bottom: 12px;
  color: var(--grey-text);
}

.modal-box p {
  font-family: var(--font-mr);
  font-size: 14px;
  color: var(--grey-muted);
  margin-bottom: 16px;
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Toast Notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-family: var(--font-mr);
  font-size: 13px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: var(--green-pale); color: #1b5e20; border-left: 4px solid var(--green); }
.toast.error { background: var(--red-pale); color: var(--red); border-left: 4px solid var(--red); }
.toast.info { background: var(--blue-pale); color: var(--blue); border-left: 4px solid var(--blue); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .tx-layout {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .tx-left, .tx-right {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--grey-border);
  }
  .tx-top { flex-direction: column; }
  .tx-left { order: 2; }
  .tx-right { order: 1; }

  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar:hover { width: var(--sidebar-collapsed); }
  
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--green);
    font-size: 22px;
    cursor: pointer;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .nond-links { grid-template-columns: 1fr; }
  .charges-grid { grid-template-columns: auto 1fr; }
}

/* ── Subscription highlight ─────────────────────────────── */
.sub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.sub-row.active { background: var(--green-pale); }
.sub-row.expired { background: var(--red-pale); }
.sub-row.warning { background: #fff3e0; }

/* ── Print ──────────────────────────────────────────────── */
@media print {
  body { background: white; }
  .no-print { display: none !important; }
  .bill-preview-content { font-size: 10px; }
}

/* ── Utility ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mr { font-family: var(--font-mr); }
.text-muted { color: var(--grey-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.fw-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ── Select2-like custom select ─────────────────────────── */
.select-disabled .custom-select-trigger {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}
