:root{
  --bg:#f8f8f8;
  --paper:#fff;
  --ink:#363636;
  --muted:#707070;
  --primary-color:#4d4d4d;
  --line:#e7e7e7;
  --surface-soft:#f0f0f0;
  --accent:#afafaf;
  --danger:#a33730
}
.header-actions { display:flex; align-items:center; gap:8px; }
.header-actions form { margin:0; }
.auth-page { display:grid; min-height:100vh; place-items:center; padding:24px; }
.auth-card { width:min(460px,100%); margin:0; padding:36px; background:#fff; border:1px solid #e0e0e0; border-radius:12px; box-shadow:0 12px 40px #00000008; }
.auth-card h1 { text-align:center; font-size:34px; margin:15px 0 26px; }
.auth-card h2 { font-size:21px; font-weight:500; }
.auth-card .login-brand { margin:0 auto; }
.auth-form { display:flex; flex-direction:column; gap:10px; }
.auth-form label { margin-top:8px; }
.auth-form .button { margin-top:15px; min-height:46px; }
.auth-form input { width:100%; }
.auth-form .checkbox input { width:18px; }
.section-divider { border:0; border-top:1px solid #e0e0e0; margin:28px 0; }
#backup-dialog h3 { font-size:19px; }
.page-footer { align-items:center; }
@media(max-width:600px) {
  .auth-card { padding:28px 22px; }
  .topbar .header-actions { gap:2px; }
  .topbar .header-actions .button { font-size:11px; padding:8px; }
  #restore-file { font-size:13px; }
}
.book-open {
  display: block;
  padding: 0;
  background: transparent;
  text-align: left;
  line-height: 1.5;
}
.book-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.mobile-author { display:none; }
tbody tr[data-publication] { cursor: pointer; }
.book-note {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.print-note { display: none; }
#editor { width: min(820px, calc(100% - 32px)); }
#card-dialog { width: min(820px, calc(100% - 32px)); }
.card-caption { font-size: 13px; color: #707070; }
#card-title { font-size: 34px; line-height: 1.3; overflow-wrap: anywhere; margin-top: 18px; }
#card-author { font-size: 20px; color: #606060; margin: 10px 0 30px; overflow-wrap: anywhere; }
.card-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; background: #f6f6f6; border-radius: 8px; }
.card-facts .full { grid-column: 1 / -1; }
.card-facts dt { font-size: 13px; color: #707070; margin-bottom: 5px; }
.card-facts dd { margin: 0; font-size: 18px; color: #333; overflow-wrap: anywhere; }
.card-notes { padding-top: 12px; }
.card-notes h3 { font-size: 15px; font-weight: 600; }
.note-content { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.note-content p, .note-content div { margin: 0 0 .7em; }
.note-content ul, .note-content ol { padding-left: 1.6em; }
@media (max-width: 600px) {
  #card-dialog { padding: 22px 20px; }
  #card-title { font-size: 29px; }
  .card-facts { padding: 18px; gap: 20px 14px; }
}
#editor .form-grid { gap: 22px; }
#editor label { font-size: 15px; }
#editor input:not([type=hidden]) { font-size: 17px; min-height: 48px; }
.note-field { min-width: 0; }
.rich-text-box { border: 1px solid #d5d5d5; border-radius: 6px; margin-top: 7px; overflow: hidden; }
.rich-text-box:focus-within { outline: 2px solid #888; outline-offset: 2px; }
.format-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 7px; background: #f5f5f5; border-bottom: 1px solid #ddd; }
.format-toolbar button { background: transparent; color: #383838; min-width: 40px; min-height: 42px; padding: 7px 11px; border-radius: 4px; font-size: 14px; }
.format-toolbar button:hover { background: #e4e4e4; }
.toolbar-divider { border-left: 1px solid #ccc; margin: 7px 4px; }
.rich-note { min-height: 210px; max-height: 45vh; overflow-y: auto; padding: 16px 18px; font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; color: #333; }
.rich-note:focus { outline: none; }
.rich-note:empty::before { content: attr(data-placeholder); color: #888; pointer-events: none; }
.rich-note p, .rich-note div { margin: 0 0 .65em; }
.rich-note ul, .rich-note ol { padding-left: 1.6em; margin: .5em 0; }
@media (max-width: 600px) {
  #editor { width: calc(100% - 20px); padding: 22px 17px; }
  #editor .form-grid { gap: 18px 12px; }
  .format-toolbar { gap: 2px; padding: 5px; }
  .format-toolbar button { padding: 7px 9px; font-size: 13px; }
  .rich-note { min-height: 200px; padding: 14px; }
}
@media print {
  .print-note { display: block; font-size: 9pt; white-space: pre-wrap; overflow-wrap: anywhere; }
  .book-open { color: #000; text-decoration: none; }
}
*{
  box-sizing:border-box
}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:16px/1.5 "Segoe UI",Arial,sans-serif
}
button,input,select,textarea{
  font:inherit
}
button,a,input,select,textarea{
  -webkit-tap-highlight-color:transparent
}
button{
  cursor:pointer
}
button:disabled{
  opacity:.5;
  cursor:not-allowed
}
button:focus-visible,a:focus-visible{
  outline:3px solid #939393;
  outline-offset:4px
}
input:focus,select:focus,textarea:focus{
  outline:2px solid #8c8c8c;
  outline-offset:2px
}
button{
  border:0
}
a{
  color:inherit
}
button[hidden],[hidden]{
  display:none!important
}












.workspace{
  margin-left:0
}
.topbar{
  height:76px;
  padding:0 52px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:var(--muted);
  font-size:12px;
  background:#fbfbfb
}

main{
  max-width:1450px;
  margin:auto;
  padding:48px 52px 25px
}
.page-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:35px;
  gap:20px
}
.eyebrow{
  color:#848484;
  font-size:10px;
  letter-spacing:1.7px;
  font-weight:650
}
h1{
  font:normal 49px/1.18 Georgia,"Times New Roman",serif;
  letter-spacing:-1.5px;
  margin:9px 0 11px
}
h1 span{
  color:#a0a0a0
}
.page-heading p{
  margin:0;
  color:var(--muted);
  font-size:14px
}
.button{
  min-height:44px;
  border-radius:6px;
  padding:11px 17px;
  font-size:13px;
  font-weight:600;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:9px;
  white-space:nowrap;
  transition:background .15s,transform .15s
}
.button:active{
  transform:translateY(1px)
}
.primary{
  background:var(--primary-color);
  color:#fff;
  box-shadow:0 2px 3px #36363610
}
.primary:hover{
  background:#373737
}
.primary span{
  font-size:22px;
  line-height:1
}
.soft{
  background:#f0f0f0;
  color:var(--primary-color);
  border:1px solid #e4e4e4
}
.soft:hover{
  background:#e6e6e6
}
.quiet{
  background:transparent;
  color:#5d5d5d
}
.quiet:hover{
  background:#f0f0f0
}
.danger{
  background:var(--danger);
  color:#fff
}
.search-panel{
  border:1px solid #e1e1e1;
  background:#f1f1f1;
  border-radius:10px;
  padding:25px 28px 18px;
  margin-bottom:33px
}
.search-panel>label{
  display:block;
  font-weight:600;
  font-size:15px;
  margin-bottom:12px
}
.search-input{
  display:flex;
  align-items:center;
  gap:14px;
  background:#fff;
  border:1px solid #dddddd;
  border-radius:6px;
  box-shadow:0 2px 4px #35353510;
  padding:0 17px;
  color:#888888
}
.search-input:focus-within{
  outline:2px solid #8c8c8c;
  outline-offset:2px
}
.search-input input{
  width:100%;
  height:58px;
  border:none;
  background:transparent;
  outline:none!important;
  font-size:16px;
  color:var(--ink);
  min-width:0
}
.search-input input::-webkit-search-cancel-button{
  display:none
}
.search-input input::placeholder{
  color:#979797
}
.search-input button{
  background:none;
  font-size:26px;
  color:#6d6d6d;
  min-width:35px;
  min-height:44px
}
.search-tip{
  font-size:11px;
  color:#7d7d7d;
  margin-top:11px
}
.search-tip button{
  font-size:11px;
  color:#636363;
  background:none;
  border-bottom:1px dotted #aeaeae;
  padding:2px 0;
  margin-left:4px
}
.collection{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 3px 8px #30303003
}
.collection-tools{
  padding:10px 20px;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:12px
}
.collection-tools>div:first-child{
  display:flex;
  gap:12px;
  align-items:center;
  white-space:nowrap
}
.collection h2{
  font-size:16px;
  margin:0;
  font-weight:600
}
#result-count{
  color:#858585;
  font-size:11px;
  background:#f2f2f2;
  padding:3px 8px;
  border-radius:4px
}
.tool-buttons{
  display:flex;
  gap:5px;
  margin-left:auto
}
.tool-buttons .button{
  font-size:12px;
  min-height:38px;
  padding:8px 12px
}
.tool-buttons span{
  font-size:18px
}
#filter-dot{
  color:#797979;
  font-size:10px
}
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  padding:0 25px 20px;
  border-bottom:1px solid var(--line);
  align-items:end
}
.filters label{
  flex:1;
  min-width:140px;
  font-size:12px
}
.filters input,.filters select{
  margin-top:6px;
  min-height:42px;
  font-size:13px;
  padding:8px;
  width:100%
}
table{
  border-collapse:collapse;
  width:100%;
  text-align:left;
  table-layout:fixed
}
thead{
  background:#f9f9f9;
  color:#707070;
  font-size:11px;
  letter-spacing:1px
}
th{
  font-weight:600;
  padding:13px 20px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line)
}
th:first-child{
  padding-left:26px
}
.number-col{
  width:90px
}
.author-col { width:21%; }
.note-col { width:24%; }
.year-col{
  width:70px
}
.action-col{
  width:100px
}
td{
  padding:10px 14px;
  border-bottom:1px solid #efefef;
  font-size:13px;
  vertical-align:middle
}
td:first-child{
  padding-left:26px;
  color:#909090;
  font-variant-numeric:tabular-nums;
  font-size:12px
}
tbody tr:hover{
  background:#fcfcfc
}
.book-title{
  font-weight:600;
  color:#404040;
  font-size:16px;
  margin-bottom:0;
  overflow-wrap:anywhere
}
.book-author{
  font-size:14px;
  color:#828282
}
.book-note{
  display:block;
  font-size:13px;
  color:#707070;
  margin-top:0;
  max-width:100%;
  overflow-wrap:anywhere
}
.year{
  color:#828282;
  font-size:12px
}
.actions{
  display:flex;
  gap:3px;
  justify-content:flex-end
}
.icon-button{
  width:36px;
  height:40px;
  border-radius:5px;
  background:none;
  color:#848484;
  display:inline-grid;
  place-items:center;
  font-size:23px
}
.icon-button:hover{
  background:#eeeeee;
  color:var(--primary-color)
}
.icon-button.delete:hover{
  color:var(--danger);
  background:#ededed
}
.collection-footer{
  padding:16px 26px;
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:#909090;
  background:#fdfdfd
}
.page-footer{
  display:flex;
  justify-content:space-between;
  gap:20px;
  font-size:10px;
  color:#9a9a9a;
  padding-top:24px
}
.page-footer span span{
  margin:0 7px
}
.version{
  padding:3px 7px;
  border:1px solid #e0e0e0;
  border-radius:4px;
  color:#7c7c7c
}
.empty{
  text-align:center;
  padding:54px 20px
}
.empty>span{
  font-size:45px;
  color:#919191
}
.empty h3{
  font:26px Georgia,serif;
  margin:8px 0
}
.empty p{
  font-size:14px;
  color:var(--muted);
  margin-bottom:24px
}
mark{
  background:#e7e7e7;
  color:inherit;
  padding:0 1px;
  border-radius:2px
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%)
}
dialog{
  border:1px solid #e1e1e1;
  border-radius:14px;
  padding:30px;
  width:min(590px,calc(100% - 32px));
  max-height:90vh;
  color:var(--ink);
  box-shadow:0 20px 90px #2f2f2f30
}
dialog::backdrop{
  background:#28282860;
  backdrop-filter:blur(3px)
}
.dialog-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
dialog h2{
  font:normal 29px/1.2 Georgia,serif;
  margin:7px 0
}
.dialog-intro,dialog>p{
  font-size:14px;
  color:var(--muted);
  margin-bottom:24px
}
.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
.form-grid .full{
  grid-column:1/-1
}
label{
  font-size:13px;
  font-weight:600
}
input,textarea,select{
  border:1px solid #dadada;
  border-radius:6px;
  padding:11px 12px;
  color:var(--ink);
  background:#fff
}
textarea{
  resize:vertical;
  min-height:90px
}
label>input:not([type=checkbox]),label>textarea{
  display:block;
  width:100%;
  margin-top:6px
}
.field-hint{
  display:block;
  font-size:11px;
  color:#868686;
  font-weight:400;
  margin-top:6px
}
.required{
  color:#7c7c7c
}
.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:26px;
  border-top:1px solid var(--line);
  padding-top:21px
}
.error{
  font-size:13px;
  color:var(--danger);
  background:#f3f3f3;
  border-radius:5px;
  padding:12px
}
.toast{
  position:fixed;
  bottom:27px;
  left:50%;
  transform:translateX(-50%);
  background:#464646;
  color:#fff;
  border-radius:8px;
  padding:15px 24px;
  box-shadow:0 5px 25px #36363626;
  z-index:10;
  font-size:14px;
  max-width:90vw
}
.output-options{
  display:flex;
  gap:12px;
  flex-wrap:wrap
}
.muted{
  color:var(--muted);
  font-size:14px
}
.login-brand{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border-radius:12px;
  color:#fff;
  background:var(--primary-color);
  font-size:36px;
  margin:0 auto 20px
}
#password{
  display:block;
  width:100%;
  margin:7px 0 18px
}
.checkbox{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:400
}
.checkbox input{
  width:18px;
  height:18px;
  accent-color:var(--primary-color)
}
@media(min-width:1500px){
  main{
    padding-top:60px
  }
  .page-heading{
    margin-bottom:42px
  }
}
@media(max-width:1180px){



  .workspace{
    margin-left:0
  }
  main{
    padding:35px 28px
  }
  .topbar{
    padding:0 28px
  }
  th,td{
    padding-left:12px;
    padding-right:12px
  }
  .number-col{
    width:90px
  }
  .year-col{
    width:62px
  }
  .action-col{
    width:100px
  }
  h1{
    font-size:43px
  }
  .toast{
    left:50%
  }
}
@media(max-width:800px){









  .workspace{
    margin-left:0
  }
  .topbar{
    height:45px;
    padding:0 24px;
    font-size:11px
  }

  main{
    padding:30px 24px
  }
  .toast{
    left:50%
  }
  .search-panel{
    padding:20px
  }
  .search-input input{
    font-size:14px
  }
  .search-input{
    padding:0 12px;
    gap:10px
  }
  .collection-tools{
    flex-direction:row;
    align-items:center
  }
  .tool-buttons{
    align-self:auto
  }
  .tool-buttons .button{
    padding:9px;
    font-size:11px
  }
  .page-heading{
    margin-bottom:26px
  }
  .eyebrow{
    font-size:8px
  }
  h1{
    font-size:40px
  }
  .page-heading p{
    font-size:13px
  }
}
@media screen and (min-width:601px) and (max-width:900px){
  th.note-col, td:nth-child(5) { display:none; }
  .author-col { width:27%; }
}
@media(max-width:600px){
  main{
    padding:28px 16px
  }
  .topbar{
    padding:0 18px
  }


  .page-heading{
    display:block
  }
  .page-heading>.button{
    margin-top:22px;
    width:100%;
    min-height:48px;
    font-size:14px
  }
  .eyebrow{
    font-size:8px;
    letter-spacing:1.4px
  }
  h1{
    font-size:43px;
    margin-top:9px
  }
  .page-heading p{
    font-size:14px
  }
  .search-panel{
    padding:19px 16px;
    margin-bottom:25px
  }
  .search-panel>label{
    font-size:14px
  }
  .search-input input{
    font-size:16px;
    height:54px
  }
  .search-input input::placeholder{
    font-size:13px
  }
  .search-tip{
    font-size:11px;
    line-height:1.8
  }
  .search-tip button{
    margin-left:0
  }
  .collection{
    background:transparent;
    border:0;
    box-shadow:none;
    border-radius:0
  }
  .collection-tools{
    padding:0 0 10px;
    flex-direction:row;
    align-items:center;
    gap:8px
  }
  .collection-tools>div:first-child{
    flex-direction:row;
    align-items:center;
    gap:10px
  }
  .tool-buttons{
    align-self:flex-start;
    gap:7px
  }
  .tool-buttons .button{
    font-size:12px;
    min-height:42px;
    padding:9px 12px
  }
  .filters{
    background:#fff;
    padding:16px;
    border:1px solid var(--line);
    border-radius:8px;
    margin-bottom:16px;
    gap:12px
  }
  .filters label{
    min-width:120px
  }
  .filters .button{
    width:100%
  }
  .table-wrap,table,tbody{
    display:block
  }
  thead{
    display:none
  }
  tbody{
    display:grid;
    gap:12px
  }
  tbody tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    column-gap:12px;
    align-items:center;
    background:#fff!important;
    border:1px solid var(--line);
    border-radius:9px;
    padding:17px 17px 12px;
    position:relative
  }
  td{
    display:block;
    border:0;
    padding:0
  }
  td:first-child{
    grid-column:1;
    padding:0;
    font-size:11px;
    line-height:1.5;
    margin-bottom:8px
  }
  td:first-child::before{
    content:"EV. Č. ";
    font-size:9px;
    letter-spacing:.5px
  }
  td:nth-child(2){
    grid-column:1/-1;
    grid-row:2;
    margin-bottom:0;
    padding-right:0
  }
  .mobile-author{
    display:block;
    margin-top:3px;
    font-size:14px;
    line-height:1.4;
    color:#707070;
    overflow-wrap:anywhere
  }
  .book-title{
    font-size:17px
  }
  .book-author{
    font-size:14px
  }
  .book-note{
    font-size:12px;
    margin-top:7px
  }
  td:nth-child(3){
    display:none
  }
  td:nth-child(4){ grid-column:2; grid-row:1; }
  td:nth-child(5){ grid-column:1/-1; grid-row:3; }
  td.empty-note { display:none; }
  .year{
    font-size:12px
  }
  td:last-child{
    grid-column:3;
    grid-row:1
  }
  .actions{
    margin-right:-7px
  }
  .icon-button{
    height:42px;
    width:40px
  }
  .collection-footer{
    background:transparent;
    padding:18px 0 0
  }

  .page-footer{
    font-size:9px;
    gap:10px
  }
  .page-footer .version{
    margin:0 0 0 5px
  }
  dialog{
    padding:24px 20px
  }
  .dialog-heading h2{
    font-size:26px
  }
  .form-grid{
    gap:16px 12px
  }
  .dialog-actions{
    gap:8px
  }
  .dialog-actions .button{
    font-size:12px;
    padding:10px 12px
  }
  .toast{
    bottom:16px;
    width:max-content;
    max-width:calc(100vw - 30px);
    font-size:13px
  }
}
@media print{
  .mobile-author { display:none; }
  @page{
    size:A4 landscape;
    margin:14mm
  }
  .no-print,.topbar,dialog,.toast{
    display:none!important
  }
  body{
    background:#fff;
    color:#000;
    font-size:10pt
  }
  .workspace{
    margin:0
  }
  main{
    padding:0;
    max-width:none
  }
  .page-heading{
    margin:0 0 20px;
    display:block
  }
  .page-heading .eyebrow{
    display:none
  }
  h1{
    font-size:26pt
  }
  .page-heading p{
    font-size:10pt
  }
  .collection{
    border:0;
    border-radius:0;
    box-shadow:none
  }
  .table-wrap,table{
    display:table;
    width:100%
  }
  tbody{
    display:table-row-group
  }
  thead{
    display:table-header-group
  }
  tbody tr{
    display:table-row;
    break-inside:avoid;
    background:none!important
  }
  th,td{
    display:table-cell!important;
    border-bottom:1px solid #ccc;
    padding:9px!important;
    font-size:9pt;
    vertical-align:top
  }
  td:first-child::before{
    content:none
  }
  .book-title{
    font-size:11pt
  }
  .book-author,.book-note,.year{
    font-size:9pt;
    color:#333;
    background:none;
    padding:0
  }
  mark{
    background:none;
    text-decoration:underline
  }
  .collection-footer{
    background:none;
    color:#333;
    padding:12px 0
  }
  .empty{
    padding:20px
  }
  .empty button{
    display:none
  }

}
