.total-table {
  margin: 32px auto 24px auto;
  background: #e0ffe0;
  color: #388e3c;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(56,142,60,0.08);
  font-size: 1.3em;
  font-family: 'Exo 2', Arial, sans-serif;
  font-weight: 700;
  text-align: center;
  min-width: 260px;
  max-width: 400px;
}
.total-table td {
  padding: 18px 32px;
  border: none;
}
.col-rem, .money.rem {
  background: #fff8c6;
  color: #b88600;
}
.col-desc, .money.desc {
  background: #ffe0e0;
  color: #c62828;
}
.col-total, .money.total {
  background: #e0ffe0;
  color: #388e3c;
}
/* Fuentes Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700&family=Montserrat:wght@400&display=swap');

body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: #fff3e0;
  color: #4e2600;
  margin: 0;
}
h1, h2, h3, th {
  font-family: 'Exo 2', Arial, sans-serif;
  font-weight: 700;
  color: #FF6500;
}
.panel, .container, .datos-grid, td, .meta, .rec-card, .btn, .footer-fixed, label, input, p, .table-responsive, .money {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 400;
}
/* Menú responsivo */
.topbar {
  background: #ffa233;
  color: #fff;
  padding: 0;
  position: relative;
  z-index: 10;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Exo 2', Arial, sans-serif;
  font-weight: 700;
  color: #FF6500;
}
.header-brand img { max-width: 48px; }
.topnav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 1.08em;
}
.nav-item {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}
.nav-item:hover {
  background: #FF6500;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 2em;
  color: #FF6500;
  margin-left: auto;
  margin-right: 12px;
  cursor: pointer;
}
@media (max-width: 700px) {
  .topnav {
    display: none !important;
    flex-direction: column;
    background: #ffa233;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 100;
  }
  .topnav.show {
    display: flex !important;
  }
  .hamburger {
    display: block !important;
    position: absolute;
    right: 12px;
    top: 8px;
    z-index: 101;
  }
}
@media (max-width: 900px) and (min-width: 601px) {
  .topnav .nav-item span {
    display: none;
  }
}
@media (max-width: 700px) {
  .topnav .nav-item span {
    display: inline;
  }
}
@media (min-width: 901px) {
  .topnav .nav-item span {
    display: inline;
  }
}
.btn {
  background: #ffa233;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 1em;
  cursor: pointer;
  font-family: 'Exo 2', 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  transition: background 0.2s;
}
.btn:active {
  background: #FF6500;
}
.btn.danger {
  background: #FF8A08;
}
a {
  color: #FF6500;
}
/* Panel y container */
.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 24px;
  margin: 32px auto;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.table-responsive {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
th, td {
  padding: 8px 10px;
  text-align: left;
}
th {
  background: #ffa233;
  color: #fff;
}
tr:nth-child(even) { background: #fff3e0; }
.right { text-align: right; }
.money { font-weight: 600; color: #FF6500; }

/* Cards para mobile recibos */
.rec-card-list { display: flex; flex-direction: column; gap: 16px; }
.rec-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(255,101,0,0.08);
  padding: 18px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rec-card h3 { color: #FF6500; font-size: 1.1em; margin-bottom: 8px; }
.rec-card .meta { font-size: 0.98em; margin-bottom: 2px; }
.rec-card .actions { display: flex; gap: 8px; margin-top: 8px; }

/* Responsive grid para mis_datos */
.datos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .datos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .datos-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px 6px; }
}

/* Responsive tabla recibos */
.desktop-only { display: block; }
.tablet-only, .mobile-only { display: none; }
@media (max-width: 900px) {
  .desktop-only { display: none; }
  .tablet-only { display: block; }
}
@media (max-width: 600px) {
  .tablet-only { display: none; }
  .mobile-only { display: block; }
}
/* Global styles for Municipalidad - header, layout, forms, tables, footer */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700&family=Montserrat:wght@400;600;700&display=swap');
:root{
  --primary: #ef6c00; /* Orange */
  --surface: #ffffff;
  --on-surface: #222;
  --muted: #6b7280;
  --brand-font: 'Exo 2', 'Montserrat', Arial, sans-serif;
  --card-shadow: 0 4px 18px rgba(12, 12, 12, 0.06);
}

/* Reset and base */
*{box-sizing:border-box}
html,body{height:100%}
body{font-family:var(--brand-font);background:#fbfaf8;color:var(--on-surface);margin:0;padding:0}
.page-wrap{padding:88px 20px 28px; overflow-x:hidden}
.container{max-width:1100px;margin:0 auto}

/* Topbar / header */
.topbar{position:fixed;top:0;left:0;right:0;height:64px;background:var(--surface);display:flex;align-items:center;justify-content:space-between;padding:8px 20px;box-shadow:0 2px 10px rgba(0,0,0,0.04);z-index:100}
.header-brand{display:flex;align-items:center;gap:12px}
.header-brand img{height:44px}
.header-brand a{font-weight:700;color:var(--primary);text-decoration:none;font-size:18px}

/* Card and responsive helpers */
.card { background: #fff; border-radius:10px; box-shadow: var(--card-shadow); padding:16px; margin-bottom:16px }
.table-responsive{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
/* Make tables clean and borderless for print and mobile */
table{width:100%;border-collapse:collapse;background:transparent}
th,td{padding:10px 8px;border-bottom:0;text-align:left}
thead th{background:transparent;color:#444}
table thead th{font-weight:600}

/* Buttons with FontAwesome icons */
.btn{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:8px;border:0;cursor:pointer;text-decoration:none;color:#fff;background:var(--primary);font-size:14px}
.btn.secondary{background:#6b7280}
.btn .fa{font-size:14px}

/* Small helpers */
.small{font-size:13px;color:var(--muted)}
.big-total{margin:18px 0;padding:12px;background:transparent;border-radius:6px;text-align:center;font-size:1.2em;font-weight:700}

/* Mobile adjustments: shrink typography and allow table scroll */
@media (max-width: 700px){
  body, .box{font-size:14px}
  .header-brand img{height:36px}
  .header-brand a{font-size:16px}
  th,td{padding:8px 6px}
  table thead th, table tbody td{font-size:12px}
  .btn{padding:8px 10px;font-size:13px}
}
@media (max-width:420px){
  table thead th, table tbody td{font-size:11px}
}

/* View mode helpers with transitions: table on desktop, cards on mobile.
   We avoid toggling display (which can't be animated) and instead animate
   opacity/max-height/transform so there's a smooth visual transition.
*/
/* Note: receipt/card/column-specific styling and view-mode helpers removed per user request.
   Kept global table and print-friendly rules intact so PHP/layout behavior is unaffected.
*/

.topnav{display:flex;gap:8px;align-items:center}
.topnav .nav-item{display:inline-flex;align-items:center;gap:8px;color:var(--primary);text-decoration:none;padding:8px 12px;border-radius:8px}
.topnav .nav-item:hover{background:rgba(239,108,0,0.06)}
.topnav .nav-item.active{background:linear-gradient(90deg, rgba(239,108,0,0.12), rgba(239,108,0,0.06));font-weight:600}
.topnav a{color:inherit;text-decoration:none}
.hamburger{display:none;border:none;background:transparent;font-size:20px}


/* Main layout */
.main{padding-top:12px}
.box{background:var(--surface);border-radius:10px;box-shadow:var(--card-shadow);padding:18px;margin-bottom:18px}
.panel{background:var(--surface);border-radius:8px;padding:18px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}

/* Forms */
label{display:block;margin-bottom:8px}
input,select,textarea{font-family:inherit;padding:10px;border-radius:8px;border:1px solid #e6e9ee;width:100%}
input:focus,select:focus,textarea:focus{outline:none;border-color:rgba(239,108,0,0.7);box-shadow:0 4px 18px rgba(239,108,0,0.08)}
.form-actions{margin-top:14px}
button{background:var(--primary);color:white;padding:10px 14px;border-radius:8px;border:none;cursor:pointer}
button.secondary{background:#f3f4f6;color:var(--on-surface)}

/* Tables */
.table-responsive{overflow:auto}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:12px;border-bottom:1px solid #f1f3f5;text-align:left}
thead th{background:#fafafa}
.money{text-align:right}

/* Utilities */
.rem{color:#2e7d32;font-weight:600}
.desc{color:#c62828;font-weight:600}
.small{font-size:13px;color:var(--muted)}
.center{text-align:center}
.right{text-align:right}

/* Big total displayed centered below the table */
.big-total{margin:18px 0;padding:18px;background:#fff;border-radius:8px;text-align:center;font-size:1.4em;font-weight:700;box-shadow:var(--card-shadow)}

/* Footer */
footer{background:var(--surface);border-top:1px solid #eee;padding:18px;margin-top:28px;text-align:center}

/* Responsive adjustments */
@media (max-width:900px){
  .container{padding:0 12px}
  .topnav{gap:6px}
}
@media (max-width:700px){
  /* Keep sheet padding reasonable on small screens */
  .receipt-sheet{padding:10px}
  table thead th, table tbody td{font-size:12px}

  /* Hide auxiliary columns on very small screens */
  .col-detalle, .col-cantidad, .col-porcentaje{display:none}

  /* Make codigo take left side and amounts the right side. Rem and Desc
     will appear adjacent so they read as a single grouped amount area
     while preserving their colors. */
  .col-codigo{width:40%;vertical-align:middle}
  .col-rem, .col-desc{width:auto;white-space:nowrap}

  /* Reduce spacing so the two amount columns appear visually grouped */
  th.col-rem, th.col-desc, td.col-rem, td.col-desc{padding-left:6px;padding-right:6px}

  /* Slightly smaller big total on mobiles */
  .big-total{font-size:1.1em}
  .hamburger:focus{outline:2px solid rgba(239,108,0,0.15)}
  .topnav{position:fixed;top:64px;right:12px;background:var(--surface);padding:10px;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,0.08);display:none;flex-direction:column;min-width:200px;z-index:120}
  .topnav.show{display:flex}
  /* ensure nav items fill width and are touch-friendly */
  .topnav .nav-item{display:block;padding:12px 14px;width:100%}
}

/* Login specific */
.login-box{max-width:480px;margin:28px auto}
.header-brand h2{margin:0}

/* small tweaks */
a{color:var(--primary)}

/* Breadcrumbs & layout helpers */
.breadcrumbs{background:#fff;padding:10px 14px;border-radius:6px;margin:18px 0;box-shadow:0 1px 3px rgba(0,0,0,0.03)}
.layout{display:flex;gap:16px;max-width:1200px;margin:0 auto;padding:16px}
.left-col{width:25%;min-width:200px}
.right-col{flex:1}

/* Ensure content under topbar is visible */
.page-content{padding-top:12px}