body{margin:0;background:#FBFAF8;font-family:'Geist',system-ui,sans-serif;color:#1D1F1E;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
*{box-sizing:border-box}
a{color:#2E5446;text-decoration:none}a:hover{color:#1F3A30;text-decoration:underline}
input,button,select,textarea{font-family:inherit}
/* Състояния при посочване и фокус (в прототипа: style-hover / style-focus) */
@media (hover:hover){
.hv-row:hover{background:#FBFAF8!important}
.hv-soft:hover{background:#F6F5F2!important}
.hv-white6:hover{background:rgba(255,255,255,0.6)!important}
.hv-white5:hover{background:rgba(255,255,255,0.5)!important}
.hv-btn:hover{background:#264639!important}
.hv-green:hover{color:#2E5446!important}
.hv-bd:hover{border-color:#E7E5E0!important}
}
.fc-login:focus{border-color:#2E5446!important;box-shadow:0 0 0 3px rgba(46,84,70,0.12)!important}
.fc-cell:focus{box-shadow:inset 0 0 0 2px #2E5446!important}
.fc-title:focus{border-color:#2E5446!important;background:#fff!important}
.fc-inv:focus{border-color:#2E5446!important;background:#fff!important}
.fc-field:focus{border-color:#2E5446!important}

/* ---------- Мобилен изглед (в прототипа няма; пренася същия дизайн към тесен екран) ---------- */
.m-only,.m-only-flex,.m-scrim{display:none!important}

/* таблет и телефон: менюто става плъзгащ се панел */
@media (max-width:860px){
  html,body{-webkit-tap-highlight-color:transparent}
  .m-shell{grid-template-columns:minmax(0,1fr)!important}
  .m-side{position:fixed!important;top:0;left:0;bottom:0;height:auto!important;width:272px;max-width:86vw;z-index:12;transform:translateX(-100%);transition:transform .22s ease;box-shadow:none}
  .m-side.open{transform:none;box-shadow:12px 0 40px rgba(0,0,0,0.16)}
  .m-scrim{display:block!important;position:fixed;inset:0;background:rgba(24,28,26,0.3);z-index:11}
  .m-navx{cursor:pointer}
  .m-only-flex{display:flex!important}
  .m-head{padding:0 16px!important;gap:10px!important}
  .m-body{padding:16px 16px 32px!important;gap:16px!important}
  .m-login{grid-template-columns:minmax(0,1fr)!important}
  .m-login-l{padding:24px 20px!important;min-height:100vh;min-height:100dvh;gap:28px}
  .m-hide-md{display:none!important}
  /* известията: на цялата ширина под горната лента */
  .m-pop{position:fixed!important;top:60px!important;left:8px!important;right:8px!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 76px)!important}
}

/* телефон: таблиците стават карти, прозорците — листове отдолу */
@media (max-width:640px){
  input,select,textarea{font-size:16px!important} /* без автоматично увеличение в iOS */
  .m-hide-sm{display:none!important}
  .m-search{width:100%!important}
  .m-only{display:inline!important}
  .m-row{gap:12px;padding:12px 16px!important}
  .m-row-co,.m-row-de{grid-template-columns:minmax(0,1fr) auto 26px!important}
  .m-row-cl{grid-template-columns:minmax(0,1fr) auto!important}
  .m-row-ta{grid-template-columns:24px minmax(0,1fr) auto!important}
  .m-row-us{grid-template-columns:minmax(0,1fr) auto!important;gap:10px 12px}
  .m-row-us>:first-child,.m-row-us>:last-child{grid-column:1/-1}
  .m-row-us>:last-child{justify-self:start!important}
  .m-row-log{grid-template-columns:minmax(0,1fr) 24px!important;gap:4px 12px!important;padding:12px 16px!important}
  .m-row-log>:nth-child(2),.m-row-log>:nth-child(3){grid-column:1/-1}
  .m-row-log>:nth-child(4){grid-row:1;grid-column:2}
  .m-dt{grid-template-columns:1fr 1fr!important}
  .m-dt>:first-child{grid-column:1/-1}
  .m-stack{grid-template-columns:minmax(0,1fr)!important}
  .m-sheet label,.m-sheet input,.m-sheet select,.m-sheet textarea{min-width:0;width:100%}
  .m-modal{align-items:flex-end!important;padding:0!important}
  .m-sheet{width:100%!important;border-radius:16px 16px 0 0!important;max-height:92vh;max-height:92dvh;overflow-y:auto!important;padding-bottom:env(safe-area-inset-bottom)}
}
