
/*
 * VivaVesta Studio 4.7.3
 * Kompletní mobilní vrstva celého systému.
 *
 * Tento soubor se načítá až po původních stylech. Proto může bezpečně
 * opravovat starší pevné šířky bez zásahu do desktopového vzhledu.
 */

:root{
  --vv-safe-top:env(safe-area-inset-top,0px);
  --vv-safe-right:env(safe-area-inset-right,0px);
  --vv-safe-bottom:env(safe-area-inset-bottom,0px);
  --vv-safe-left:env(safe-area-inset-left,0px);
}

html,
body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

body{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

img,
svg,
video,
iframe,
canvas{
  max-width:100%;
}

img,
video{
  height:auto;
}

.app,
.main,
.card,
.grid,
.top,
.actions,
.section-head,
.table-wrap,
.invoice,
.invoice-paper,
.offer,
.handover-page,
.handover-print-document,
.customer-card,
.inquiry-card,
.job-card,
.invoice-card,
.offer-card{
  min-width:0;
}

input,
select,
textarea,
button{
  max-width:100%;
}

a,
button,
input,
select,
textarea{
  -webkit-tap-highlight-color:transparent;
}

.vv-install-side,
.vv-install-mobile-button,
.vv-install-login{
  cursor:pointer;
}

.vv-install-side{
  width:100%;
  min-height:43px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 11px;
  border:1px solid rgba(216,189,120,.28);
  border-radius:11px;
  color:#f0d791;
  background:rgba(199,165,90,.10);
  font:inherit;
  font-size:11px;
  text-align:left;
}

.vv-install-side span{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:#17191d;
  background:#d7bb76;
  font-size:16px;
  font-weight:950;
}

.vv-install-mobile-button{
  display:none;
  flex:0 0 40px;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid #dfd4bc;
  border-radius:12px;
  color:#74571e;
  background:#fff8e7;
  font-size:20px;
  font-weight:950;
}

.vv-install-login{
  width:100%;
  min-height:45px;
  margin:12px 0 0;
  padding:11px 13px;
  border:1px solid #d8c17e;
  border-radius:11px;
  color:#6c511b;
  background:#fff8e7;
  font:inherit;
  font-size:12px;
  font-weight:900;
}

/* Instalační nápověda jako spodní panel na telefonu */
.vv-install-overlay{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:end center;
  padding:18px;
  padding-left:max(18px,var(--vv-safe-left));
  padding-right:max(18px,var(--vv-safe-right));
  padding-bottom:max(18px,var(--vv-safe-bottom));
  background:rgba(7,9,13,.64);
  backdrop-filter:blur(8px);
}

.vv-install-overlay[hidden]{
  display:none!important;
}

.vv-install-dialog{
  width:min(520px,100%);
  max-height:min(84vh,720px);
  overflow:auto;
  padding:19px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:21px;
  color:#fff;
  background:
    radial-gradient(circle at 92% 0,rgba(222,192,114,.25),transparent 38%),
    linear-gradient(145deg,#15181e,#292e37);
  box-shadow:0 28px 80px rgba(0,0,0,.42);
}

.vv-install-dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.vv-install-dialog-head small{
  color:#e1c77f;
  font-size:9px;
  letter-spacing:1.2px;
  font-weight:950;
}

.vv-install-dialog h2{
  margin:5px 0 4px;
  font:700 26px Georgia,serif;
}

.vv-install-dialog p{
  margin:0;
  color:#ccd1d9;
  font-size:12px;
  line-height:1.55;
}

.vv-install-close{
  flex:0 0 38px;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  color:#fff;
  background:rgba(255,255,255,.07);
  font-size:21px;
}

.vv-install-steps{
  display:grid;
  gap:9px;
  margin:17px 0;
}

.vv-install-step{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:11px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:13px;
  background:rgba(255,255,255,.055);
}

.vv-install-step span{
  width:33px;
  height:33px;
  display:grid;
  place-items:center;
  border-radius:10px;
  color:#181a1e;
  background:#dfc47f;
  font-weight:950;
}

.vv-install-step b{
  display:block;
  font-size:12px;
}

.vv-install-step small{
  display:block;
  margin-top:2px;
  color:#bfc5cf;
  font-size:10px;
  line-height:1.45;
}

.vv-install-dialog-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.vv-install-dialog-actions button{
  min-height:46px;
  border-radius:12px;
  font-weight:900;
}

.vv-install-primary{
  border:1px solid #b58b3d;
  color:#17191d;
  background:linear-gradient(145deg,#e0c57f,#b98c3a);
}

.vv-install-secondary{
  border:1px solid rgba(255,255,255,.15);
  color:#fff;
  background:rgba(255,255,255,.07);
}

.vv-mobile-toast{
  position:fixed;
  left:50%;
  bottom:calc(88px + var(--vv-safe-bottom));
  z-index:5100;
  width:min(430px,calc(100% - 28px));
  padding:12px 14px;
  border-radius:13px;
  color:#fff;
  background:#16794a;
  box-shadow:0 18px 45px rgba(0,0,0,.25);
  font-size:12px;
  font-weight:800;
  text-align:center;
  transform:translateX(-50%);
}

/* Desktopové tabulky zůstávají beze změny. */
@media screen and (max-width:900px){
  html{
    scroll-padding-top:82px;
  }

  body{
    padding-left:var(--vv-safe-left);
    padding-right:var(--vv-safe-right);
  }

  .app{
    width:100%!important;
    max-width:100%!important;
    grid-template-columns:1fr!important;
  }

  .main{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:
      calc(12px + var(--vv-safe-top))
      max(12px,var(--vv-safe-right))
      calc(94px + var(--vv-safe-bottom))
      max(12px,var(--vv-safe-left))!important;
  }

  .side{
    width:min(88vw,340px)!important;
    max-width:340px!important;
    padding-top:calc(20px + var(--vv-safe-top))!important;
    padding-bottom:calc(18px + var(--vv-safe-bottom))!important;
  }

  .mobile-brand{
    position:sticky!important;
    top:0!important;
    z-index:900!important;
    width:100%!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin:
      calc(-12px - var(--vv-safe-top))
      calc(-1 * max(12px,var(--vv-safe-right)))
      14px
      calc(-1 * max(12px,var(--vv-safe-left)))!important;
    padding:
      calc(9px + var(--vv-safe-top))
      max(10px,var(--vv-safe-right))
      9px
      max(10px,var(--vv-safe-left))!important;
    border-radius:0!important;
    background:rgba(246,245,241,.96)!important;
    box-shadow:0 8px 28px rgba(16,18,24,.10)!important;
    backdrop-filter:blur(14px)!important;
  }

  .mobile-home{
    min-width:0!important;
    flex:1 1 auto!important;
  }

  .mobile-home-text{
    min-width:0!important;
  }

  .mobile-home-text b,
  .mobile-home-text small{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .mobile-menu-toggle,
  .mobile-create-button,
  .vv-install-mobile-button{
    flex:0 0 40px!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
  }

  .vv-install-mobile-button{
    display:grid!important;
    place-items:center!important;
  }

  .top{
    width:100%!important;
    margin-bottom:16px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    align-items:stretch!important;
  }

  .top>div,
  .top h2,
  .sub,
  .eyebrow{
    min-width:0!important;
    max-width:100%!important;
  }

  .top h2{
    font-size:clamp(25px,8vw,34px)!important;
    line-height:1.12!important;
    overflow-wrap:anywhere;
  }

  .sub{
    font-size:12px!important;
    line-height:1.5!important;
    overflow-wrap:anywhere;
  }

  .actions,
  .top .actions,
  .invoice-toolbar,
  .job-toolbar,
  .offer-share-actions,
  .inquiry-phone-actions,
  .notification-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  .actions>*,
  .top .actions>*,
  .invoice-toolbar>*,
  .job-toolbar>*,
  .offer-share-actions>*,
  .inquiry-phone-actions>*,
  .notification-actions>*{
    min-width:0!important;
    width:100%!important;
  }

  .btn,
  button,
  input[type="submit"]{
    min-height:44px;
  }

  .btn{
    padding:10px 11px!important;
    white-space:normal!important;
    text-align:center!important;
    line-height:1.25!important;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea{
    width:100%!important;
    min-width:0!important;
    font-size:16px!important;
  }

  textarea{
    min-height:104px;
  }

  .card,
  .job-section,
  .field-section,
  .invoice-form-card,
  .smtp-settings-card,
  .notification-master,
  .notification-settings,
  .calendar-shell,
  .task-card,
  .vv-simple-workflow,
  .vv-context-guide-main,
  .vv-context-progress{
    width:100%!important;
    max-width:100%!important;
    padding:14px!important;
    border-radius:15px!important;
  }

  .grid,
  .grid.two,
  .grid.three,
  .form-grid,
  .form-grid.three,
  .job-detail-grid,
  .job-info-grid,
  .invoice-form-layout,
  .invoice-paper-grid,
  .customer-layout,
  .customer-data,
  .customer-stats,
  .inquiry-detail,
  .inquiry-info,
  .notification-layout,
  .security-grid,
  .smtp-grid,
  .comm-grid,
  .document-email-grid,
  .task-layout,
  .task-form-layout,
  .automation-settings-grid,
  .backup-hero,
  .handover-fields.two,
  .handover-summary-grid,
  .handover-signature-result{
    grid-template-columns:1fr!important;
  }

  .grid.cards,
  .dashboard-secondary-stats,
  .vv43-secondary-stats,
  .invoice-summary,
  .offer-summary,
  .inquiry-summary,
  .customer-stats,
  .calendar-summary,
  .comm-stat-grid,
  .economy-mini-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }

  .customer-cards,
  .inquiry-board,
  .job-board,
  .invoice-board,
  .offer-board,
  .vv43-dashboard,
  .vv43-quick-grid{
    grid-template-columns:1fr!important;
  }

  .section-head,
  .customer-head,
  .inquiry-card-top,
  .inquiry-card-bottom,
  .job-card-top,
  .job-card-bottom,
  .invoice-card-top,
  .invoice-card-bottom,
  .offer-card-top,
  .offer-card-bottom,
  .task-card-top,
  .notification-item-head,
  .handover-card-head,
  .offer-share-head,
  .inquiry-bulk-head{
    min-width:0!important;
    display:flex!important;
    flex-wrap:wrap!important;
    gap:9px!important;
    align-items:flex-start!important;
  }

  .section-head>*,
  .customer-head>*,
  .inquiry-card-top>*,
  .job-card-top>*,
  .invoice-card-top>*,
  .offer-card-top>*{
    min-width:0!important;
    max-width:100%!important;
  }

  .customer-card,
  .inquiry-card,
  .job-card,
  .invoice-card,
  .offer-card,
  .task-card,
  .notification-item{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .customer-card-actions,
  .job-card-actions,
  .invoice-card-actions,
  .task-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }

  .customer-card-actions>*,
  .job-card-actions>*,
  .invoice-card-actions>*,
  .task-actions>*{
    width:100%!important;
    min-width:0!important;
  }

  .job-pipeline,
  .job-status-choice-grid,
  .inquiry-bulk-grid,
  .chat-recipient-grid{
    width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow:visible!important;
  }

  .job-step,
  .job-status-choice,
  .inquiry-summary-card,
  .invoice-summary-card,
  .offer-summary-card,
  .job-summary-card,
  .alert-summary-card{
    min-width:0!important;
  }

  .filter,
  .filters,
  .task-filter,
  .calendar-head,
  .calendar-nav,
  .inquiry-bulk-selection,
  .invoice-email-form,
  .job-next-status-form{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
  }

  .filter>*,
  .filters>*,
  .task-filter>*,
  .calendar-nav>*,
  .invoice-email-form>*,
  .job-next-status-form>*{
    width:100%!important;
    min-width:0!important;
  }

  .invoice-paper-wrap,
  .invoice-paper,
  .invoice,
  .offer,
  .handover-page,
  .handover-print-document{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  .invoice-paper,
  .invoice,
  .offer,
  .handover-print-document{
    padding:14px!important;
  }

  .invoice-paper-head,
  .invoice-payment,
  .invoice-paper-total,
  .handover-print-document>header,
  .handover-print-section.two,
  .handover-print-signatures{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  .invoice-paper-brand,
  .invoice-paper-title,
  .invoice-payment-amount{
    width:100%!important;
    min-width:0!important;
    text-align:left!important;
  }

  .invoice-paper-facts,
  .handover-print-facts,
  .handover-print-stats,
  .handover-production-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .invoice-live{
    position:static!important;
    width:100%!important;
  }

  .invoice-items-table input,
  .invoice-items-table select,
  .offer-item-price,
  .offer-item-qty{
    width:100%!important;
    min-width:0!important;
  }

  .table-wrap{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }

  /* Všechny běžné tabulky se na telefonu změní na karty. */
  table.vv-mobile-card-table{
    width:100%!important;
    max-width:100%!important;
    display:block!important;
    border:0!important;
    border-collapse:separate!important;
  }

  table.vv-mobile-card-table thead{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    white-space:nowrap!important;
  }

  table.vv-mobile-card-table tbody{
    width:100%!important;
    display:grid!important;
    gap:10px!important;
  }

  table.vv-mobile-card-table tr{
    width:100%!important;
    max-width:100%!important;
    display:block!important;
    overflow:hidden!important;
    border:1px solid #e5e1d8!important;
    border-radius:13px!important;
    background:#fff!important;
    box-shadow:0 8px 24px rgba(18,21,28,.055)!important;
  }

  table.vv-mobile-card-table td{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:10px 11px!important;
    display:grid!important;
    grid-template-columns:minmax(92px,35%) minmax(0,1fr)!important;
    gap:10px!important;
    align-items:center!important;
    border:0!important;
    border-bottom:1px solid #eeeae1!important;
    white-space:normal!important;
    text-align:left!important;
    overflow-wrap:anywhere!important;
  }

  table.vv-mobile-card-table td:last-child{
    border-bottom:0!important;
  }

  table.vv-mobile-card-table td::before{
    content:attr(data-label);
    min-width:0;
    color:#858991;
    font-size:9px;
    letter-spacing:.55px;
    text-transform:uppercase;
    font-weight:950;
    overflow-wrap:anywhere;
  }

  table.vv-mobile-card-table td[data-label="Akce"],
  table.vv-mobile-card-table td:last-child{
    align-items:stretch!important;
  }

  table.vv-mobile-card-table td[data-label="Akce"]>*,
  table.vv-mobile-card-table td:last-child>.btn,
  table.vv-mobile-card-table td:last-child>form,
  table.vv-mobile-card-table td:last-child>form>.btn{
    width:100%!important;
  }

  table.vv-mobile-card-table td.vv-mobile-empty-cell{
    display:block!important;
    text-align:center!important;
  }

  table.vv-mobile-card-table td.vv-mobile-empty-cell::before{
    display:none!important;
  }

  /* Kalendář se vejde bez horizontálního posouvání. */
  .calendar-shell,
  .vv43-calendar-panel{
    overflow:hidden!important;
  }

  .calendar-grid,
  .calendar-weekdays,
  .vv43-calendar-grid,
  .vv43-calendar-week{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
  }

  .calendar-weekdays>*,
  .vv43-calendar-week>*{
    min-width:0!important;
    padding:4px 1px!important;
    font-size:8px!important;
    overflow:hidden!important;
  }

  .calendar-day{
    min-width:0!important;
    min-height:62px!important;
    padding:4px!important;
  }

  .calendar-day-number{
    font-size:10px!important;
  }

  .calendar-event{
    min-width:0!important;
    padding:2px 3px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:7px!important;
  }

  .calendar-more{
    font-size:7px!important;
  }

  .field-page,
  .handover-page{
    padding-bottom:calc(102px + var(--vv-safe-bottom))!important;
  }

  .field-hero,
  .handover-hero,
  .vv-help-hero,
  .vv-mobile-inquiry-inbox{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .field-kpis,
  .field-summary-grid,
  .handover-readiness{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .field-quick-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .field-bottom-nav,
  .mobile-role-nav{
    left:max(8px,var(--vv-safe-left))!important;
    right:max(8px,var(--vv-safe-right))!important;
    bottom:max(8px,var(--vv-safe-bottom))!important;
    width:auto!important;
    max-width:none!important;
  }

  .mobile-role-nav a,
  .mobile-role-nav button,
  .field-bottom-nav a{
    min-width:0!important;
    overflow:hidden!important;
    font-size:9px!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }

  .mobile-role-nav a span,
  .mobile-role-nav button span,
  .field-bottom-nav a span{
    font-size:18px!important;
  }

  .login-page{
    min-height:100svh!important;
    overflow-x:hidden!important;
  }

  .login-shell{
    width:100%!important;
    max-width:100%!important;
    min-height:100svh!important;
    display:block!important;
    padding:
      calc(14px + var(--vv-safe-top))
      max(12px,var(--vv-safe-right))
      calc(18px + var(--vv-safe-bottom))
      max(12px,var(--vv-safe-left))!important;
  }

  .login-intro{
    display:none!important;
  }

  .login-card{
    width:100%!important;
    max-width:520px!important;
    margin:0 auto!important;
    padding:19px!important;
    border-radius:18px!important;
  }

  .login-card-head{
    min-width:0!important;
  }

  .login-card form,
  .login-card .field,
  .login-submit,
  .login-demo-button{
    width:100%!important;
  }

  [style*="min-width"],
  [style*="width:850px"],
  [style*="width:900px"],
  [style*="width:1000px"]{
    max-width:100%!important;
  }

  .backup-name,
  .backup-checksum,
  .audit-action,
  .inquiry-text,
  .job-note,
  .customer-comment,
  .invoice-paper-note,
  code,
  pre{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }

  pre{
    overflow:auto!important;
    white-space:pre-wrap!important;
  }
}

@media screen and (max-width:520px){
  .main{
    padding-left:max(9px,var(--vv-safe-left))!important;
    padding-right:max(9px,var(--vv-safe-right))!important;
  }

  .mobile-brand{
    margin-left:calc(-1 * max(9px,var(--vv-safe-left)))!important;
    margin-right:calc(-1 * max(9px,var(--vv-safe-right)))!important;
  }

  .mobile-home-text small{
    font-size:9px!important;
  }

  .actions,
  .top .actions,
  .invoice-toolbar,
  .job-toolbar,
  .offer-share-actions,
  .inquiry-phone-actions,
  .notification-actions,
  .customer-card-actions,
  .job-card-actions,
  .invoice-card-actions,
  .task-actions{
    grid-template-columns:1fr!important;
  }

  .grid.cards,
  .dashboard-secondary-stats,
  .vv43-secondary-stats,
  .invoice-summary,
  .offer-summary,
  .inquiry-summary,
  .customer-stats,
  .calendar-summary,
  .comm-stat-grid,
  .economy-mini-grid,
  .invoice-paper-facts,
  .handover-print-facts,
  .handover-print-stats,
  .handover-production-summary,
  .field-kpis,
  .field-summary-grid,
  .handover-readiness{
    grid-template-columns:1fr!important;
  }

  .job-pipeline,
  .job-status-choice-grid,
  .inquiry-bulk-grid,
  .chat-recipient-grid{
    grid-template-columns:1fr!important;
  }

  .field-quick-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  table.vv-mobile-card-table td{
    grid-template-columns:1fr!important;
    gap:4px!important;
  }

  table.vv-mobile-card-table td::before{
    font-size:8px!important;
  }

  .vv-install-dialog-actions{
    grid-template-columns:1fr!important;
  }
}

@media screen and (max-width:360px){
  .mobile-home-text small{
    display:none!important;
  }

  .mobile-menu-toggle,
  .mobile-create-button,
  .vv-install-mobile-button{
    flex-basis:38px!important;
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
  }

  .field-quick-actions{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media print{
  .vv-install-side,
  .vv-install-mobile-button,
  .vv-install-login,
  .vv-install-overlay,
  .vv-mobile-toast{
    display:none!important;
  }
}
