/* Pultas — stiliai pagal docs/dizainas/Main.dc.html (desktop) ir Telefonas.dc.html (telefonas).
   Be inline stilių (CSP style-src 'self'); spalvoti taškai — SVG fill (view.php dot()).
   Šriftų ?v= — pirmi 8 failo MD5 simboliai (ilgas Expires + SW): pakeitus šriftą — atnaujinti (tikrina tests/e1). */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/geist-latin-ext.woff2?v=4841e590) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/geist-latin.woff2?v=a147f99c) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #F3F4F6; color: #15171C;
  font-family: 'Geist', system-ui, sans-serif; font-size: 14px; line-height: 1.45;
  font-feature-settings: "tnum";
}
a { color: #2563EB; text-decoration: none; }
a:hover { color: #1D4ED8; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Išdėstymas (desktop) ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side {
  flex: 1 1 236px; max-width: 280px; background: #15171C; color: #C9CDD6;
  padding: 20px 14px 24px; display: flex; flex-direction: column; gap: 2px;
}
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: #fff; padding: 2px 10px 20px; display: flex; align-items: center; gap: 6px; }
.logo-dot { width: 7px; height: 7px; border-radius: 50%; background: #F2A516; display: inline-block; margin-top: 8px; }
.logo-dark { color: #15171C; justify-content: center; padding: 0 0 20px; font-size: 24px; }
.nav {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px;
  color: #C9CDD6; font-size: 14px; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.nav:hover { background: #23262E; color: #fff; }
.nav.on { background: #2A2E38; color: #fff; }
.nav svg { width: 18px; height: 18px; flex: none; }
.cnt { margin-left: auto; font-size: 12px; color: #9CA2AF; }
.cnt.hot { color: #F2B544; }
.sec { font-size: 12px; color: #9CA2AF; margin: 20px 10px 6px; }
.vk { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; font-size: 13px; color: #C9CDD6; }
.dot { flex: none; display: inline-block; }
.side-foot { margin-top: auto; padding-top: 24px; }
.side-foot form { margin: 0; }
.side-user { font-size: 12px; color: #9CA2AF; margin: 0 10px 4px; }

.wrap { flex: 999 1 560px; min-width: 0; padding: 24px 32px 48px; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.top h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.sub { color: #5B6270; font-size: 14px; }
.grow { flex: 1; }

/* ---------- Valdikliai ---------- */
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #DFE2E8; background: #fff;
  font-weight: 500; color: #15171C; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.btn.pri { background: #15171C; border-color: #15171C; color: #fff; }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled, .ibtn:disabled { cursor: default; }
.ibtn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid #DFE2E8; background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; position: relative; color: #15171C; padding: 0;
}
.search {
  display: flex; align-items: center; gap: 8px; min-height: 44px; width: 340px; max-width: 100%; padding: 0 12px;
  border: 1px solid #DFE2E8; border-radius: 10px; background: #fff; color: #5B6270;
}
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: #15171C; }
.search input:disabled { cursor: default; }
.kbd { font-size: 11px; border: 1px solid #DFE2E8; border-radius: 5px; padding: 1px 6px; color: #5B6270; }
.card { background: #fff; border: 1px solid #E3E5EA; border-radius: 14px; padding: 18px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #DFE2E8; background: #fff;
  font-size: 13px; color: #3D434F; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
}
.chip:hover { color: #15171C; }
.chip.on { background: #15171C; border-color: #15171C; color: #fff; }
.muted { color: #5B6270; }
.small { font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #EEF0F3; color: #3D434F; white-space: nowrap; }
.pill.mine { background: #FDF1D8; color: #7A4E00; }
.pill.theirs { background: #E5EDFD; color: #1D4ED8; }
.pill.late { background: #FBE6E4; color: #A82D23; }
.pill.ok { background: #E2F3EA; color: #16693F; }
.pill.ai { background: #F1EBFD; color: #5B32B5; }
.row { display: flex; align-items: center; gap: 12px; }
.glabel { font-size: 12px; font-weight: 500; color: #5B6270; margin: 16px 0 8px; }
.glabel.late { color: #A82D23; }

/* ---------- Šiandien ---------- */
.today { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.today-main { flex: 999 1 620px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.sec-head { display: flex; align-items: center; gap: 10px; }
.sec-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.mark-mine { width: 12px; height: 12px; border-radius: 50%; background: #F2A516; flex: none; }
.mark-theirs { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #2563EB; flex: none; }
.sec-desc { margin: 4px 0 4px; }
.empty-list { background: #fff; border: 1px dashed #DFE2E8; border-radius: 12px; padding: 14px; margin-top: 12px; }
.empty-list p { margin: 0; }

/* Telefono segmentai (Tavo ėjimas / Laukiama) */
.seg { display: none; padding: 4px; background: #E7E9ED; border-radius: 12px; gap: 2px; margin-bottom: 12px; }
.seg button {
  flex: 1; min-height: 44px; border: 0; border-radius: 9px; background: none; font-weight: 500; color: #3D434F;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.seg button[aria-selected="true"] { background: #fff; color: #15171C; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.08); }
.seg .mark-mine, .seg .mark-theirs { width: 10px; height: 10px; }
.seg .mark-theirs { border-width: 2px; }

/* ---------- Tuščia būsena (neįgyvendinti moduliai) ---------- */
.empty { max-width: 560px; }
.empty p { margin: 10px 0 0; }

/* ---------- Prisijungimas ir klaidos ---------- */
body.plain { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.center-box { width: 100%; max-width: 380px; }
.h-card { margin: 0 0 14px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.login-card { padding: 24px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 500; color: #3D434F; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #DFE2E8; border-radius: 10px; background: #fff; color: #15171C;
}
.field input:focus { border-color: #15171C; outline: none; box-shadow: 0 0 0 3px rgba(21, 23, 28, 0.08); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 14px; color: #3D434F; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: #15171C; }
.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #FBE6E4; color: #A82D23; font-size: 13px; }

/* ---------- Telefono apatinis meniu ---------- */
.tabbar { display: none; }
.phone-only { display: none; }
.mobile-foot { display: none; }

@media (max-width: 799px) {
  body { font-size: 15px; }
  .side { display: none; }
  .wrap { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .top { gap: 10px; margin-bottom: 12px; flex-wrap: nowrap; }
  .top > div:first-child { flex: 1; min-width: 0; }
  .top h1 { font-size: 24px; }
  .sub { font-size: 13px; }
  .top .ibtn { border-radius: 12px; }
  .desk-only { display: none !important; }
  .phone-only { display: flex; }
  .seg { display: flex; }
  .today { display: block; }
  .today-main { display: block; }
  .today[data-show="mine"] .sec-theirs, .today[data-show="theirs"] .sec-mine { display: none; }
  .today .sec-head, .today .sec-desc { display: none; }
  .mobile-foot { display: block; margin-top: 28px; }
  .tabbar {
    display: flex; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: #fff; border-top: 1px solid #E3E5EA; padding: 4px 6px calc(10px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
    font-size: 11px; color: #5B6270; background: none; border: 0; padding: 0; cursor: pointer;
  }
  .tab:hover { color: #15171C; }
  .tab.on { color: #15171C; font-weight: 500; }
  .tab-plus { width: 48px; height: 48px; border-radius: 16px; background: #15171C; color: #fff; display: grid; place-items: center; }
}
