/* Telefonos nézet = AfrConta Android-app, a SmartBill Android-app kinézete szerint.
   Csak keskeny képernyőn él; a számítógépes nézetet nem érinti. */
.m-nav, .m-dash, .m-fab, .m-filter-btn, .m-cfg, .m-filter-ok, .m-plist, .m-search-btn { display: none; }
@media (max-width: 760px) {
  :root { --m-blue: #1c92d8; --m-link: #2c8cc6; --m-green: #66c472; --m-drawer: #303030; --m-drawer-h: #404040; }
  body { font-family: Roboto, "Segoe UI", system-ui, sans-serif !important; background: #ececec !important; }

  /* felső sáv */
  .konytop { background: var(--m-blue) !important; color: #fff !important; height: 64px; min-height: 64px; padding: 0 8px 0 4px !important; gap: 6px; left: 0 !important; }
  .konytop .konyburger, .konytop .apk-update-button { color: #fff !important; width: 52px; height: 52px; }
  .konytop .konybrand { color: #fff !important; font-size: 1.35rem !important; font-weight: 500 !important; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .konytop .konysearch, .konytop .sb-quick, .konytop .sb-company { display: none !important; }
  .m-filter-btn { display: none; background: none; border: 0; color: #fff; width: 48px; height: 48px; padding: 10px; }
  body:has(.doc-filters) .m-filter-btn { display: block; }
  body.m-filters .konytop .konysearch.local-search { display: block !important; position: fixed; top: 64px; left: 0; right: 0; padding: 8px 12px; background: #fff; z-index: 30; }
  .sb-golive { font-size: .8rem; padding: 6px 12px !important; }

  /* oldalmenü */
  #konyDrawer { background: var(--m-drawer) !important; width: 82vw !important; max-width: 340px; padding: 0 !important; }
  #konyDrawer > :not(.m-nav) { display: none !important; }
  .m-nav { display: block; color: #fff; }
  .m-nav-h { background: var(--m-drawer-h); padding: 30px 12px 30px 12px; font-size: 1.2rem; letter-spacing: .2px; }
  body.menu-open .m-fab { display: none; }
  .m-grp { border-bottom: 1px solid #484848; }
  .m-nav a, .m-nav button { display: flex !important; align-items: center; gap: 30px; width: 100%; padding: 13px 18px !important; color: #fff !important; background: none !important;
    border: 0; font: inherit; font-size: 1.12rem; text-align: left; text-decoration: none; box-shadow: none !important; border-radius: 0 !important; }
  #konyDrawer .m-nav a.on { background: #3d3d3d !important; box-shadow: none !important; font-weight: 400 !important; }
  .m-nav a, .m-nav button { min-height: 0 !important; line-height: 1.3 !important; font-weight: 400 !important; }
  .m-nav span { flex: 1; white-space: nowrap; font-size: 1.12rem !important; font-weight: 400 !important; color: #fff !important; margin: 0 !important; }
  .m-nav svg { width: 28px; height: 28px; color: #6e6e6e; flex: none; }
  .m-nav form { margin: 0; }
  .m-nav button { justify-content: flex-start !important; }
  .m-nav button > * { margin: 0 !important; }
  main > form[action="/invoices"]:not(.m-filt) { display: none; }
  body.m-filters main > form[action="/invoices"] { display: block; padding: 8px 12px; background: #fff; }
  body:not(.is-app) .m-nav .konyapp { display: none !important; }

  /* kerek + gomb */
  .m-fab { display: block; position: fixed; right: 18px; bottom: 22px; z-index: 40; }
  .m-fab > summary { list-style: none; width: 60px; height: 60px; border-radius: 50%; background: var(--m-blue); color: #fff; font-size: 2.2rem; line-height: 58px;
    text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,.3); cursor: pointer; }
  .m-fab > summary::-webkit-details-marker { display: none; }
  .m-fab[open] > summary { transform: rotate(45deg); }
  a.m-fab-link { width: 60px; height: 60px; border-radius: 50%; background: var(--m-blue); color: #fff !important; font-size: 2.2rem; line-height: 58px; text-align: center; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
  .m-fab-menu { position: absolute; right: 0; bottom: 72px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.25); min-width: 190px; }
  .m-fab-menu a { display: block; padding: 15px 20px; color: #212121; text-decoration: none; font-size: 1.05rem; border-bottom: 1px solid #eee; }
  .doc-add, .doc-action { display: none !important; }
  main { padding-bottom: 96px !important; }

  /* Dashboard */
  .sb-dash { display: none !important; }
  .m-dash { display: block; padding: 6px 6px 0; }
  .m-card { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); margin: 0 0 12px; padding: 18px 18px 22px; border-radius: 2px; }
  .m-card-h { display: flex; justify-content: space-between; align-items: center; }
  .m-card h3 { margin: 0; font-size: 1.3rem; font-weight: 400; color: #212121; text-transform: none; letter-spacing: 0; }
  .m-more { color: #757575; font-size: 1.4rem; text-decoration: none; padding: 0 4px; }
  .m-period { border: 0 !important; background: none !important; color: #757575; font-size: 1rem; padding: 8px 0 !important; margin: 4px 0 0 !important; width: auto !important; box-shadow: none !important; }
  .m-sub { color: #757575; margin: 12px 0 0; }
  .m-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 10px; }
  .m-val { display: block; font-size: 1.9rem; font-weight: 400; color: #212121; margin-top: 8px; }
  .m-spark { width: 45%; height: 36px; }
  .m-two { display: flex; justify-content: space-between; margin-top: 22px; }
  .m-two small { display: block; color: #212121; font-size: 1rem; margin-bottom: 4px; }
  .m-two b { font-size: 1.9rem; font-weight: 400; color: #212121; display: flex; align-items: center; gap: 8px; }
  .m-two .r { text-align: right; }
  .m-bar-l { display: flex; justify-content: space-between; margin-top: 8px; font-size: 1.05rem; color: #212121; }
  .m-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #00a69c; margin-top: 10px; }
  .m-bar i { background: var(--m-blue); border-right: 2px solid #fff; }
  .m-bar i.t { flex: 1; background: #00a69c; border: 0; }
  .m-add button { width: 100%; background: none; border: 0; display: grid; justify-items: center; gap: 10px; color: var(--m-link); font: inherit; font-size: 1.15rem; padding: 6px 0; }

  /* listák (Facturi, Incasari) */
  .doc-filters { display: none !important; }
  body.m-filters .doc-filters { display: block !important; margin: 0 0 8px !important; }
  body.m-filters .doc-filters .chips { padding: 10px; }
  .sb-report.sb-scrollbox { display: none !important; }
  .doc-list { display: block !important; margin: -8px -12px 0 !important; background: #fff; border: 0 !important; box-shadow: none !important; }
  main:has(.doc-list) { padding-left: 0 !important; padding-right: 0 !important; }
  main:has(.doc-list) .doc-list { margin: 0 !important; }
  .doc-month { background: #eeeeee !important; color: #212121 !important; padding: 16px 16px !important; font-size: 1.15rem; border: 0 !important; border-bottom: 1px solid #ddd !important; }
  .doc-month strong { font-weight: 400 !important; }
  .doc-row { border-bottom: 1px solid #ddd !important; background: #fff; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .doc-row { background: #fefefe !important; }
  .doc-row:nth-of-type(even) { background: #fcfcfc !important; }
  .doc-link { padding: 14px 16px !important; display: flex !important; justify-content: space-between; gap: 12px; text-decoration: none; }
  .doc-link b { color: var(--m-link) !important; font-weight: 400 !important; text-transform: uppercase; font-size: 1.15rem; }
  .doc-link small { color: #212121 !important; font-size: 1.05rem !important; }
  .doc-value { text-align: right; color: #212121; font-size: 1.05rem; white-space: nowrap; }
  .doc-value .doc-tag { display: inline-block; margin-top: 2px; background: var(--m-green) !important; color: #fff !important; font-size: .85rem !important; padding: 1px 10px !important; line-height: 1.5; }
  .doc-value { display: flex; flex-direction: column; align-items: flex-end; }
  .doc-value .doc-tag.late { background: #f0ad4e !important; }
  .doc-value .doc-tag.cancelled { background: #9e9e9e !important; }
  .doc-value .doc-tag.blue { background: var(--m-blue) !important; }
}

@media (max-width: 760px) {
  /* Configurari lista: a nyitóoldalon csak a lista látszik */
  main:has(.m-cfg) { padding: 0 !important; }
  main:has(.m-cfg) > :not(.m-cfg) { display: none !important; }
  .m-cfg { display: block; background: #fff; }
  .m-cfg h4 { margin: 0; padding: 22px 18px 6px; color: #1c92d8; font-size: 1.05rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
  .m-cfg-i { display: flex; align-items: center; gap: 30px; padding: 16px 18px; border-bottom: 1px solid #e0e0e0; color: #212121 !important; text-decoration: none; font-size: 1.2rem; }
  .m-cfg-i svg { width: 30px; height: 30px; color: #4a4a4a; flex: none; }
  .m-cfg-i small { display: block; color: #9e9e9e; font-size: 1rem; margin-top: 2px; }
  body:not(.is-app) .m-cfg .konyapp { display: none; }
  body:has(.m-cfg) .m-fab, body:has(.sb-tabs) .m-fab { display: none; }
  .sb-tabs { display: none !important; }
}

/* Filtrare facturi */
.m-filt { max-width: 760px; display: grid; gap: 14px; }
.m-filt-card { background: #fff; border: 1px solid #e3e3e3; padding: 8px 18px; }
.m-filt-search { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #ccc; padding: 10px 0; }
.m-filt-search input { border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 6px 0 !important; font-size: 1.1rem; flex: 1; min-width: 0; background: none !important; }
.m-filt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 12px; padding: 12px 0; }
.m-filt-row > label, .m-filt-row > span, .m-filt-two label { color: #424242; font-size: 1.05rem; font-weight: 400 !important; }
.m-filt-row select, .m-filt-row input, .m-filt-two input { margin: 0 !important; border: 0 !important; border-bottom: 1px solid #ccc !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; font-size: 1.05rem; padding: 8px 4px !important; }
.m-filt-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 8px 0 14px; }
.m-filt input, .m-filt select { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.m-filt, .m-filt-card { min-width: 0; max-width: 100%; box-sizing: border-box; }
.m-filt-two label { display: block; margin-bottom: 4px; }
.m-filt-sec > summary, .m-filt-h { color: #1c92d8; font-size: 1.1rem; font-weight: 500; margin: 6px 4px 8px; list-style: none; cursor: pointer; text-transform: none; letter-spacing: 0; }
.m-filt-sec > summary::after { content: "⌃"; float: right; }
.m-filt-sec:not([open]) > summary::after { content: "⌄"; }
.m-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #ddd; }
.m-seg label { margin: 0; position: relative; }
.m-seg input { position: absolute; opacity: 0; pointer-events: none; left: 0; top: 0; width: 1px !important; height: 1px; margin: 0 !important; }
.m-seg span { display: block; text-align: center; padding: 10px 4px; cursor: pointer; font-size: 1.05rem; color: #212121; }
.m-seg input:checked + span { background: #1c92d8; color: #fff; }
.m-seg input:focus-visible + span { outline: 2px solid #1c92d8; }
.m-filt-actions { display: flex; gap: 12px; justify-content: flex-end; }
@media (max-width: 760px) {
  .m-filter-ok { display: block; background: none; border: 0; color: #fff; padding: 8px; margin-left: auto; }
  .m-filter-link { display: block !important; color: #fff !important; padding: 10px; }
  .m-filter-link.on { background: rgba(255,255,255,.18); border-radius: 50%; }
  body:has(.m-filt) .m-fab, body:has(.m-filt) .sb-golive { display: none; }
  main:has(.m-filt) { background: #ececec; padding: 8px !important; }
  .m-filt-actions { display: none; }
}

/* dátumválasztó (görgethető kerekek, mint a SmartBill appban) */
.m-lbl { display: block; color: #424242; font-size: 1.05rem; margin-bottom: 6px; }
.m-date { width: 100%; background: none; border: 0; border-bottom: 1px solid #ccc; padding: 8px 4px; font: inherit; font-size: 1.15rem; color: #616161; text-align: center; cursor: pointer; }
.m-dlg-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: grid; place-items: center; padding: 16px; }
.m-dlg { background: #fff; width: min(400px, 100%); padding: 22px 24px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); border-radius: 2px; }
.m-dlg h3 { margin: 0 0 14px; font-size: 1.35rem; font-weight: 500; color: #212121; text-transform: none; letter-spacing: 0; }
.m-wheels { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 4px; position: relative; }
.m-wheel { height: 192px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; position: relative; }
.m-wheel::-webkit-scrollbar { display: none; }
.m-wheel .pad { height: 64px; }
.m-wheel .it { height: 64px; line-height: 64px; text-align: center; scroll-snap-align: center; font-size: 1.3rem; color: #a5d3f2; cursor: pointer; }
.m-wheel .it.on { color: #1c92d8; }
/* kék vonalak oszloponként a kijelölt sor fölött és alatt */
.m-wheels { background:
  linear-gradient(#42a5f5, #42a5f5) 0 62px / 31% 2px no-repeat, linear-gradient(#42a5f5, #42a5f5) 0 128px / 31% 2px no-repeat,
  linear-gradient(#42a5f5, #42a5f5) 50% 62px / 31% 2px no-repeat, linear-gradient(#42a5f5, #42a5f5) 50% 128px / 31% 2px no-repeat,
  linear-gradient(#42a5f5, #42a5f5) 100% 62px / 34% 2px no-repeat, linear-gradient(#42a5f5, #42a5f5) 100% 128px / 34% 2px no-repeat; }
.m-dlg-btn { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.m-dlg-btn button { background: none; border: 0; color: #1c92d8; font: inherit; font-size: 1.05rem; font-weight: 600; padding: 12px 14px; cursor: pointer; letter-spacing: .3px; }
/* szűrőoldal fejléce: vissza nyíl, alaphelyzet, ✓ */
.m-back, .m-reset { display: none; }
@media (max-width: 760px) {
  body:has(.m-filt) .konyburger { display: none !important; }
  .m-back { display: block; color: #fff !important; padding: 12px 10px 12px 8px; }
  .m-reset { display: block; color: #fff !important; padding: 10px; margin-left: auto; }
  .m-reset + .m-filter-ok { margin-left: 0; }
}

/* Clienti lista (SmartBill app) */
@media (max-width: 760px) {
  .m-search-btn { display: block; background: none; border: 0; color: #fff; padding: 10px; margin-left: auto; }
  main:has(.m-plist) { padding: 0 !important; }
  main:has(.m-plist) > :not(.m-plist) { display: none !important; }
  .m-plist { display: block; background: #fff; }
  .m-prow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 16px; border-bottom: 1px solid #ddd; text-decoration: none; background: #fefefe; }
  .m-prow:nth-child(even) { background: #fcfcfc; }
  .m-prow b { display: block; color: #2c8cc6; font-weight: 400; font-size: 1.15rem; text-transform: uppercase; }
  .m-prow small { display: block; color: #212121; font-size: 1.05rem; margin-top: 2px; }
  .m-prow em { font-style: normal; color: #212121; font-size: 1.05rem; white-space: nowrap; }
}

@media (max-width: 760px) {
  .m-prow b.nocase { text-transform: none; }
  /* Registru casa */
  .m-cash-cur { display: flex; justify-content: space-between; align-items: center; padding: 22px 16px; font-size: 1.25rem; }
  .m-cash-cur span { color: #757575; font-weight: 600; } .m-cash-cur b { font-weight: 700; color: #212121; }
  .m-cash-day { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; background: #eeeeee; padding: 16px; font-size: 1.1rem; border-top: 2px solid #e0e0e0; }
  .m-cash-day .lbl { color: #9e9e9e; }
  .m-cash-row { padding: 14px 16px; border-bottom: 1px solid #ddd; background: #fefefe; }
  .m-cash-row:nth-child(even) { background: #fcfcfc; }
  .m-cash-row .t { display: grid; grid-template-columns: 1fr 40px auto; align-items: center; }
  .m-cash-row b { color: #2c8cc6; font-weight: 400; font-size: 1.15rem; }
  .m-cash-row i { color: #1c92d8; font-style: normal; font-size: 1.3rem; text-align: center; }
  .m-cash-row small { display: block; color: #9e9e9e; font-size: .98rem; margin-top: 6px; }
  /* Cheltuieli */
  .m-tabs { display: flex; background: #1c92d8; overflow-x: auto; margin: -1px 0 0; }
  .m-tabs button { background: none; border: 0; color: #bfe3fa; font: inherit; font-size: 1rem; padding: 14px 16px; white-space: nowrap; border-bottom: 3px solid transparent; letter-spacing: .3px; }
  .m-tabs button.on { color: #fff; border-bottom-color: #fff; }
  .m-grp-h { display: flex; justify-content: space-between; background: #eeeeee; padding: 16px; font-size: 1.15rem; border-bottom: 1px solid #ddd; }
  .m-erow { border-left: 5px solid #1c92d8; }
  .m-erow.paid { border-left-color: transparent; }
  .m-erow em { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .m-erow em i { font-style: normal; color: #fff; font-size: .85rem; padding: 1px 10px; background: #1c92d8; }
  .m-erow em i.late { background: #f0ad4e; } .m-erow em i.ok { background: #66c472; }
}

@media (max-width: 760px) {
  .m-erow.chk { border-left-color: transparent; }
  .m-erow em i.chk { background: #9e9e9e; }
}
