/* Iglomenik - wszystkie style (przeniesione z index.html) */
:root{
  --bg:#0B0C0E;
  --surface:#17181B;
  --surface2:#202226;
  --line:#2C2E33;
  --line-soft:#2C2E33;
  --text:#F2F2F0;
  --muted:#83878E;
  --accent:#3E6BE0;
  --accent-text:#5F86E8;
  --accent-ink:#FFFFFF;
  --urgent:#E4572E;
  --info:#4C8DFF;
  --ok:#4CAF6D;
  --radius:10px;

  /* spacing scale - every gap in the app is one of these */
  --sp-hair:2px; --sp-xs:4px; --sp-sm:6px; --sp-md:8px;
  --sp-lg:12px; --sp-xl:16px; --sp-2xl:20px; --sp-3xl:24px;
  --radius-sm:6px; --radius-md:8px; --radius-xl:16px; --radius-pill:999px;
  --gutter:12px;
}
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
  padding-bottom:env(safe-area-inset-bottom);
}
.display{
  font-family:'Barlow Condensed','Archivo Narrow',sans-serif;
  font-weight:700;
  letter-spacing:0.01em;
}
.mono{ font-family:'JetBrains Mono','SFMono-Regular',Consolas,monospace; }
.hidden{ display:none !important; }

/* Full-screen gate (login / force password change) */
.gate{
  position:fixed; inset:0; z-index:100;
  background:var(--bg);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:calc(18px + env(safe-area-inset-top)) 18px 18px;
}
.gate img.gate-logo{ height:36px; max-width:100%; object-fit:contain; margin-bottom:34px; }
.gate-card{ width:100%; max-width:360px; }
.gate-card h2{ font-family:'Barlow Condensed',sans-serif; text-transform:uppercase; font-size:22px; margin:0 0 18px; }
.gate-error{ color:#FF9C7A; font-size:13px; margin-top:-8px; margin-bottom:14px; min-height:16px; }
.gate-note{ color:var(--muted); font-size:12.5px; margin-top:18px; line-height:1.5; text-align:center; }

/* Top bar — compact, but header icon buttons are phone-tap friendly */
header{
  position:sticky; top:0; z-index:20;
  background:var(--bg);
  padding:calc(8px + env(safe-area-inset-top)) var(--gutter) var(--sp-md);
  border-bottom:1px solid var(--line);
}
.brand{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; gap:6px; }
/* Logo = snowflake + IGLOMENIK. With many buttons it scales down instead of being cut off. */
.brand-left{ flex:1 1 auto; min-width:0; display:flex; align-items:center; }
.brand img{ height:24px; width:auto; max-width:100%; display:block; object-fit:contain; object-position:left center; }
.brand-right{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
.brand .count{
  font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--muted);
  border:1px solid var(--line); border-radius:20px; padding:2px 8px;
}
.iconbtn{
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  width:44px; height:44px; min-width:44px; min-height:44px; border-radius:50%; font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative;
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
.iconbtn svg{ width:20px; height:20px; }
.badge-dot{
  position:absolute; top:6px; right:6px; width:9px; height:9px; border-radius:50%;
  background:var(--urgent); border:1.5px solid var(--bg);
}
.search-wrap{position:relative;}
#search{
  width:100%; background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-size:16px; padding:9px 12px 9px 36px; border-radius:var(--radius); outline:none;
}
#search:focus{border-color:var(--accent);}
.search-icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; font-size:16px; }
.sort-row{ display:flex; align-items:center; gap:8px; margin-top:6px; font-size:12px; color:var(--muted); }
.sort-row select{
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-size:16px; padding:6px 8px; min-height:36px; border-radius:6px;
}
.tag-chips{ display:flex; gap:6px; overflow-x:auto; margin-top:6px; padding-bottom:2px; }
.active-route-banner{
  display:flex; align-items:center; justify-content:space-between; width:100%;
  background:var(--accent); color:var(--accent-ink); border:none; padding:10px 16px;
  font-size:13.5px; font-weight:600; cursor:pointer;
}
.active-route-arrow{ font-size:18px; }
.tag-chips::-webkit-scrollbar{ display:none; }
.tag-chip{
  flex-shrink:0; background:var(--surface); border:1px solid var(--line); color:var(--muted);
  font-size:12px; padding:4px 9px; border-radius:20px; cursor:pointer; white-space:nowrap;
}
.tag-chip.active{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.tag-pill{
  display:inline-block; background:var(--surface2); border:1px solid var(--line); color:var(--muted);
  font-size:11.5px; padding:2px 7px; border-radius:20px; margin:0 4px 4px 0;
}
.tag-check-list{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.tag-check-item{
  display:flex; align-items:center; gap:6px; background:var(--surface); border:1px solid var(--line);
  border-radius:20px; padding:4px 9px; font-size:13px; cursor:pointer;
}
.tag-check-item input{ margin:0; }
.tag-manage-row{
  display:flex; justify-content:space-between; align-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:7px 9px; margin-bottom:6px; font-size:13.5px;
}
.tag-manage-row button{ background:none; border:none; color:var(--urgent); font-size:14px; cursor:pointer; }
.tag-add-row{ display:flex; gap:8px; margin-bottom:10px; }
.tag-add-row input{ flex:1; }
.tag-add-row button{ flex:0 0 auto; }

/* List */
main{padding:var(--sp-lg) var(--gutter) 90px;}
.empty-state{ text-align:center; color:var(--muted); padding:40px 16px; font-size:15px; line-height:1.5; }
.empty-state .display{font-size:24px; color:var(--text); margin-bottom:8px; display:block;}

.row{
  display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); margin-bottom:6px; padding:6px;
}
.pinbtn{
  flex:0 0 54px; width:54px; height:54px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; border-radius:6px;
  color:var(--accent); text-decoration:none; cursor:pointer;
}
.pinbtn:active{background:var(--surface2);}
.tagbtn{
  flex:0 0 44px; width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; border-radius:6px;
  color:var(--muted); cursor:pointer; padding:0;
}
.tagbtn svg{ width:20px; height:20px; }
.tagbtn.on{ color:var(--accent-text); }
.tagbtn:active{ background:var(--surface2); }
.qt-option{
  display:flex; align-items:center; justify-content:space-between; gap:var(--sp-md);
  width:100%; text-align:left; background:var(--surface); border:1px solid var(--line);
  color:var(--text); border-radius:var(--radius-md); padding:var(--sp-lg);
  margin-bottom:var(--sp-md); font-size:15px; font-family:inherit; cursor:pointer; min-height:44px;
}
.qt-option.active{ border-color:var(--accent); color:var(--accent-text); font-weight:600; }
.pinbtn svg{ width:22px; height:22px; }
.row .thumb{
  flex:0 0 54px; width:54px; height:54px; border-radius:6px; object-fit:cover;
  border:1px solid var(--line); background:var(--surface2);
}
.row .namebtn{
  flex:1; min-width:0; height:54px; display:flex; flex-direction:column; justify-content:center;
  padding:0 4px; background:none; border:none; text-align:left; color:var(--text); cursor:pointer;
}
.row .namebtn .nm{
  font-family:'Barlow Condensed',sans-serif; font-weight:700; font-size:16.5px; line-height:1.2;
  text-transform:uppercase; letter-spacing:0.01em;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; text-overflow:ellipsis; white-space:normal;
}
.row .namebtn .addr{
  font-size:11.5px; line-height:1.2; color:var(--muted); opacity:0.75; margin-top:1px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;
}

.featured-row{
  display:flex; align-items:center; gap:10px; width:100%;
  background:var(--surface2); border:1px solid var(--accent);
  border-radius:var(--radius); margin-bottom:8px; padding:9px;
}
.featured-thumb{ flex:0 0 60px; width:60px; height:60px; border-radius:10px; object-fit:cover; border:1px solid var(--line); cursor:pointer; }
.featured-thumb-empty{ display:flex; align-items:center; justify-content:center; background:var(--surface); color:var(--accent); cursor:pointer; }
.featured-thumb-empty svg{ width:22px; height:22px; }
.featured-text{ min-width:0; flex:1; cursor:pointer; text-align:left; }
.featured-name{ font-family:'Barlow Condensed',sans-serif; font-weight:700; font-size:20px; text-transform:uppercase; color:var(--accent); }
.featured-addr{ font-size:12px; color:var(--muted); margin-top:1px; }
.featured-snippet{ font-size:12.5px; color:var(--muted); opacity:0.85; margin-top:4px; line-height:1.35; }
.featured-pending{ font-size:10px; text-transform:none; color:var(--urgent); border:1px solid var(--urgent); border-radius:10px; padding:1px 7px; margin-left:8px; vertical-align:middle; }
.pending-tag{ font-size:11px; color:var(--urgent); font-weight:600; }

/* FAB */
.fab{
  position:fixed; right:18px; bottom:24px; z-index:30;
  width:58px; height:58px; border-radius:50%;
  background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center;
  font-size:28px; font-weight:700; border:none; cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,0.4);
}
.fab:active{transform:scale(0.94);}

/* Modal */
.overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:50; display:none; }
.overlay.show{display:block;}
.sheet{
  position:fixed; left:50%; bottom:0; z-index:51;
  width:100%; max-width:480px;
  max-height:92vh; max-height:92dvh; overflow-y:auto; background:var(--bg);
  border-top:2px solid var(--accent); border-radius:16px 16px 0 0;
  transform:translate(-50%,100%); transition:transform 0.25s ease;
  padding:var(--sp-lg) var(--gutter) calc(var(--sp-3xl) + env(safe-area-inset-bottom));
}
.sheet.show{transform:translate(-50%,0);}
.sheet-handle{ width:40px; height:4px; background:var(--line); border-radius:4px; margin:0 auto 14px; }
.sheet-top{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px;}
.sheet-top .display{font-size:26px; text-transform:uppercase;}
.closebtn{background:var(--surface); color:var(--muted); border:1px solid var(--line); border-radius:50%; width:32px; height:32px; font-size:16px; cursor:pointer;}

.field{margin-bottom:14px;}
.field .lbl{ font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); margin-bottom:4px; }
.field .val{font-size:14px; line-height:1.45; white-space:pre-wrap;}
.field a.val{color:var(--accent-text); text-decoration:none;}
.lightbox{
  position:fixed; inset:0; z-index:200; background:rgba(0,0,0,0.9);
  display:none; align-items:center; justify-content:center; padding:16px;
  padding-top:calc(16px + env(safe-area-inset-top));
}
.lightbox.show{ display:flex; }
.lightbox img{ max-width:100%; max-height:100%; border-radius:6px; }
.lightbox-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:201;
  background:rgba(255,255,255,0.12); color:#fff; border:none; border-radius:50%;
  width:44px; height:44px; font-size:26px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.lightbox-prev{ left:12px; }
.lightbox-next{ right:12px; }
.updated-line{color:var(--muted); font-size:12px; margin-top:18px; padding-top:12px; border-top:1px solid var(--line);}
.detail-body{ display:flex; gap:18px; align-items:flex-start; }
.detail-media{ flex:0 0 40%; max-width:40%; }
.detail-info{ flex:1 1 60%; min-width:0; }
@media (max-width:520px){
  .detail-body{ flex-direction:column; }
  .detail-media, .detail-info{ flex:1 1 100%; max-width:100%; }
}

.sheet-actions{display:flex; gap:10px; margin-top:18px;}
.sheet-actions-group{display:flex; flex-direction:column; gap:10px; margin-top:18px;}
.btn{ flex:1; padding:10px; border-radius:var(--radius); border:none; font-size:15px; font-weight:600; cursor:pointer; text-align:center; }
.btn-primary{background:var(--accent); color:var(--accent-ink);}
.btn-secondary{background:var(--surface); color:var(--text); border:1px solid var(--line);}
.btn-danger{background:transparent; color:var(--urgent); border:1px solid var(--urgent);}
.btn-block{width:100%;}

/* Form */
.form-group{margin-bottom:20px;}
.form-group label{display:block; font-size:12.5px; letter-spacing:0.01em; color:var(--text); margin-bottom:7px; font-weight:600;}
.form-group input[type=text], .form-group input[type=password], .form-group input[type=tel], .form-group input[type=url], .form-group textarea, .form-group select{
  width:100%; background:var(--surface); border:1px solid var(--line); color:var(--text);
  padding:11px 12px; border-radius:8px; font-size:16px; font-family:inherit; min-height:44px;
}
.form-group input::placeholder, .form-group textarea::placeholder{color:var(--muted); opacity:0.55;}
.form-group textarea{min-height:64px; resize:vertical;}
.form-group textarea.notes-editor{min-height:220px; line-height:1.6; font-size:16px;}
.val.notes-view{white-space:pre-wrap; line-height:1.6;}
.form-hint{font-size:12px; color:var(--muted); opacity:0.7; margin-top:5px;}
.form-check{display:flex; align-items:center; gap:8px; font-size:14px; color:var(--text);}
.photo-input-row{display:flex; gap:10px; align-items:center;}
.photo-preview{width:64px; height:64px; border-radius:8px; object-fit:cover; border:1px solid var(--line);}
.photo-grid{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.photo-grid-item{ position:relative; width:72px; height:72px; }
.photo-grid-item img{ width:100%; height:100%; object-fit:cover; border-radius:8px; border:1px solid var(--line); }
.photo-grid-item button{
  position:absolute; top:-6px; right:-6px; width:20px; height:20px; border-radius:50%;
  background:var(--urgent); color:#fff; border:2px solid var(--bg); font-size:11px; line-height:1;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.photo-strip{ display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; }
.photo-strip::-webkit-scrollbar{ display:none; }
.photo-strip img{
  flex-shrink:0; width:140px; height:140px; object-fit:cover; border-radius:10px;
  border:1px solid var(--line); cursor:zoom-in; background:var(--surface2);
}
.photo-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.photo-layout-toggle{ display:flex; gap:6px; }
.photo-layout-toggle button{
  background:var(--surface); border:1px solid var(--line); color:var(--muted);
  font-size:11px; padding:3px 9px; border-radius:20px; cursor:pointer;
}
.photo-layout-toggle button.active{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.photo-solo img{
  width:100%; max-height:380px; object-fit:contain; background:var(--surface2);
  border-radius:10px; border:1px solid var(--line); cursor:zoom-in; display:block;
}
.photo-duo{ display:flex; gap:8px; }
.photo-duo img{
  flex:1; min-width:0; height:180px; object-fit:cover; border-radius:10px;
  border:1px solid var(--line); cursor:zoom-in; background:var(--surface2);
}
.photo-grid-layout{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; }
.photo-grid-layout img.cover{
  grid-column:1 / span 3; height:190px; object-fit:cover; border-radius:10px;
  border:1px solid var(--line); cursor:zoom-in; background:var(--surface2);
}
.photo-grid-layout img.small{
  height:88px; object-fit:cover; border-radius:8px; border:1px solid var(--line);
  cursor:zoom-in; background:var(--surface2);
}
.crop-wrap{ margin-top:12px; text-align:center; }
.crop-wrap canvas{ width:200px; height:200px; border-radius:8px; touch-action:none; cursor:grab; background:var(--surface2); }
.crop-wrap input[type=range]{ width:200px; margin-top:10px; }
.crop-actions{ display:flex; gap:8px; justify-content:center; margin-top:10px; }
.crop-actions .btn{ flex:0 0 auto; padding:7px 12px; }

.userrow{
  display:flex; justify-content:space-between; align-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:8px 10px; margin-bottom:6px; font-size:14px;
}
.userrow .who{font-weight:600;}
.userrow .role{ font-size:11px; color:var(--muted); text-transform:uppercase; }
.lastseen{ display:block; font-size:11px; color:var(--muted); margin-top:2px; }
.lastseen-dot{
  display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--muted);
  margin-right:5px; vertical-align:middle;
}
.lastseen-dot.online{ background:var(--ok); }
.friend-row{
  display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; padding:9px 12px; margin-bottom:6px;
}
.friend-row .who{ flex:1; min-width:0; font-weight:600; font-size:14px; }
.friend-row .friend-route{ font-size:12.5px; color:var(--accent-text); margin-top:2px; }
.friend-row button.rp-remove{ background:none; border:none; color:var(--urgent); font-size:16px; cursor:pointer; padding:2px 4px; }
.friend-suggestion-row{
  display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; padding:8px 12px; margin-bottom:6px;
}
.friend-suggestion-row span{ flex:1; font-size:14px; font-weight:600; }
.section-title{ font-family:'Barlow Condensed',sans-serif; text-transform:uppercase; font-size:16px; margin:22px 0 10px; color:var(--muted); }

.rating-row{ display:flex; align-items:center; gap:14px; }
.stars{ font-size:26px; letter-spacing:4px; color:var(--line); cursor:pointer; }
.stars span{ transition:color 0.1s ease; }
.stars span.filled{ color:var(--accent); }
.rating-avg{ font-size:13px; color:var(--muted); }

.comment{ background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:8px 9px; margin-bottom:6px; }
.comment .c-head{ display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:4px; }
.comment .c-text{ font-size:14px; line-height:1.4; white-space:pre-wrap; }
.comment .c-actions{ display:flex; align-items:center; gap:14px; margin-top:7px; font-size:12.5px; color:var(--muted); }
.comment .c-actions button{ background:none; border:none; color:var(--muted); font-size:12.5px; cursor:pointer; padding:0; display:flex; align-items:center; gap:3px; }
.comment .c-actions button.voted{ color:var(--accent-text); }
.comment .c-actions button.c-delete{ margin-left:auto; color:var(--urgent); font-size:14px; }
.comment .c-replies{ margin-top:8px; margin-left:16px; padding-left:10px; border-left:2px solid var(--line); }
.reply-input{ display:flex; gap:8px; margin-top:8px; }
.reply-input textarea{ flex:1; min-height:44px; font-size:16px; padding:8px 10px; background:var(--surface2); border:1px solid var(--line); color:var(--text); border-radius:6px; }
.comment-add{ display:flex; gap:8px; align-items:flex-end; margin-top:4px; }
.comment-add textarea{ flex:1; background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:8px; padding:9px 10px; font-size:16px; font-family:inherit; resize:vertical; }
.comment-add .btn{ flex:0 0 auto; padding:8px 12px; }

.avatar{ width:24px; height:24px; border-radius:50%; object-fit:cover; border:1px solid var(--line); flex-shrink:0; }
.avatar-fallback{
  width:24px; height:24px; border-radius:50%; background:var(--surface2); color:var(--muted);
  display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0;
}
.c-head-left{ display:flex; align-items:center; gap:7px; }
.iconbtn img.avatar{ width:100%; height:100%; }
.iconbtn.has-avatar{ padding:0; overflow:hidden; }
.gate-link{ text-align:center; margin-top:16px; color:var(--accent-text); font-size:14px; cursor:pointer; background:none; border:none; }
.gate-success{ color:#8FE3AC; font-size:13.5px; text-align:center; line-height:1.5; }
.pending-row{
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:8px 10px; margin-bottom:6px;
}
.pending-row .who{font-weight:600; font-size:14px; margin-bottom:8px;}
.pending-actions{ display:flex; align-items:center; gap:10px; }
.rp-stop-arrival{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.rp-stop-late{ color:var(--urgent); }
.rp-late-banner{
  margin-top:10px; padding-top:10px; border-top:1px solid var(--line);
  font-size:13px; color:var(--urgent); font-weight:600; line-height:1.4;
}
.rp-summary{
  background:var(--surface2); border:1px solid var(--accent); border-radius:10px;
  padding:12px; margin-bottom:14px; font-size:14px; line-height:1.5;
}
.rp-stop{
  display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; padding:11px 13px; margin-bottom:8px;
}
.rp-stop.current{
  padding:16px; border-color:var(--accent); border-width:2px;
  background:rgba(62,107,224,0.08);
}
.rp-stop.current .rp-stop-name{ font-size:17px; }
.rp-stop-thumb{
  flex:0 0 52px; width:52px; height:52px; border-radius:8px; object-fit:cover;
  border:1px solid var(--line); background:var(--surface2);
  display:flex; align-items:center; justify-content:center; color:var(--muted);
}
.rp-stop-thumb.thumb-fallback svg{ width:24px; height:24px; }
.rp-stop-main{ flex:1; min-width:0; }
.rp-stop-num{
  flex:0 0 26px; height:26px; border-radius:50%; background:var(--accent); color:var(--accent-ink);
  font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center;
}
.rp-stop-name{ font-size:14.5px; font-weight:600; }
.rp-stop-live{ font-size:14px; color:var(--accent-text); font-weight:600; margin-top:3px; }
.rp-stop-reorder{ display:flex; flex-direction:column; gap:2px; flex:0 0 auto; }
.rp-stop-reorder button{
  width:26px; height:22px; background:var(--surface2); border:1px solid var(--line);
  color:var(--text); border-radius:5px; font-size:11px; cursor:pointer; padding:0;
}
.rp-stop-reorder button:disabled{ opacity:0.25; cursor:default; }
.rp-stop-nav{
  flex:0 0 40px; height:40px; border-radius:8px; background:rgba(62,107,224,0.15);
  border:1px solid var(--accent); color:var(--accent); display:flex; align-items:center; justify-content:center;
  text-decoration:none;
}
.rp-stop-nav svg{ width:20px; height:20px; }
.banner-icon svg{ width:15px; height:15px; vertical-align:-2px; }
.rp-suggestion-row{
  display:flex; align-items:center; gap:10px; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; padding:8px 10px; margin-bottom:6px; cursor:pointer;
}
.rp-suggestion-row.selected{ border-color:var(--accent); background:rgba(62,107,224,0.08); }
.rp-suggestion-row img.thumb{ width:36px; height:36px; border-radius:6px; object-fit:cover; flex-shrink:0; }
.rp-suggestion-row .thumb-fallback{
  width:36px; height:36px; border-radius:6px; background:var(--surface2); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color:var(--muted);
}
.rp-suggestion-row .thumb-fallback svg{ width:18px; height:18px; }
.rp-suggestion-row span{ font-size:14px; font-weight:600; flex:1; }
/* --- One stop, one card. Everything optional hides behind Szczegóły. --- */
.rp-stopcard{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:var(--sp-lg);
  margin-bottom:var(--sp-md);
}
.rp-stopcard-head{ display:flex; align-items:center; gap:var(--sp-lg); }
.rp-stopcard-thumb{
  flex:0 0 40px; width:40px; height:40px; border-radius:var(--radius-sm);
  object-fit:cover; background:var(--surface2); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; color:var(--muted);
}
.rp-stopcard-thumb svg{ width:18px; height:18px; }
.rp-stopcard-main{ flex:1; min-width:0; }
.rp-stopcard-name{ font-size:15px; font-weight:600; line-height:1.3; }
.rp-stopcard-addr{ font-size:12.5px; color:var(--muted); line-height:1.35; margin-top:var(--sp-hair); }
.rp-stopcard-addr.changed{ color:var(--accent-text); }
.rp-stopcard-remove{
  flex:0 0 44px; width:44px; height:44px; background:none; border:none;
  color:var(--urgent); font-size:18px; cursor:pointer; padding:0;
}
.rp-stopcard-toggle{
  display:flex; align-items:center; justify-content:space-between; gap:var(--sp-md);
  width:100%; margin-top:var(--sp-lg); padding:var(--sp-md) 0 0;
  border:none; border-top:1px solid var(--line); background:none;
  color:var(--muted); font-size:12.5px; font-family:inherit; cursor:pointer; text-align:left;
}
.rp-stopcard-toggle .set{ color:var(--accent-text); font-weight:600; }
.rp-stopcard-details{ margin-top:var(--sp-lg); display:grid; gap:var(--sp-lg); }
.rp-detail label{ display:block; font-size:12.5px; color:var(--muted); margin-bottom:var(--sp-sm); }
.rp-detail-pair{ display:flex; gap:var(--sp-md); align-items:center; }
.rp-detail-pair span{ font-size:12.5px; color:var(--muted); flex:0 0 auto; }
.rp-stopcard input[type=text],
.rp-stopcard input[type=time]{
  background:var(--surface2); border:1px solid var(--line); color:var(--text);
  font-size:16px; font-family:inherit; padding:9px 10px;
  border-radius:var(--radius-sm); outline:none; min-height:44px; width:100%;
}
.rp-stopcard input:focus{ border-color:var(--accent); }
.rp-detail-pair input[type=time]{ flex:1 1 0; min-width:0; }

.hist-row{ border:1px solid var(--line); border-radius:var(--radius-md); padding:var(--sp-lg); margin-bottom:var(--sp-md); background:var(--surface); }
.hist-head{ display:flex; align-items:baseline; gap:var(--sp-md); flex-wrap:wrap; cursor:pointer; }
.hist-date{ font-weight:600; font-size:15px; }
.hist-meta{ font-size:12.5px; color:var(--muted); }
.hist-stops{ margin-top:var(--sp-md); border-top:1px solid var(--line); padding-top:var(--sp-md); }
.hist-stop{ display:flex; gap:var(--sp-md); font-size:13.5px; padding:var(--sp-xs) 0; color:var(--text); }
.hist-stop .num{ color:var(--muted); min-width:18px; }
.hist-stop .when{ color:var(--muted); margin-left:auto; white-space:nowrap; }
.hist-stop.skipped .name{ color:var(--muted); text-decoration:line-through; }
.sat-wrap{ margin-top:var(--sp-lg); }
.sat-img{
  width:100%; border-radius:var(--radius-md); border:1px solid var(--line);
  display:block; background:var(--surface2); min-height:120px;
}
.sat-hint{ font-size:12px; color:var(--muted); margin-top:var(--sp-xs); }
.rp-basecard{
  display:flex; align-items:center; gap:var(--sp-lg); background:var(--surface2);
  border:1px dashed var(--line); border-radius:var(--radius-md);
  padding:var(--sp-lg); margin-bottom:var(--sp-md); font-size:13.5px;
}
.rp-basecard .who{ font-weight:600; font-size:14px; }
.rp-basecard .rp-basemain{ flex:1; min-width:0; }
.rp-basecard input[type=text]{
  width:100%; margin-top:var(--sp-sm); background:var(--surface); border:1px solid var(--line);
  color:var(--text); font-size:16px; font-family:inherit; padding:9px 10px;
  border-radius:var(--radius-sm); min-height:44px; outline:none;
}
.rp-basecard button{
  flex:0 0 44px; width:44px; height:44px; background:none; border:none;
  color:var(--urgent); font-size:18px; cursor:pointer; padding:0;
}
.rp-baseadd{
  width:100%; background:var(--surface); border:1px dashed var(--line); color:var(--accent-text);
  border-radius:var(--radius-md); padding:var(--sp-lg); margin-bottom:var(--sp-md);
  font-size:14px; font-family:inherit; cursor:pointer; min-height:44px;
}
.rp-stop.dragging{ opacity:0.5; }
.rp-stop.drop-target{ border-color:var(--accent); }
.rp-stop-grip{
  flex:0 0 32px; width:32px; height:44px; display:flex; align-items:center; justify-content:center;
  color:var(--muted); cursor:grab; touch-action:none; font-size:18px; user-select:none;
}
.rp-emergency{ display:flex; gap:var(--sp-md); margin-top:var(--sp-lg); }
.rp-emergency button{
  flex:1; background:var(--surface); border:1px solid var(--line); color:var(--text);
  border-radius:var(--radius-md); padding:var(--sp-lg) var(--sp-md); font-size:13.5px;
  font-family:inherit; cursor:pointer; min-height:48px;
}
.rp-adhoc{ margin-bottom:var(--sp-xl); }
.rp-adhoc-row{ display:flex; gap:var(--sp-md); align-items:center; }
.rp-adhoc-row input{
  flex:1 1 180px; min-width:0; background:var(--surface); border:1px solid var(--line); color:var(--text);
  font-size:16px; padding:11px 12px; border-radius:8px; font-family:inherit; outline:none; min-height:44px;
}
.rp-adhoc-row input:focus{ border-color:var(--accent); }
.rp-adhoc-status{ font-size:12.5px; color:var(--muted); margin-top:var(--sp-sm); }
.rp-adhoc-status button{ background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:8px; padding:9px 12px; margin:var(--sp-sm) var(--sp-sm) 0 0; font-size:14px; cursor:pointer; min-height:44px; }
.rp-loadid-badge{
  display:inline-block; background:var(--accent); color:var(--accent-ink); font-size:11px; font-weight:700;
  padding:1px 6px; border-radius:10px; margin-right:6px; vertical-align:middle;
}
.rp-float-confirm{
  position:sticky; bottom:0; left:0; right:0; z-index:5;
  background:var(--bg); padding:10px 0 4px; margin-top:14px; border-top:1px solid var(--line);
}
.rp-stop-check{ flex:0 0 auto; width:20px; height:20px; }
.rp-stop.done{ opacity:0.5; }
.rp-stop.done .rp-stop-name{ text-decoration:line-through; }
.rp-remaining{ font-size:13px; color:var(--muted); margin-top:2px; }
.edit-diff{ margin:8px 0; }
.edit-diff-row{ font-size:12.5px; line-height:1.5; margin-bottom:4px; display:flex; flex-wrap:wrap; gap:5px; }
.edit-diff-label{ color:var(--muted); font-weight:600; flex:0 0 60px; }
.edit-diff-old{ color:var(--urgent); text-decoration:line-through; opacity:0.8; }
.edit-diff-arrow{ color:var(--muted); }
.comment-notif-row{
  background:var(--surface); border:1px solid var(--line); border-radius:8px;
  padding:8px 9px; margin-bottom:6px;
}
.comment-notif-row.unseen{ border-color:var(--accent); }
.comment-notif-head{ display:flex; justify-content:space-between; font-size:11.5px; color:var(--muted); margin-bottom:4px; }
.comment-notif-entry{ font-weight:600; }
.comment-notif-text{ font-size:13.5px; line-height:1.4; margin-bottom:8px; }
.comment-notif-row .btn{ padding:6px 10px; font-size:12.5px; }
.edit-diff-new{ color:var(--ok); font-weight:600; }
.pending-actions .btn{ flex:1; padding:7px; font-size:13px; }
.pending-actions label{ display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); white-space:nowrap; }

/* Side drawer (settings) */
.drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:51;
  width:80%; max-width:320px;
  background:var(--bg);
  border-left:2px solid var(--accent);
  padding:calc(14px + env(safe-area-inset-top)) 14px 14px;
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
  overflow-y:auto;
  transform:translateX(100%);
  transition:transform 0.25s ease;
}
.drawer.show{transform:translateX(0);}
.drawer-top{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px;}
.drawer-btn{
  width:100%; display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  padding:10px 11px; border-radius:8px; font-size:14.5px; margin-bottom:8px; cursor:pointer;
  text-align:left;
}
.drawer-btn .ic{font-size:16px;}

.toast{
  position:fixed; bottom:90px; left:50%; transform:translateX(-50%);
  background:var(--surface2); border:1px solid var(--accent); color:var(--text);
  padding:10px 16px; border-radius:14px; font-size:13.5px; z-index:60;
  opacity:0; transition:opacity 0.25s ease; pointer-events:none;
  max-width:min(90vw, 420px); white-space:pre-wrap; text-align:center; line-height:1.4;
}
.toast.show{opacity:1;}

/* ---------- Logistics view ---------- */
/* Same top bar (profile, settings, contacts...) as the driver view - only the list controls go. */
body.mode-logi #app > header{ position:static; }
body.mode-logi #app > header .search-wrap,
body.mode-logi #app > header .sort-row,
body.mode-logi #app > header .tag-chips,
body.mode-logi #quickTagBtn,
body.mode-logi #activeRouteBanner,
body.mode-logi #app > main,
body.mode-logi #addFab{ display:none !important; }
#logiView{ min-height:100vh; min-height:100dvh; padding:var(--sp-lg) var(--gutter) 40px; }
body.mode-logi #app > header .brand{ margin-bottom:0; }
.logi-top{
  display:flex; align-items:center; gap:var(--sp-lg); flex-wrap:wrap;
  padding-bottom:var(--sp-lg); margin-bottom:var(--sp-lg); border-bottom:1px solid var(--line);
}
.logi-brand{ display:flex; align-items:center; gap:var(--sp-md); margin-right:auto; }
.logi-brand img{ height:22px; max-width:55vw; object-fit:contain; }
.logi-brand .display{ font-size:24px; text-transform:uppercase; color:var(--accent-text); }
.logi-date{ display:flex; align-items:center; gap:var(--sp-sm); }
.logi-date button{
  background:var(--surface); border:1px solid var(--line); color:var(--muted);
  border-radius:var(--radius-pill); padding:6px 12px; font-size:13px; cursor:pointer; min-height:36px;
}
.logi-date button.active{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.logi-date input, .logi-drivers input, .logi-settings input, .logi-fields input, .logi-add-col input{
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  border-radius:var(--radius-md); padding:7px 9px; font-size:15px; font-family:inherit; min-height:36px;
  color-scheme:dark;
}
.logi-top .btn{ flex:0 0 auto; padding:8px 14px; font-size:14px; }
.logi-body{ display:grid; grid-template-columns:280px minmax(0,1fr); gap:var(--sp-xl); align-items:start; }
.logi-drivers{ position:sticky; top:10px; max-height:calc(100vh - 100px); overflow-y:auto; }
.logi-drivers input{ width:100%; margin-bottom:var(--sp-md); }
.logi-day-summary{ font-size:12px; color:var(--muted); margin-bottom:var(--sp-md); }
.logi-driver{
  display:flex; align-items:center; gap:var(--sp-md); width:100%; text-align:left;
  background:var(--surface); border:1px solid var(--line); color:var(--text);
  border-radius:var(--radius-md); padding:9px 10px; margin-bottom:6px; cursor:pointer; font-family:inherit;
}
.logi-driver.active{ border-color:var(--accent); background:rgba(62,107,224,0.10); }
.logi-driver .lastseen-dot{ flex:0 0 auto; }
.logi-driver-main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.logi-driver-name{ font-size:14px; font-weight:600; }
.logi-driver-sub{ font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.logi-badge{
  flex:0 0 auto; font-size:11px; font-weight:600; padding:2px 8px; border-radius:var(--radius-pill);
  border:1px solid var(--line); color:var(--muted); white-space:nowrap;
}
.logi-badge.st-draft{ color:var(--text); border-color:var(--muted); }
.logi-badge.st-ready{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.logi-badge.st-started{ background:var(--ok); border-color:var(--ok); color:#08120B; }
.logi-badge.st-done{ color:var(--ok); border-color:var(--ok); }
.logi-empty{ color:var(--muted); text-align:center; padding:60px 16px; line-height:1.5; font-size:14px; }
.logi-empty .display{ display:block; font-size:24px; color:var(--text); margin-bottom:6px; text-transform:uppercase; }
.logi-empty.small{ padding:24px 12px; }
.logi-ed-name{ display:flex; align-items:center; gap:var(--sp-md); flex-wrap:wrap; }
.logi-back{ flex:0 0 auto; }
.logi-ed-head{ display:flex; align-items:flex-start; gap:var(--sp-lg); flex-wrap:wrap; margin-bottom:var(--sp-lg); }
.logi-ed-title{ flex:1; min-width:200px; }
.logi-ed-name{ font-size:26px; text-transform:uppercase; line-height:1.1; }
.logi-ed-day{ color:var(--muted); font-size:18px; }
.logi-ed-status{ font-size:12.5px; color:var(--muted); margin-top:4px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.logi-ed-actions{ display:flex; gap:var(--sp-md); flex-wrap:wrap; }
.logi-ed-actions .btn{ flex:0 0 auto; padding:9px 16px; font-size:14px; }
.logi-note{
  background:var(--surface2); border-left:3px solid var(--accent); border-radius:var(--radius-sm);
  padding:8px 10px; font-size:13px; line-height:1.4; margin-bottom:var(--sp-lg);
}
.logi-note.warn{ border-left-color:var(--urgent); }
.logi-settings{
  display:flex; flex-wrap:wrap; gap:var(--sp-lg); align-items:flex-end;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:var(--sp-lg); margin-bottom:var(--sp-lg);
}
.logi-settings label{ display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
.logi-settings label.logi-base{ flex:1; min-width:200px; }
.logi-settings label.logi-base span{ display:flex; align-items:center; gap:6px; color:var(--text); }
.logi-settings input[type=text]{ width:100%; }
.logi-settings input[type=checkbox]{ min-height:0; width:16px; height:16px; }
.logi-ed-grid{ display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:var(--sp-xl); align-items:start; }
.logi-add-col{
  position:sticky; top:10px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:var(--sp-lg); max-height:calc(100vh - 30px); overflow-y:auto;
}
.logi-add-col .search-wrap input{ width:100%; padding-left:32px; }
.logi-add-col .rp-adhoc-row{ display:flex; gap:6px; }
.logi-add-col .rp-adhoc-row input{ flex:1; min-width:0; }
.logi-add-col .rp-adhoc-row .btn{ flex:0 0 auto; padding:7px 12px; font-size:13px; }
.logi-add-col .rp-suggestion-row span{ display:flex; flex-direction:column; font-size:13.5px; }
.logi-sug-addr{ font-size:11.5px; color:var(--muted); font-weight:400; }
.logi-plus{ color:var(--accent-text); font-size:20px; padding:0 4px; }
.logi-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:var(--sp-lg); flex-wrap:wrap; margin-bottom:var(--sp-md); }
.logi-toolbar-info{ font-size:14px; display:flex; gap:var(--sp-md); align-items:center; flex-wrap:wrap; }
.logi-toolbar-btns{ display:flex; gap:var(--sp-md); }
.logi-toolbar-btns .btn{ flex:0 0 auto; padding:8px 12px; font-size:13.5px; }
.logi-stale{ font-size:11.5px; color:var(--muted); border:1px dashed var(--muted); border-radius:var(--radius-pill); padding:1px 8px; }
.logi-late-count{ font-size:12px; color:var(--urgent); font-weight:600; }
.logi-stop{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:10px 12px; margin-bottom:var(--sp-md);
}
.logi-stop.late{ border-color:var(--urgent); }
.logi-stop.dragging{ opacity:0.85; box-shadow:0 8px 24px rgba(0,0,0,0.5); position:relative; z-index:3; }
.logi-stop.drop-target{ border-color:var(--accent); border-style:dashed; }
.logi-stop-head{ display:flex; align-items:center; gap:var(--sp-md); }
.logi-stop-main{ flex:1; min-width:0; }
.logi-stop-name{
  background:none; border:none; padding:0; color:var(--text); font-family:inherit; text-align:left;
  font-size:15px; font-weight:600; cursor:pointer; line-height:1.3;
}
.logi-stop-name[data-open]:hover{ color:var(--accent-text); text-decoration:underline; }
.logi-stop-addr{ font-size:12.5px; color:var(--muted); margin-top:1px; }
.logi-stop-addr.changed{ color:var(--accent-text); }
.logi-flag{ font-size:11.5px; color:#E8B04A; margin-top:2px; }
.logi-stop-eta{ font-family:'JetBrains Mono',monospace; font-size:14px; font-weight:600; min-width:56px; text-align:right; }
.logi-stop-eta.late{ color:var(--urgent); }
.logi-stop .rp-stopcard-remove{ flex:0 0 36px; width:36px; height:36px; }
.logi-info-toggle{
  background:none; border:none; color:var(--accent-text); font-size:12.5px; padding:6px 0 0; cursor:pointer; font-family:inherit;
}
.logi-info{
  font-size:12.5px; line-height:1.5; color:var(--text); background:var(--surface2);
  border-radius:var(--radius-sm); padding:8px 10px; margin-top:6px; white-space:pre-wrap;
}
.logi-fields{
  display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:var(--sp-md);
  margin-top:var(--sp-md); padding-top:var(--sp-md); border-top:1px solid var(--line);
}
.logi-fields label{ display:flex; flex-direction:column; gap:3px; font-size:11px; color:var(--muted); min-width:0; }
.logi-fields label.wide{ grid-column:span 2; }
.logi-fields input{ width:100%; font-size:14px; padding:4px 8px; min-height:32px; }
.logi-fields input:disabled, .logi-settings input:disabled{ opacity:0.55; }
@media (max-width:1100px){
  .logi-ed-grid{ grid-template-columns:1fr; }
  .logi-add-col{ position:static; max-height:none; order:-1; }
}
@media (max-width:760px){
  .logi-body{ grid-template-columns:1fr; }
  .logi-drivers{ position:static; max-height:none; }
  #logiView.has-sel .logi-drivers{ display:none; }
  #logiView:not(.has-sel) .logi-editor{ order:-1; }
  .logi-fields{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .logi-ed-name{ font-size:22px; }
}

.logi-driver-badges{ display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex:0 0 auto; }
.logi-courses{ display:flex; gap:var(--sp-sm); flex-wrap:wrap; margin-bottom:var(--sp-lg); }
.logi-course{
  display:flex; align-items:center; gap:var(--sp-sm); background:var(--surface); border:1px solid var(--line);
  color:var(--text); border-radius:var(--radius-md); padding:7px 10px; font-size:14px; font-weight:600;
  font-family:inherit; cursor:pointer; min-height:40px;
}
.logi-course.active{ border-color:var(--accent); background:rgba(62,107,224,0.10); }
.logi-course.add{ color:var(--accent-text); border-style:dashed; }
.logi-tile-course{ font-size:15px; color:var(--muted); }
.logi-prev-end{ font-size:11px; color:var(--accent-text); }
.home-card.home-done{ padding:var(--sp-md) var(--sp-lg); opacity:0.8; }
.home-card.home-done .home-sub{ margin:2px 0 0; }
.logi-badge.st-opened{ color:var(--accent-text); border-color:var(--accent); }
.logi-board-head{ margin-bottom:var(--sp-lg); }
.logi-waiting{ font-size:13px; color:var(--muted); margin-bottom:var(--sp-lg); display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.logi-waiting button{
  background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:var(--radius-pill);
  padding:4px 10px; font-size:12.5px; cursor:pointer; font-family:inherit;
}
.logi-tiles{ display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:var(--sp-lg); }
.logi-tile{
  display:block; width:100%; text-align:left; font-family:inherit; color:var(--text); cursor:pointer;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:var(--sp-lg); line-height:1.35;
}
.logi-tile.st-started{ border-color:var(--ok); }
.logi-tile.st-opened{ border-color:var(--accent); }
.logi-tile.st-done{ opacity:0.75; }
.logi-tile:hover{ background:var(--surface2); }
.logi-tile-head{ display:flex; align-items:center; gap:var(--sp-md); }
.logi-tile-name{ flex:1; min-width:0; font-family:'Barlow Condensed',sans-serif; font-weight:700; font-size:20px; text-transform:uppercase; }
.logi-tile-seen{ font-size:11.5px; color:var(--muted); margin:2px 0 var(--sp-md); }
.logi-tile-bar{ height:8px; background:var(--surface2); border-radius:var(--radius-pill); overflow:hidden; }
.logi-tile-bar span{ display:block; height:100%; background:var(--ok); border-radius:var(--radius-pill); }
.logi-tile-count{ font-size:12.5px; font-weight:600; margin:4px 0 var(--sp-sm); }
.logi-tile-times{ font-size:12px; color:var(--muted); margin-bottom:4px; }
.logi-tile-now{ font-size:13.5px; margin-bottom:2px; }
.logi-tile-meta{ font-size:12px; color:var(--muted); margin-bottom:4px; }
.logi-tile-delay{ display:inline-block; font-size:11.5px; font-weight:600; border-radius:var(--radius-pill); padding:2px 8px; margin-top:2px; }
.logi-tile-delay.ok{ color:var(--ok); border:1px solid var(--ok); }
.logi-tile-delay.late{ color:#fff; background:var(--urgent); }


/* ---------- Kontakty + Tablica ---------- */
#contactsBtn, #boardBtn{ position:relative; }
.sheet.chat-sheet{ height:92vh; height:92dvh; display:flex; flex-direction:column; }
#ct-list-view{ flex:1; min-height:0; overflow-y:auto; }
.ct-intro{ font-size:13px; color:var(--muted); line-height:1.45; margin:0 0 var(--sp-md); }
.ct-section{ display:flex; align-items:center; justify-content:space-between; margin:var(--sp-xl) 0 var(--sp-md); }
.ct-section .section-title{ margin:0; }
.ct-row{
  display:flex; align-items:center; gap:var(--sp-lg); width:100%; text-align:left; font-family:inherit;
  background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:var(--radius-md);
  padding:9px 10px; margin-bottom:6px; min-height:56px;
}
.ct-avatar{ width:40px; height:40px; border-radius:50%; object-fit:cover; flex:0 0 40px; display:flex; align-items:center; justify-content:center; background:var(--surface2); border:1px solid var(--line); }
.ct-avatar-letter{ font-weight:700; color:var(--accent-text); font-size:16px; }
.ct-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.ct-name{ font-size:15px; font-weight:600; }
.ct-you{ font-weight:400; color:var(--muted); font-size:12.5px; }
.ct-sub{ font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ct-phone{ color:var(--text); font-size:14px; }
.ct-call{ flex:0 0 44px; width:44px; height:44px; border-radius:50%; background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; text-decoration:none; }
.ct-call svg{ width:20px; height:20px; }
.ct-empty{ color:var(--muted); text-align:center; margin:auto 0; font-size:14px; padding:var(--sp-xl) 0; line-height:1.5; }
#ct-addme{ background:var(--surface); border:1px dashed var(--line); border-radius:var(--radius-md); padding:var(--sp-lg); margin-bottom:var(--sp-md); font-size:13.5px; line-height:1.45; }
#ct-addme button{ margin-top:var(--sp-md); }

.board-sheet{ height:92vh; height:92dvh; display:flex; flex-direction:column; padding-bottom:calc(var(--sp-md) + env(safe-area-inset-bottom)); }
#bd-list{ flex:1; min-height:0; overflow-y:auto; padding:2px 0; display:flex; flex-direction:column; }
.bd-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); padding:9px 10px; margin-bottom:8px; }
.bd-clip{ display:flex; align-items:center; gap:10px; min-height:48px; }
.bd-play{ flex:0 0 44px; width:44px; height:44px; border-radius:50%; border:none; background:var(--accent); color:var(--accent-ink);
  display:flex; align-items:center; justify-content:center; cursor:pointer; }
.bd-play svg{ width:20px; height:20px; }
.bd-play.playing{ background:var(--ok); }
.bd-meta{ flex:1; min-width:0; display:flex; flex-direction:column; }
.bd-by{ font-size:14.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bd-sub{ font-size:12px; color:var(--muted); }
.bd-reply{ background:none; border:1px solid var(--line); color:var(--accent-text); border-radius:var(--radius-pill);
  padding:5px 12px; font-size:13px; font-family:inherit; cursor:pointer; min-height:36px; }
.bd-del{ background:none; border:none; color:var(--muted); font-size:16px; width:36px; height:36px; cursor:pointer; }
.bd-replies{ margin:8px 0 0 18px; padding-left:10px; border-left:2px solid var(--line); display:flex; flex-direction:column; gap:6px; }
#bd-compose{ border-top:1px solid var(--line); padding-top:var(--sp-md); margin-top:var(--sp-sm); }
.bd-replyto{ font-size:13px; color:var(--muted); display:flex; justify-content:space-between; align-items:center; margin-bottom:var(--sp-sm); }
.bd-replyto button{ background:none; border:none; color:var(--accent-text); font-family:inherit; font-size:13px; cursor:pointer; padding:6px; }
.bd-recbtn{ width:100%; min-height:56px; border-radius:var(--radius-md); border:1px solid var(--line); background:var(--surface);
  color:var(--text); font-family:inherit; font-size:16px; font-weight:600; display:flex; align-items:center; justify-content:center; gap:12px; cursor:pointer; }
.bd-recbtn.recording{ border-color:var(--urgent); }
.bd-rec-dot{ width:14px; height:14px; border-radius:50%; background:var(--urgent); flex:0 0 14px; }
.bd-recbtn.recording .bd-rec-dot{ animation:bdpulse 1s infinite; }
.bd-stop-sq{ width:16px; height:16px; background:var(--text); border-radius:3px; flex:0 0 16px; }
@keyframes bdpulse{ 50%{ opacity:0.25; } }
.bd-status{ text-align:center; color:var(--muted); padding:16px 0; }
.bd-preview audio{ width:100%; height:44px; }
.bd-preview-actions{ display:flex; gap:var(--sp-md); margin-top:var(--sp-md); }
.bd-preview-actions .btn{ flex:1; min-height:48px; }

/* Driver: note from logistics on a stop */
.rp-depart{ display:flex; flex-direction:column; gap:var(--sp-sm); }
.rp-depart label{ font-size:13px; color:var(--muted); }
.rp-depart input{ background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:var(--radius-md);
  padding:9px 11px; font-size:18px; font-family:inherit; min-height:48px; color-scheme:dark; }
.rp-depart .form-hint{ margin:0; }
.rp-plan-head{ font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--accent-text); margin-bottom:4px; }
.rp-stop-note{
  font-size:12.5px; color:var(--text); background:var(--surface2); border-left:3px solid var(--accent);
  border-radius:4px; padding:4px 7px; margin-top:4px; line-height:1.35;
}

/* Driver home panel */
#homePanel{ margin-bottom:var(--sp-lg); }
.home-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:var(--sp-lg); margin-bottom:var(--sp-md);
}
.home-card.home-route{ border-color:var(--accent); background:rgba(62,107,224,0.08); }
.home-kicker{ font-size:11px; text-transform:uppercase; letter-spacing:0.06em; color:var(--muted); }
.home-route .home-kicker{ color:var(--accent-text); }
.home-title{ font-family:'Barlow Condensed',sans-serif; font-weight:700; font-size:22px; text-transform:uppercase; margin:2px 0 4px; }
.home-sub{ font-size:13px; color:var(--muted); line-height:1.4; margin-bottom:var(--sp-md); }
.home-sub.warn{ color:#E8B04A; }
.home-card .btn{ margin-top:var(--sp-xs); }
.home-stats{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:var(--sp-sm); margin-bottom:var(--sp-md); }
.home-stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); padding:8px 6px; text-align:center; }
.home-stat b{ display:block; font-family:'Barlow Condensed',sans-serif; font-size:22px; line-height:1.1; }
.home-stat span{ font-size:10.5px; color:var(--muted); line-height:1.2; display:block; }
.home-hist{ display:flex; flex-direction:column; gap:6px; }
.home-hist-row{
  display:flex; justify-content:space-between; align-items:center; gap:var(--sp-md);
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md);
  color:var(--text); padding:9px 10px; font-size:13px; font-family:inherit; cursor:pointer; text-align:left;
}
.home-tomorrow{ font-size:12.5px; color:var(--accent-text); margin-top:var(--sp-sm); }
@media (max-width:380px){ .home-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
