/* AdminPanel: pradžia ir Laiškas modulis. Bendras stilius (mygtukai, kortelės, lentelės) – app.css, kaip Čekyje. */
body.wide main#app { max-width: none; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.home-card { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; color: inherit; text-decoration: none; }
.home-card:hover { border-color: #0183b8; }
.home-t { font-size: 16px; font-weight: 700; }
.home-b { margin-top: 10px; }
.home-b .stats { margin: 8px 0 0; }
.home-b .sys { display: flex; flex-wrap: wrap; gap: 10px; }

/* Laiškas */
.lk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.lk-chip { border-radius: 8px; padding: 4px 12px; min-width: 150px; max-width: 240px; text-align: center; font-size: 12px; border: 1px solid transparent; background: #f1f5f9; cursor: default; }
.lk-chip b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-chip span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; }
.lk-chip.click { cursor: pointer; }
.lk-chip.db { background: #e0f2fe; border-color: #bae6fd; }
.lk-chip.sent { background: #dcfce7; border-color: #bbf7d0; }
.lk-chip.mail { background: #ede9fe; border-color: #ddd6fe; }
.lk-chip.job { background: #fef3c7; border-color: #fde68a; }
.lk-chip.bad { background: #fee2e2; border-color: #fecaca; }
.lk-main { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 12px; height: calc(100vh - 170px); min-height: 520px; }
.lk-side, .lk-body { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; min-height: 0; display: flex; flex-direction: column; }
.lk-side { padding: 8px; gap: 6px; }
.lk-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lk-list { flex: 1; overflow-y: auto; min-height: 0; }
.lk-item { padding: 7px 9px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; }
.lk-item:hover { background: #f1f5f9; }
.lk-item.on { background: #e0f2fe; border-color: #7dd3fc; }
.lk-item .tt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-item .ss { font-size: 12px; }
.lk-item.arch .tt { color: #94a3b8; }
.lk-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e2e8f0; padding: 6px 8px 0; align-items: flex-end; }
.lk-tab { padding: 7px 16px; border: 1px solid transparent; border-bottom: none; border-radius: 7px 7px 0 0; background: none; cursor: pointer; font: inherit; color: #475569; }
.lk-tab.on { background: #fff; border-color: #e2e8f0; margin-bottom: -1px; font-weight: 600; color: #0183b8; }
.lk-pane { flex: 1; min-height: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.lk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lk-row .grow { flex: 1; }
.lk-row input[type=datetime-local] { width: auto; flex: none; }
.lk-row select.inp { width: auto; }
.lk-big { font-size: 16px; font-weight: 700; }
.lk-bar { height: 22px; background: #e2e8f0; border-radius: 6px; position: relative; overflow: hidden; flex-shrink: 0; }
.lk-bar i { position: absolute; inset: 0 auto 0 0; background: #86efac; }
.lk-bar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 22px; }
.lk-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; flex-shrink: 0; }
.lk-stats .stat { margin: 0; }
.lk-split { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 10px; flex: 1; min-height: 0; }
.lk-col { display: flex; flex-direction: column; gap: 6px; min-height: 0; min-width: 0; }
.lk-cats { flex: 1; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 7px; min-height: 120px; }
.lk-cat { display: flex; gap: 7px; padding: 4px 7px; align-items: flex-start; cursor: pointer; }
.lk-cat:hover { background: #f8fafc; }
.lk-cat small { display: block; font-size: 11px; }
.lk-cat .st-dot { margin-top: 5px; flex-shrink: 0; }
.lk-job { border: 1px solid #e2e8f0; border-radius: 7px; padding: 7px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; white-space: pre-line; }

/* lentelė su virtualiu slinkimu (dešimtys tūkstančių eilučių) */
.vt { flex: 1; min-height: 160px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 7px; }
.vt table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 13px; }
.vt th { position: sticky; top: 0; background: #f1f5f9; z-index: 1; text-align: left; padding: 5px 7px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; user-select: none; }
.vt td { padding: 0 7px; height: 27px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid #f1f5f9; }
.vt tr.d td { color: #94a3b8; }
.vt tr.r:hover td { background: #f8fafc; }
.vt tr.sel td { background: #e0f2fe; }
.vt .gap td { padding: 0; border: 0; height: auto; }

/* laiško redaktorius */
.lk-form { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 6px 10px; align-items: center; flex-shrink: 0; }
.lk-tools { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; flex-shrink: 0; }
.lk-tools button { min-width: 28px; }
.lk-edit { flex: 1; min-height: 240px; overflow: auto; border: 1px solid #cbd5e1; border-radius: 7px; padding: 10px 12px; background: #fff; font: 11pt Arial, sans-serif; }
.lk-edit:focus { outline: 2px solid #7dd3fc; }
textarea.lk-edit { font: 12px Consolas, monospace; resize: none; width: 100%; box-sizing: border-box; }
.lk-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex-shrink: 0; }
.lk-box { border: 1px solid #e2e8f0; border-radius: 7px; padding: 7px 9px; font-size: 13px; }
.lk-box h4 { margin: 0 0 4px; font-size: 13px; }
.lk-att { display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.lk-frame { width: 100%; height: 56vh; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; }
.lk-menu { position: fixed; background: #fff; border: 1px solid #cbd5e1; border-radius: 7px; box-shadow: 0 6px 22px rgba(15, 23, 42, .18); z-index: 1000; padding: 4px; min-width: 210px; max-height: 70vh; overflow: auto; }
.lk-menu button, .lk-menu a { display: block; width: 100%; padding: 6px 10px; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; border-radius: 5px; color: inherit; text-decoration: none; }
.lk-menu button:hover:not(:disabled), .lk-menu a:hover { background: #f1f5f9; }
.lk-menu button:disabled { color: #94a3b8; cursor: default; }
.lk-menu hr { border: 0; border-top: 1px solid #e2e8f0; margin: 3px 0; }
.lk-menu .h { font-size: 11px; color: #64748b; padding: 4px 10px 1px; }
@media (max-width: 1100px) {
  .lk-main, .lk-split { grid-template-columns: 1fr; height: auto; }
  .lk-stats { grid-template-columns: repeat(3, 1fr); }
  .vt { height: 420px; flex: none; }
}
