:root {
  --header-gradient: linear-gradient(135deg, #38bdf8 0%, #1e3a8a 100%);
  --orange: #3d60d4;
  --orange-2: #607feb;
  --green: #22c55e;
  --blue: #2f80ed;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #7c3aed;
  --pink: #e84ab5;
  --text: #242424;
  --muted: #7a7370;
  --soft: #f7f5f3;
  --line: #e7dfda;
  --white: #fff;
  --shadow: 0 8px 24px rgba(43, 33, 28, .09);
}

.page-header-gradient {
  background: var(--header-gradient) !important;
  color: #ffffff !important;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--soft);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.login-body { background: #fff; min-height: 100vh; display: grid; place-items: center; }

.login-shell {
  width: min(1390px, calc(100vw - 48px));
  min-height: 760px;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 140px;
  align-items: center;
}

.login-photo {
  height: 952px;
  max-height: calc(100vh - 48px);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.15), rgba(0,0,0,0)),
    url("https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1000&q=80") center/cover;
}

.login-card {
  width: 480px;
  padding: 58px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.035);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); text-decoration: none; }
.brand-login { width: 100%; justify-content: center; margin-bottom: 36px; transform: scale(1.22); }
.brand-mark {
  position: relative;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: var(--white);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(61, 96, 212, 0.25);
  flex-shrink: 0;
}
.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  display: none !important;
}
.brand-text { letter-spacing: -0.5px; font-size: 20px; line-height: 1; font-family: inherit; }
.brand-text b { color: var(--orange); font-weight: 700; }
.brand-text strong { color: var(--muted); font-weight: 500; }

.login-form { display: grid; gap: 12px; }
.login-form label { font-weight: 700; color: #2d3138; font-size: 14px; margin-top: 4px; }
.login-form input {
  width: 100%;
  height: 44px;
  border: 1px solid #cfcfcf;
  border-radius: 12px;
  padding: 0 18px;
  color: var(--text);
  outline: none;
  font-size: 16px;
}
.login-form input::placeholder { color: #a8abb3; }
.login-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,104,22,.12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.eye-button { position: absolute; right: 12px; top: 8px; width: 28px; height: 28px; border: 0; background: transparent; color: #797d84; cursor: pointer; }
.primary-button {
  height: 49px;
  border: 0;
  border-radius: 10px;
  margin-top: 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.register-link { display: block; text-align: center; color: var(--orange); font-weight: 800; margin-top: 22px; font-size: 14px; }
.login-note { color: #909196; text-align: center; font-size: 11px; line-height: 1.5; margin: 16px 20px 0; }
.login-error { margin: -16px 0 18px; padding: 10px 12px; border-radius: 10px; background: #fff0ed; color: #d73b18; font-weight: 700; font-size: 13px; }

.app-body { background: var(--soft); min-width: 1180px; }
.topbar {
  height: 64px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 16px 0 28px;
  border-bottom: 1px solid #eee8e4;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { width: 106px; flex: none; transform: scale(.72); transform-origin: left center; }
.topnav { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.nav-item {
  height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  color: #5e5d5f;
  font-weight: 700;
  white-space: nowrap;
}
.nav-item.active { background: var(--orange); color: #fff; }
.nav-icon { color: currentColor; display: grid; place-items: center; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.round-action, .avatar, .icon-only {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: #f4f5f7;
  color: #777;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.round-action.muted { background: #eef0f2; color: #85878b; }
.round-action.soft { background: #eff4fb; color: #6a7891; }
.avatar { border-radius: 50%; background: #ff9224; color: #fff; }
.user-box { border-left: 1px solid #e5e1de; padding-left: 16px; min-width: 128px; }
.user-box span { display: block; font-weight: 800; }
.user-box small { display: inline-block; padding: 6px 12px; border-radius: 18px; background: #eef4fb; color: #4d596a; font-size: 12px; margin-top: 2px; }
.app-main { padding: 24px; }

.panel, .hero-card, .stat-card, .quick-card, .metric-card, .operation-card, .report-card, .setting-card, .table-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
}
.hero-card {
  min-height: 143px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px;
}
.eyebrow { margin: 0 0 10px; color: #817a76; font-size: 12px; }
.hero-card h1 { margin: 0 0 12px; font-size: 29px; line-height: 1; }
.hero-card h1 span { color: var(--orange); }
.meta-line { display: flex; align-items: center; gap: 22px; color: #7a706b; font-size: 14px; }
.meta-line strong::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; margin-right: 9px; }
.meta-line i { width: 4px; height: 4px; border-radius: 50%; background: #ddd2cc; }
.hero-actions { display: flex; gap: 16px; align-items: center; }
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 15px; border-radius: 9px; font-weight: 800; font-size: 13px; }
.pill.warning, .pill.soft-orange { background: #fff2df; color: #ff9200; }
.pill.danger { background: #fff1f1; color: #ff3b30; border: 1px solid #ffb5b5; }
.pill.green { background: #eafff2; color: var(--green); border: 1px solid #a7efc4; }
.pill.red { background: #fff0f0; color: var(--red); border: 1px solid #ffc5c5; }
.primary-mini {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
  color: #fff;
  font-weight: 800;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; margin-top: 24px; }
.stat-card { min-height: 134px; padding: 16px; display: flex; gap: 16px; align-items: flex-start; }
.stat-card:first-child { background: #ffffff; color: var(--text); border-color: var(--line); }
.stat-card h3, .metric-card h3 { margin: 8px 0 20px; color: #77706b; font-size: 13px; }
.stat-card:first-child h3, .stat-card:first-child small { color: #77706b; }
.stat-card strong { display: block; font-size: 25px; margin-bottom: 8px; }
.stat-card small { color: #827973; font-size: 12px; }
.icon-badge { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; background: #fff2df; color: var(--orange); }
.icon-badge.green { background: #e8fbef; color: var(--green); }
.icon-badge.blue { background: #eaf3ff; color: var(--blue); }
.icon-badge.red { background: #ffeded; color: var(--red); }
.icon-badge.amber { background: #fff2df; color: var(--amber); }
.icon-badge.orange { background: #fff0e5; color: var(--orange); }
.icon-badge.purple { background: #f1e8ff; color: var(--purple); }
.icon-badge.pink { background: #ffe8f8; color: var(--pink); }
.icon-badge.gray { background: #f1f1f1; color: #7c7774; }

.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; }
.section-title { font-size: 20px; margin: 0 0 16px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 23px; }
.quick-card { min-height: 122px; padding: 15px; }
.quick-card h3 { margin: 10px 0 4px; font-size: 16px; }
.quick-card p, .panel p, .operation-card p, .report-card p, .setting-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; }
.wide-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.sale-cta, .delivery-card { min-height: 80px; border-radius: 12px; display: grid; align-items: center; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 13px 24px; box-shadow: var(--shadow); }
.sale-cta { background: linear-gradient(90deg, var(--orange), var(--orange-2)); color: #fff; }
.sale-cta span { width: 56px; height: 56px; border-radius: 10px; background: rgba(255,255,255,.22); display: grid; place-items: center; grid-row: span 2; }
.sale-cta b, .delivery-card b { font-size: 20px; }
.sale-cta small, .delivery-card small { grid-column: 2; font-size: 14px; }
.sale-cta em { font-style: normal; font-size: 28px; }
.delivery-card { background: #fff; border: 1px solid var(--line); }
.delivery-card em { padding: 7px 13px; border-radius: 18px; background: #f2f2f2; color: #777; font-style: normal; font-weight: 800; font-size: 12px; }
.sales-summary { margin-top: 24px; min-height: 288px; padding: 26px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head h2 { margin: 0; font-size: 21px; }
.soft-select { padding: 8px 14px; border-radius: 18px; background: #fafafa; color: #817a76; font-size: 12px; }
.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.summary-box { min-height: 78px; border-radius: 10px; padding: 18px; border: 1px solid; }
.summary-box span { display: block; color: #817a76; font-size: 12px; margin-bottom: 8px; }
.summary-box strong { font-size: 19px; }
.summary-box.green { background: #f2fff6; border-color: #d2f5df; color: var(--green); }
.summary-box.blue { background: #f3f8ff; border-color: #d7e9ff; color: var(--blue); }
.summary-box.orange { background: #fff8f2; border-color: #ffe0c7; color: var(--orange); }
.active-tables { padding: 24px; min-height: 310px; }
.empty-state { min-height: 200px; border: 1px solid #eee8e4; border-radius: 14px; display: grid; place-items: center; align-content: center; text-align: center; margin-top: 24px; }
.empty-state span, .kds-empty span { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fbfaf9; color: #827a75; }
.empty-state h3, .kds-empty h2 { margin: 16px 0 8px; }

.sales-layout { display: grid; grid-template-columns: 223px 1fr; min-height: calc(100vh - 88px); margin: -24px; }
.side-panel { background: #fff; border-right: 1px solid #eee8e4; padding: 24px 12px; }
.closed-alert { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; border-radius: 7px; background: #fff3f3; border: 1px solid #ffbebe; color: #ff3b30; font-weight: 800; font-size: 13px; }
.side-item { width: 100%; height: 45px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 13px; padding: 0 16px; margin-top: 20px; background: transparent; color: #b0aba9; font-weight: 700; }
.side-item.active { background: var(--orange); color: #fff; }
.sales-board { padding: 24px 28px; background: #fff; }
.zone-toolbar { display: flex; align-items: center; justify-content: space-between; }
.zone-tab { min-width: 620px; height: 39px; display: flex; align-items: center; padding-left: 16px; border-radius: 10px; background: #f7f5f3; box-shadow: inset 0 0 0 1px #f0ebe8; }
.zone-status { display: flex; align-items: center; gap: 13px; color: #7d7774; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.zoom-box { display: flex; height: 38px; align-items: center; border: 1px solid #dbe6f6; border-radius: 8px; overflow: hidden; color: #546277; }
.zoom-box button { width: 40px; height: 100%; border: 0; background: #f7fbff; color: inherit; }
.zoom-box b { padding: 0 16px; font-size: 13px; }
.board-empty { height: 620px; display: grid; place-items: center; color: #28313f; }
.table-map { min-height: 620px; padding: 48px; display: flex; gap: 22px; align-items: flex-start; }
.map-table {
  width: 118px;
  height: 96px;
  border: 1px solid #ccefd9;
  border-radius: 14px;
  background: #f1fff6;
  color: #148b43;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.map-table span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #dcf8e7; }

.cash-hero { min-height: 160px; display: flex; align-items: center; gap: 18px; padding: 34px; justify-content: space-between; }
.cash-hero > div:nth-child(2) { flex: 1; }
.cash-hero h1 { margin: 8px 0 6px; font-size: 29px; }
.cash-hero small { color: #7b7775; font-weight: 800; }
.back-circle { width: 41px; height: 41px; border-radius: 50%; background: #f4f4f5; display: grid; place-items: center; font-size: 34px; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: #b9b9b9; display: inline-block; margin-right: 16px; }
.cash-stats, .kds-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 26px; }
.metric-card { min-height: 150px; padding: 32px; }
.metric-card strong { font-size: 24px; color: currentColor; }
.metric-card.green { color: var(--green); }
.metric-card.red { color: var(--red); }
.metric-card.orange { color: var(--orange); }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 26px; }
.operation-card { min-height: 195px; padding: 30px; display: grid; grid-template-columns: 84px 1fr; gap: 28px; align-items: center; }
.operation-card > span { width: 84px; height: 84px; border-radius: 11px; display: grid; place-items: center; background: #eefbf2; color: var(--green); }
.operation-card button { grid-column: 1 / -1; height: 32px; border: 0; border-radius: 8px; color: #fff; font-weight: 800; background: currentColor; }
.operation-card.disabled { opacity: .55; }
.operation-card.disabled button { background: #cfcfcf; color: #888; }
.operation-card.green { color: var(--green); }
.operation-card.blue { color: var(--blue); }
.operation-card.orange { color: var(--orange); }
.movements { min-height: 120px; margin-top: 24px; padding: 36px; display: flex; justify-content: space-between; }
.movement-tabs { display: flex; gap: 14px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 24px; }
.page-heading h1 { margin: 0 0 6px; font-size: 25px; }
.page-heading p { margin: 0; color: var(--muted); }
.with-actions { align-items: flex-start; }
.kds-actions { display: flex; gap: 12px; }
.toggle-label { height: 44px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-weight: 700; background: #fff; }
.toggle-label input { display: none; }
.toggle-label span { width: 44px; height: 28px; border-radius: 16px; background: var(--orange); position: relative; }
.toggle-label span::after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: #fff; position: absolute; right: 3px; top: 3px; }
.outline-button, .select-button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #2d3544; font-weight: 700; padding: 0 18px; }
.kds-stats { grid-template-columns: repeat(3, 1fr); }
.kds-card { min-height: 80px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); display: grid; grid-template-columns: 44px auto; column-gap: 16px; align-items: center; padding: 16px; }
.kds-card strong { font-size: 22px; }
.kds-card p { margin: -16px 0 0 60px; color: var(--muted); font-size: 13px; grid-column: 1 / -1; }
.kds-empty { height: 620px; display: grid; place-items: center; align-content: center; text-align: center; }
.kds-empty span { background: #def8e7; color: var(--green); }

.products-heading { margin-top: 22px; }
.toolbar-actions, .product-filters { display: flex; gap: 14px; align-items: center; }
.product-filters { margin-bottom: 24px; }
.search-box { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: #777; }
.search-box input { width: 100%; border: 0; outline: 0; font-size: 16px; }
.table-panel { min-height: 715px; overflow: hidden; box-shadow: none; }
.table-header { height: 42px; display: grid; grid-template-columns: 2.2fr .7fr .7fr .7fr .9fr .9fr .4fr; align-items: center; border-bottom: 1px solid var(--line); padding: 0 16px; color: #817a76; font-weight: 800; font-size: 12px; }
.table-empty { height: 250px; display: grid; place-items: center; align-content: center; color: #7b7470; gap: 14px; }
.table-empty span { color: #b6b0ad; }
.table-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 2.2fr .7fr .7fr .7fr .9fr .9fr .4fr;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #f0ebe8;
  font-size: 14px;
}
.table-row small { display: block; color: #99918c; margin-top: 4px; }

.reports-heading { justify-content: flex-start; gap: 22px; }
.back-arrow { font-size: 34px; }
.report-refresh { margin-left: auto; color: var(--orange); font-size: 26px; }
.reports-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.report-card { min-height: 252px; padding: 30px 24px 24px; box-shadow: none; }
.report-top { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; }
.report-top h2 { margin: 0 0 8px; font-size: 20px; }
.report-top b { font-size: 30px; color: #827a75; }
.report-metric { height: 51px; margin-top: 88px; border: 1px solid currentColor; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: color-mix(in srgb, currentColor 8%, white); }
.report-card.orange { color: var(--orange); }
.report-card.blue { color: #2563eb; }
.report-card.green { color: #009f78; }
.report-card.red { color: var(--red); }
.report-card.purple { color: var(--purple); }
.report-card.pink { color: var(--pink); }
.report-card.gray { color: #817a76; opacity: .75; }
.report-card h2, .report-card p { color: var(--text); }
.report-card p { color: var(--muted); }

.settings-heading { margin: -10px -24px 20px; padding: 20px 12px 12px; background: #fff; }
.settings-heading h1 { margin: 0; font-size: 20px; }
.settings-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.branch-card { padding: 28px 24px 23px; }
.branch-main { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.branch-icon { width: 64px; height: 64px; border-radius: 17px; display: grid; place-items: center; background: var(--orange); color: #fff; }
.branch-main h2 { margin: 0 0 8px; }
.branch-main p, .branch-main small { color: var(--muted); display: block; margin: 0 0 6px; }
.branch-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.status-box { min-height: 62px; border-radius: 12px; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, white); display: grid; grid-template-columns: 24px 1fr; align-items: center; padding: 12px; }
.status-box b { font-size: 12px; color: #77716d; }
.status-box strong { grid-column: 2; }
.status-box.orange { color: var(--orange); }
.status-box.amber { color: var(--amber); }
.status-box.green { color: var(--green); }
.settings-group { margin-top: 26px; }
.group-title { height: 37px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.group-title h2 { font-size: 13px; margin: 0; }
.group-title span { width: 28px; height: 28px; border-radius: 50%; background: #f2ece8; display: grid; place-items: center; color: #817a76; font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.setting-card { min-height: 104px; padding: 16px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.setting-card h3 { margin: 0 0 6px; font-size: 16px; }
.setting-card b { font-size: 24px; color: #817a76; }
.setting-card.disabled { opacity: .35; box-shadow: none; background: transparent; border: 0; }

@media (max-width: 1100px) {
  .login-shell { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .login-photo { display: none; }
  .login-card { width: min(480px, 100%); margin: 0 auto; }
  .app-body { min-width: 0; }
  .topbar { overflow-x: auto; }
  .stats-grid, .quick-grid, .cash-stats, .action-grid, .reports-grid, .settings-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .wide-actions, .sales-layout { grid-template-columns: 1fr; }
  .side-panel { display: none; }
}

/* Modales generales de la aplicacion */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-container {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.15);
  transform: scale(0.9);
  transition: transform 0.2s ease;
  overflow: hidden;
}
.modal-overlay.open .modal-container {
  transform: scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 {
  margin: 0;
  font-size: 19px;
  color: var(--text);
}
.modal-close {
  background: none;
  border: 0;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: #2d3138;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  height: 40px;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  padding: 0 14px;
  outline: none;
  font-size: 15px;
}
.form-group textarea {
  height: 80px;
  padding: 10px 14px;
  resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,104,22,.12);
}
.btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-secondary {
  background: #f4f5f7;
  color: #555;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn:hover {
  opacity: 0.9;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success {
  background: var(--green);
}
.toast.error {
  background: var(--red);
}

/* --- Estilos del Drawer y Cabecera Móvil (MangoPOS style) --- */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
}

.mobile-only-icon {
    display: none !important;
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -290px;
    width: 290px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 10px 0 30px rgba(0,0,0,0.15);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-drawer.open {
    left: 0;
}

.drawer-header {
    background: var(--orange);
    color: #ffffff;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 20px;
    text-transform: uppercase;
}

.drawer-username {
    display: block;
    font-weight: 800;
    font-size: 15px;
}

.drawer-role {
    display: block;
    font-size: 12px;
    opacity: 0.85;
}

.drawer-branch-badge {
    align-self: flex-start;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.drawer-section-title {
    padding: 20px 20px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #8893a7;
    letter-spacing: 1px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
}

.drawer-item {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 20px;
    color: #3b4256;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.drawer-item:hover {
    background: #f7f5f3;
    color: var(--text);
}

.drawer-item.active {
    background: rgba(255, 104, 22, 0.08);
    color: var(--orange);
}

.drawer-item b {
    font-size: 18px;
    color: #b0aba9;
}

.drawer-icon {
    margin-right: 12px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.drawer-divider {
    border: 0;
    border-top: 1px solid #f0ebe8;
    margin: 16px 0 0;
}

.justify-between {
    justify-content: space-between;
}

/* --- Media Queries Responsivas --- */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
    .topnav {
        display: none !important;
    }
    .topbar {
        justify-content: space-between;
        padding: 0 16px;
    }
    .topbar .brand {
        position: absolute;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.85) !important;
        top: 50%;
        margin: 0;
    }
    .hide-mobile {
        display: none !important;
    }
    .mobile-only-icon {
        display: grid !important;
    }
}
