body{margin:0;background:#f7f4f2;color:#181818;font-family:Arial,Helvetica,sans-serif}.topbar{background:#181818;color:#fff;padding:16px 24px;display:flex;justify-content:space-between;align-items:center;gap:12px}.topbar span{color:#d1a155;margin-left:10px}.topbar nav{display:flex;gap:14px;flex-wrap:wrap;justify-content:flex-end}.topbar a{color:#fff}.container{max-width:1280px;margin:24px auto;padding:0 16px}.card{background:#fff;border-radius:18px;padding:22px;margin-bottom:18px;box-shadow:0 10px 28px rgba(17,17,17,.07)}.card.muted,.muted-text{color:#5f5a57}.card-title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.refresh-status{font-size:13px;color:#5f5a57}.search{display:flex;gap:10px}input,select{width:100%;padding:12px;border:1px solid #ddd;border-radius:12px;box-sizing:border-box}button{background:#d1a155;color:#181818;border:0;border-radius:12px;padding:12px 18px;cursor:pointer;font-weight:700}button.small{padding:8px 10px;font-size:12px}.callback-btn{width:100%;padding:10px 12px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{padding:10px;border-bottom:1px solid #eee;text-align:left;vertical-align:top}th{background:#fafafa}tr.missed{background:#fff8f2}.badge{display:inline-block;padding:3px 7px;border-radius:999px;font-size:11px;margin-left:4px}.badge.bad{background:#ffe2e2;color:#9b1c1c}.badge.good{background:#dff8e8;color:#166534}.login-page{min-height:100vh;display:grid;place-items:center}.login-box{width:min(420px,calc(100vw - 32px));background:#fff;padding:28px;border-radius:22px;box-shadow:0 10px 28px rgba(17,17,17,.07)}.login-box label{display:block;margin-top:14px;margin-bottom:6px;font-weight:700}.login-box button{width:100%;margin-top:18px}.alert{background:#ffe9e9;border:1px solid #ffb8b8;padding:12px;border-radius:12px;margin:12px 0}.alert.ok{background:#ecfdf3;border-color:#b7f0c8}code{background:#f4f4f4;padding:3px 5px;border-radius:6px}.grid-form{display:grid;grid-template-columns:1fr 1fr 180px 120px;gap:12px;align-items:end}.settings-form label{display:block;margin:14px 0;font-weight:700}.settings-form input{margin-top:6px}

@media (max-width: 760px){
  .topbar{align-items:flex-start;flex-direction:column;padding:12px 14px}.topbar nav{justify-content:flex-start;font-size:14px}.container{margin:12px auto;padding:0 10px}.card{padding:14px;border-radius:14px}.card-title-row{display:block}.search{display:block}.search button{width:100%;margin-top:8px}.table-wrap{overflow:visible}.calls-table thead{display:none}.calls-table,.calls-table tbody,.calls-table tr,.calls-table td{display:block;width:100%}.calls-table tr{border:1px solid #eee;border-radius:14px;margin-bottom:12px;padding:10px;background:#fff}.calls-table tr.missed{background:#fff8f2}.calls-table td{border:0;padding:7px 0;display:flex;justify-content:space-between;gap:12px}.calls-table td:before{content:attr(data-label);font-weight:700;color:#5f5a57}.callback-form{width:100%}.callback-btn{font-size:15px;padding:13px}.grid-form{grid-template-columns:1fr}h1{font-size:26px}
}

/* Hotfix 011 – mobile login, settings, logs */
html{-webkit-text-size-adjust:100%}input,select,textarea{font-size:16px}.settings-group{border:1px solid #eee;border-radius:14px;padding:16px;margin:18px 0;background:#fff}.settings-group h2{margin-top:0}.logs-table small{word-break:break-word}.login-page{padding:18px;box-sizing:border-box}.login-box{max-width:430px}.login-box input{font-size:16px;min-height:46px}.login-box h1{margin-top:0}.topbar nav a{white-space:nowrap}
@media (max-width:760px){
  body.login-page{display:flex;align-items:flex-start;justify-content:center;padding-top:10vh;min-height:100svh;zoom:1}.login-box{width:100%;max-width:390px;padding:20px;border-radius:18px}.login-box input{font-size:16px}.login-box button{min-height:48px}.settings-group{padding:12px}.logs-table thead{display:none}.logs-table,.logs-table tbody,.logs-table tr,.logs-table td{display:block;width:100%}.logs-table tr{border:1px solid #eee;border-radius:14px;margin-bottom:12px;padding:10px;background:#fff}.logs-table td{border:0;padding:7px 0;display:flex;justify-content:space-between;gap:12px}.logs-table td:before{content:attr(data-label);font-weight:700;color:#5f5a57}.calls-table td[data-label="Akcja"]{display:block}.callback-btn{min-height:56px;font-size:16px}.card{overflow:hidden}
}
/* Update 012 – burger menu, cleaner mobile panels, analytics columns */
.topbar .brand{display:flex;align-items:center;gap:10px}.burger{display:none;background:transparent;color:#fff;border:1px solid rgba(255,255,255,.35);padding:6px 9px;border-radius:8px;font-size:18px}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 14px}.summary-grid div{border:1px solid #eee;border-radius:14px;padding:12px;background:#fafafa}.summary-grid strong{display:block;font-size:22px}.summary-grid span{font-size:12px;color:#5f5a57}.pager{display:flex;gap:14px;align-items:center;justify-content:center}.button-link{background:#d1a155;color:#181818!important;text-decoration:none;border-radius:12px;padding:10px 14px;font-weight:700}.inline-form{display:inline-block;margin:2px}.reset-form{display:flex;gap:6px;margin-top:6px}.reset-form input{min-width:220px}.danger{background:#ffd7d7;color:#7f1d1d}.users-add-form{grid-template-columns:1fr 1fr 1fr 150px 120px}.gps-alert{font-size:14px}.topbar nav a{display:inline-block}.calls-table th:nth-child(12),.calls-table td:nth-child(12),.calls-table th:nth-child(13),.calls-table td:nth-child(13),.calls-table th:nth-child(14),.calls-table td:nth-child(14){font-size:12px;color:#5f5a57}
@media (max-width: 900px){
  .topbar{position:relative;display:block;padding:12px 14px}.topbar .brand{justify-content:space-between}.topbar nav{display:none;flex-direction:column;gap:8px;padding-top:12px}.topbar.menu-open nav{display:flex}.burger{display:inline-block}.topbar span{margin-left:0}.topbar a{padding:8px 0;border-top:1px solid rgba(255,255,255,.12);width:100%}.summary-grid{grid-template-columns:1fr}.users-add-form,.grid-form{grid-template-columns:1fr}.users-table thead{display:none}.users-table,.users-table tbody,.users-table tr,.users-table td{display:block;width:100%}.users-table tr{border:1px solid #eee;border-radius:14px;margin-bottom:12px;padding:10px;background:#fff}.users-table td{border:0;padding:7px 0;display:flex;justify-content:space-between;gap:12px}.users-table td:before{content:attr(data-label);font-weight:700;color:#5f5a57}.actions-cell{display:block!important}.actions-cell:before{display:block;margin-bottom:6px}.reset-form{display:block}.reset-form input{min-width:0;margin:6px 0}.calls-table td{align-items:flex-start}.calls-table td:before{min-width:110px}.calls-table td:nth-child(12),.calls-table td:nth-child(13),.calls-table td:nth-child(14){font-size:13px}
}
/* Update 013 – phone matching + corrected mobile burger */
.topbar{position:sticky;top:0;z-index:1000;box-sizing:border-box;width:100%}.topbar .brand{min-width:220px}.topbar nav{min-width:0}.topbar nav a.active,.topbar nav a:hover{color:#d1a155}.burger{display:none}.actions-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:14px 0}.badge.warn{background:#fff3cd;color:#7a4b00}.badge.neutral{background:#f2f4f7;color:#344054}.compact-table td,.compact-table th{font-size:13px}.priority-action-cell{min-width:150px}.call-now{display:inline-block;margin-bottom:6px}.main-calls-table th:nth-child(1),.main-calls-table td:nth-child(1){min-width:145px}.main-calls-table th:nth-child(2),.main-calls-table td:nth-child(2){min-width:120px}.main-calls-table th:nth-child(3),.main-calls-table td:nth-child(3){min-width:150px}.main-calls-table th:nth-child(11),.main-calls-table td:nth-child(11){min-width:170px}.main-calls-table th:nth-child(12),.main-calls-table td:nth-child(12){min-width:170px}
@media (min-width:901px){.topbar{display:flex!important}.topbar nav{display:flex!important}.topbar .burger{display:none!important}}
@media (max-width:900px){
  .topbar{display:block!important;padding:12px 16px}.topbar .brand{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;min-width:0}.topbar .brand strong{line-height:1.1}.topbar .brand span{margin-left:0;line-height:1.1}.burger{display:inline-flex!important;align-items:center;justify-content:center;width:50px;height:44px;background:#d1a155!important;color:#181818!important;border:0!important;border-radius:14px;font-size:22px}.topbar nav{display:none!important;width:100%;padding:12px 0 2px;margin-top:10px;border-top:1px solid rgba(255,255,255,.14);flex-direction:column!important;gap:0!important}.topbar.menu-open nav{display:flex!important}.topbar nav a{width:100%;box-sizing:border-box;padding:12px 8px;border-top:1px solid rgba(255,255,255,.08);font-size:17px;white-space:normal!important}.container{padding:0 12px}.card{overflow:hidden}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.calls-table thead{display:none}.calls-table,.calls-table tbody,.calls-table tr,.calls-table td{display:block;width:100%;box-sizing:border-box}.calls-table tr{border:1px solid #eee;border-radius:16px;margin-bottom:12px;padding:12px;background:#fff}.calls-table td{display:grid;grid-template-columns:minmax(110px,40%) 1fr;gap:10px;padding:9px 0;border-bottom:1px solid #f2f2f2}.calls-table td:last-child{border-bottom:0}.calls-table td:before{content:attr(data-label);font-weight:700;color:#5f5a57;min-width:0}.priority-action-cell{display:block!important}.priority-action-cell:before{display:block;margin-bottom:8px}.call-now,.priority-action-cell .callback-btn{display:block;width:100%;box-sizing:border-box;text-align:center;margin:6px 0}.search{display:grid;grid-template-columns:1fr auto;gap:8px}.search button{margin:0;width:auto}.summary-grid{grid-template-columns:1fr}.actions-row{display:block}.actions-row form,.actions-row a{margin:8px 0;display:block;width:100%;box-sizing:border-box;text-align:center}.pager{display:flex;flex-direction:column}.settings-form label{word-break:break-word}.settings-form input,.settings-form select{font-size:16px}.card h1{font-size:30px;line-height:1.1}
}

/* HOTFIX 014 – stabilne menu burger na telefonach i tabletach */
.topbar {
  position: sticky;
  top: 0;
  z-index: 99999;
  box-sizing: border-box;
  width: 100%;
}

.topbar * {
  box-sizing: border-box;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .burger {
  position: relative;
  z-index: 100001;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1201px) {
  .topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
  }

  .topbar .brand {
    flex: 0 0 auto !important;
    min-width: 220px !important;
  }

  .topbar .burger {
    display: none !important;
  }

  .topbar nav {
    display: flex !important;
    flex: 1 1 auto !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 14px !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }

  .topbar nav a {
    display: inline-block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 1200px) {
  .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 0 !important;
    padding: 12px 16px !important;
    overflow: visible !important;
  }

  .topbar .brand {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) 56px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .topbar .brand strong {
    min-width: 0 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .topbar .brand span {
    min-width: 0 !important;
    margin: 0 !important;
    color: #d1a155 !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .topbar .burger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 48px !important;
    min-width: 56px !important;
    min-height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #d1a155 !important;
    color: #181818 !important;
    border: 0 !important;
    border-radius: 14px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .topbar nav {
    display: none !important;
    width: 100% !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 10px 0 0 !important;
    margin: 12px 0 0 !important;
    border-top: 1px solid rgba(255,255,255,.16) !important;
    overflow: visible !important;
  }

  .topbar.is-menu-open nav,
  .topbar.menu-open nav {
    display: flex !important;
  }

  .topbar nav a {
    display: block !important;
    width: 100% !important;
    padding: 13px 8px !important;
    border-top: 1px solid rgba(255,255,255,.10) !important;
    color: #fff !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    text-align: left !important;
  }

  .topbar nav a:hover,
  .topbar nav a.active {
    color: #d1a155 !important;
  }

  .container {
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 10px 12px !important;
  }

  .topbar .brand {
    grid-template-columns: 1fr 1fr 54px !important;
  }

  .topbar .brand strong,
  .topbar .brand span {
    font-size: 15px !important;
  }

  .topbar nav a {
    font-size: 18px !important;
    padding: 14px 6px !important;
  }

  .card h1 {
    font-size: 28px !important;
  }
}
