/* ================================================================
   BOOKS THEME — Complete stylesheet
   Base theme: none (scratch)
   Design: Utilitarian flat / Swiss editorial
   ================================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ink:          #0F1B2D;
  --ink-mid:      #2C3E55;
  --ink-light:    #64748B;
  --amber:        #E8A020;
  --amber-dark:   #C4851A;
  --amber-faint:  #FEF3DC;
  --white:        #FFFFFF;
  --surface:      #F4F6F9;
  --stripe:       #D8DCE3;
  --divider:      #C7CDD6;
  --success:      #166534;
  --success-bg:   #D5F7DF;
  --success-bd:   #78D096;
  --danger:       #991B1B;
  --danger-bg:    #FDC4C4;
  --danger-bd:    #FF99A6;
  --warning-bg:   #FFFBEB;
  --warning-bd:   #FDE68A;
  --warning-text: #92400E;
  --link:         #B8720A;
  --link-hover:   #8F570A;

  --header-h:     58px;
  --px:           clamp(20px, 3.5vw, 40px);
  --radius:       4px;
  --radius-md:    6px;

  --font: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h2 { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
h3 { font-size: 1rem; font-weight: 600; color: var(--ink-mid); margin: 0 0 10px; }

/* ── SKIP LINK ───────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  background: var(--amber);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 10px; }

/* ── VISUALLY HIDDEN ─────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.visually-hidden.focusable:focus {
  position: static !important;
  width: auto; height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ── SECONDARY BAR ───────────────────────────────────────────── */
.secondary-bar {
  background: #080f1a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.secondary-bar__inner {
  padding: 0 var(--px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 34px;
}

.secondary-bar .block,
.secondary-bar nav,
#block-books-theme-account-menu { display: flex; align-items: center; }

.secondary-bar .menu,
#block-books-theme-account-menu ul {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.secondary-bar .menu li a,
#block-books-theme-account-menu ul li a {
  display: inline-block !important;
  padding: 0 16px !important;
  line-height: 34px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  color: rgba(255,255,255,0.75) !important;
  text-decoration: none !important;
  transition: color 0.15s;
}
.secondary-bar .menu li a:hover,
#block-books-theme-account-menu ul li a:hover { color: #fff !important; }

.secondary-bar .menu li + li,
#block-books-theme-account-menu ul li + li {
  border-left: 1px solid rgba(255,255,255,0.25) !important;
}

/* Username display */
.menu-username {
  display: inline-block;
  padding: 0 16px;
  line-height: 34px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff !important;
  border-right: 1px solid rgba(255,255,255,0.25);
}

/* Hide h2 labels in nav blocks */
.secondary-bar h2,
.primary-nav h2,
#block-books-theme-account-menu h2,
#block-books-theme-main-menu h2 { display: none; }

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  background: var(--ink);
  border-bottom: 3px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 500;
}
.site-header__inner {
  padding: 0 var(--px);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Admin toolbar offset */
body.toolbar-fixed .site-header { top: 39px; }
body.toolbar-fixed.toolbar-tray-open .site-header { top: 79px; }
body.toolbar-horizontal.toolbar-tray-open .site-header { top: 79px; }

/* ── SITE BRANDING ───────────────────────────────────────────── */
.site-branding { display: flex; align-items: center; flex-shrink: 0; }

.site-branding > div,
.site-branding #block-books-theme-site-branding {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.site-branding img { height: 36px; width: auto; display: block; }

#block-books-theme-site-branding a {
  display: flex;
  align-items: center;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1;
  white-space: nowrap;
}

/* Site name — second link after logo */
#block-books-theme-site-branding a:not(:first-child) {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em;
}

.site-branding .site-slogan { display: none; }

/* ── PRIMARY NAV ─────────────────────────────────────────────── */
.primary-nav { display: flex; align-items: stretch; margin-left: auto; }
.primary-nav > div { display: flex; align-items: stretch; }
.primary-nav nav,
#block-books-theme-main-menu { display: flex; align-items: stretch; }

.primary-nav .menu,
#block-books-theme-main-menu ul {
  display: flex;
  gap: 0;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav .menu li a,
#block-books-theme-main-menu ul li a {
  display: flex !important;
  align-items: center !important;
  height: var(--header-h) !important;
  padding: 0 24px !important;
  color: rgba(255,255,255,0.9) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border-bottom: 3px solid transparent !important;
  margin-bottom: -3px !important;
  transition: color 0.15s, border-color 0.15s, background 0.15s !important;
  white-space: nowrap !important;
}

.primary-nav .menu li a:hover,
.primary-nav .menu li.menu-item--active-trail > a,
#block-books-theme-main-menu ul li a:hover,
#block-books-theme-main-menu ul li a.is-active,
#block-books-theme-main-menu ul li a[aria-current="page"],
#block-books-theme-main-menu ul li.menu-item--active-trail > a {
  color: #fff !important;
  border-bottom-color: var(--amber) !important;
  background: rgba(255,255,255,0.2) !important;
  text-decoration: none !important;
}

/* ── CONTENT TYPE INDICATOR BAR ──────────────────────────────── */
.content-type-bar {
  padding: 12px var(--px);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  border-top: none;
}
.content-type-bar--faktura {
  background: #BBFACB;
  color: #0F5130;
  border-bottom: 2px solid #6EE89A;
}
.content-type-bar--izvod {
  background: #BFDBFE;
  color: #1037A0;
  border-bottom: 2px solid #7CB9FD;
}
.content-type-bar__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.content-type-bar--faktura .content-type-bar__dot { background: #0F5130; }
.content-type-bar--izvod .content-type-bar__dot { background: #1037A0; }

/* ── HIGHLIGHTED (messages) ──────────────────────────────────── */
.highlighted-region {
  padding: 0 var(--px);
  margin-top: 0;
}

.messages {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 1rem;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.messages--status  { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.messages--error   { background: var(--danger-bg);  color: var(--danger);  border-left: 4px solid var(--danger); }
.messages--warning { background: var(--warning-bg); color: var(--warning-text); border-left: 4px solid #F59E0B; }
.messages__list { margin: 0; padding: 0; list-style: none; }
.messages a { color: inherit; text-decoration: underline; }

/* ── MAIN CONTENT AREA ───────────────────────────────────────── */
.main-content { width: 100%; }
.content-above { padding: 24px var(--px) 0; }
.main-layout { padding: 20px var(--px) 24px; }
.main-layout--has-sidebar { display: flex; gap: 32px; align-items: flex-start; }
.main-layout__content { flex: 1; min-width: 0; }
.main-layout__sidebar { width: 260px; flex-shrink: 0; }
.content-below { padding: 0 var(--px) 24px; }

/* ── PAGE TITLE ──────────────────────────────────────────────── */
h1.page-title,
h1.title,
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
  padding: 0;
  line-height: 1.2;
}

/* ── LOCAL TASKS (View/Edit/Delete tabs) ─────────────────────── */
.block-local-tasks-block { margin-bottom: 20px; }

#block-books-theme-primary-local-tasks ul,
.block-local-tasks-block ul,
ul.tabs--primary {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  list-style: none !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border-bottom: 2px solid var(--divider) !important;
  gap: 0 !important;
}

#block-books-theme-primary-local-tasks ul li,
.block-local-tasks-block ul li,
ul.tabs--primary li { display: block !important; width: auto !important; }

#block-books-theme-primary-local-tasks ul li a,
.block-local-tasks-block ul li a,
ul.tabs--primary li a {
  display: block !important;
  padding: 8px 18px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--ink-light) !important;
  text-decoration: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px !important;
  white-space: nowrap !important;
  transition: color 0.15s, border-color 0.15s !important;
}

#block-books-theme-primary-local-tasks ul li a:hover,
#block-books-theme-primary-local-tasks ul li a.is-active,
.block-local-tasks-block ul li a:hover,
.block-local-tasks-block ul li a.is-active,
ul.tabs--primary li a:hover,
ul.tabs--primary li.is-active > a {
  color: var(--amber) !important;
  border-bottom-color: var(--amber) !important;
  text-decoration: none !important;
}

/* ── TABLES ──────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background: transparent;
  margin-bottom: 20px;
}

thead { background: var(--ink) !important; border-bottom: none !important; }

thead th {
  text-align: left;
  padding: 11px 12px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255) !important;
  background: var(--ink) !important;
  border: none !important;
  white-space: nowrap !important;
}

thead th a { color: rgba(255,255,255,0.65) !important; text-decoration: none !important; }
thead th a:hover { color: #fff !important; }

thead th.is-active,
thead th.active { border-bottom: 3px solid var(--amber) !important; }
thead th.is-active a,
thead th.active a { color: var(--amber) !important; }
thead th .tablesort { color: var(--amber) !important; }

tbody tr { border: none; }
tbody tr:nth-child(odd)  { background: var(--white); }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:hover           { background: #E8F0FB; }

tbody td {
  padding: 11px 12px;
  border: none;
  vertical-align: middle;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}

tbody td a { color: var(--link) !important; font-weight: 500; }
tbody td a:hover { color: var(--link-hover) !important; text-decoration: underline; }

tfoot td {
  padding: 9px 12px;
  border-top: 1px solid var(--divider);
  font-size: 0.8rem;
  color: var(--ink-light);
}

/* ── PAGER ───────────────────────────────────────────────────── */
nav.pager { display: block; }

.pager__items, ul.pager, .pager {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 24px 0 0;
  list-style: none;
  margin: 0;
}

.pager__item a,
.pager__item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-light);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  background: transparent;
}
.pager__item a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.pager__item.is-active span,
.pager__item--current span { background: var(--amber); color: #fff; }
.pager__item--first a,
.pager__item--last a,
.pager__item--previous a,
.pager__item--next a { color: var(--ink-mid); }

/* ── RESULT SUMMARY FOOTER ───────────────────────────────────── */
.views-element-container footer {
  text-align: center;
  margin: 1rem 0;
  color: #555;
  font-size: 0.9rem;
}

/* ── VIEWS EXPOSED FILTER ────────────────────────────────────── */
.views-exposed-form {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
}

.views-exposed-form .js-form-type-textfield {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.views-exposed-form input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.views-exposed-form input[type="text"]:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.15);
}

.views-exposed-form .form-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  margin: 0;
}

.views-exposed-form .form-submit {
  padding: 0.5rem 1.25rem;
  background: var(--amber);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.views-exposed-form .form-submit:hover { background: var(--amber-dark); }

.views-exposed-form label { display: none; }

/* ── VIEW HEADER ─────────────────────────────────────────────── */
.view-header { margin-bottom: 12px; }
.view-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-light);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--divider);
  margin-bottom: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.button, button,
input[type="submit"],
input[type="button"],
.form-submit {
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  line-height: 1.4;
  display: inline-block;
  text-decoration: none;
  transition: background 0.15s;
}
.button:hover, button:hover,
input[type="submit"]:hover { background: var(--amber-dark); color: #fff; text-decoration: none; }
.button--secondary { background: var(--surface); color: var(--ink); }
.button--secondary:hover { background: var(--divider); color: var(--ink); }
.button--danger { background: var(--danger); }
.button--danger:hover { background: #7F1D1D; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-item { margin-bottom: 16px; }
.form-item label {
  display: block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mid); margin-bottom: 5px;
}
.form-item input[type="text"],
.form-item input[type="email"],
.form-item input[type="password"],
.form-item input[type="number"],
.form-item input[type="date"],
.form-item textarea,
.form-item select {
  width: 100%; max-width: 480px;
  border: 1px solid var(--divider); border-radius: var(--radius);
  padding: 8px 12px; font-family: var(--font); font-size: 0.9rem;
  color: var(--ink); background: var(--white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.15);
}
.form-item .description { font-size: 0.78rem; color: var(--ink-light); margin-top: 4px; line-height: 1.4; }
.form-required { color: var(--danger); margin-left: 2px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-item--type-checkbox,
.form-item--type-radio { display: flex; align-items: center; gap: 8px; }
.form-item--type-checkbox label,
.form-item--type-radio label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.9rem; }

/* ── FLAG: PREGLEDANO ────────────────────────────────────────── */
.flag-pregledano a {
  display: inline-block;
  padding: 8px 18px; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600;
  color: #fff; background: var(--amber);
  text-decoration: none; border: none; margin-bottom: 16px;
  transition: background 0.15s;
}
.flag-pregledano a:hover { background: var(--amber-dark); color: #fff; text-decoration: none; }
.flag-pregledano.action-unflag a { background: var(--ink-light); }
.flag-pregledano.action-unflag a:hover { background: var(--ink-mid); }

/* ── FAKTURA/IZVOD STATUS BADGE ──────────────────────────────── */
.faktura-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; margin-bottom: 18px;
}
.pregledana { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-bd); }
.nepregledana { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-bd); }

/* ── IZVODI VIEW — STATUS COLUMN ─────────────────────────────── */
td.views-field-flagged {
  padding: 8px !important;
  vertical-align: middle;
  width: 1%;
  white-space: nowrap;
}

td.views-field-flagged .status-pregledano,
td.views-field-flagged .status-nepregledano {
  display: inline-block;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
}

td.views-field-flagged .status-pregledano {
  background: #0F5130;
  color: white;
}

td.views-field-flagged .status-nepregledano {
  background: #8B0000;
  color: white;
}

/* ── IZVODI VIEW — OTVORI BUTTON ─────────────────────────────── */
td.views-field-view-node a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--amber);
  color: white !important;
  border: none;
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none !important;
  font-size: 1rem;
  transition: background 0.25s ease;
}
td.views-field-view-node a:hover {
  background: var(--amber-dark);
  color: white !important;
  text-decoration: none !important;
}

/* ── LANDING PAGE BOXES ──────────────────────────────────────── */
.landing-boxes {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  margin-top: 32px !important;
}

.landing-box,
.main-content a.landing-box,
.region-content a.landing-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  height: 180px !important;
  border-radius: 6px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  text-decoration: none !important;
  transition: filter 0.2s, transform 0.2s !important;
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
}

.landing-box--fakture { background: #1E3A5F !important; }
.landing-box--izvodi  { background: #1A4A3A !important; }

.landing-box:hover {
  filter: brightness(1.15) !important;
  transform: translateY(-3px) !important;
  color: #fff !important;
  text-decoration: none !important;
}
.landing-box::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--amber); opacity: 0;
  transition: opacity 0.2s;
}
.landing-box:hover::after { opacity: 1; }
.landing-box svg { width: 48px; height: 48px; opacity: 0.9; }

/* ── STATUS MESSAGES ─────────────────────────────────────────── */
.messages {
  position: relative;
  margin: 16px 0;
  padding: 12px 16px 12px 44px;
  border-left: 4px solid;
  border-radius: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
.messages::before {
  position: absolute;
  left: 16px;
  top: 12px;
  font-weight: 700;
}
.messages--status  { background: #DCFCE7; color: #14532D; border-color: #16A34A; }
.messages--status::before  { content: '✓'; }
.messages--warning { background: #FEF3C7; color: #78350F; border-color: #E8A020; }
.messages--warning::before { content: '!'; }
.messages--error   { background: #FEE2E2; color: #7F1D1D; border-color: #DC2626; }
.messages--error::before   { content: '✕'; }
.messages ul { margin: 0; padding-left: 1.2em; }
.messages a  { color: inherit; text-decoration: underline; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  border-top: 3px solid var(--amber);
  margin-top: 0;
}
.site-footer__inner {
  padding: 28px var(--px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}
.site-footer a { color: rgba(255,255,255,0.5); }
.site-footer a:hover { color: #fff; }

/* ── MISC ────────────────────────────────────────────────────── */
.feed-icon { display: none; }
.more-link { margin-top: 12px; font-size: 0.85rem; }
.more-link a { color: var(--link); font-weight: 600; }
.item-list ul { list-style: none; padding: 0; }
.item-list ul li { padding: 4px 0; border-bottom: 1px solid var(--divider); font-size: 0.875rem; }
details { border: 1px solid var(--divider); border-radius: var(--radius); margin-bottom: 12px; }
summary { padding: 10px 14px; font-weight: 600; cursor: pointer; font-size: 0.875rem; }
details[open] summary { border-bottom: 1px solid var(--divider); }
details .details-wrapper { padding: 14px; }
.block-local-actions-block { margin-bottom: 16px; }
.block-local-actions-block ul { display: flex; gap: 8px; }
.block-local-actions-block .button { font-size: 0.8rem; padding: 6px 14px; }

/* ══════════════════════════════════════════════════════════════════
   FAKTURA / IZVOD NODE PAGE
   ══════════════════════════════════════════════════════════════════ */

/* Hide "Submitted by" */
.node--faktura .node__meta,
.node--faktura .submitted,
.node--izvod .node__meta,
.node--izvod .submitted { display: none !important; }

/* ── ACTIONS BAR ── */
.faktura-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.faktura-actions .faktura-status {
  font-size: 0.92rem !important;
  padding: 10px 18px !important;
  margin-bottom: 0 !important;
}
.faktura-actions .flag-pregledano a {
  background: var(--amber) !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  margin-bottom: 0 !important;
}
.faktura-actions .flag-pregledano a:hover { background: var(--amber-dark) !important; }
.faktura-actions .flag-pregledano.action-unflag a { background: var(--ink-light) !important; }

/* ── TWO COLUMN LAYOUT ── */
.faktura-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* ── LEFT: META FIELDS ── */
.faktura-meta { display: flex; flex-direction: column; gap: 0; }

.faktura-field { padding: 16px 0; border-bottom: 1px solid var(--divider); }
.faktura-field:last-child { border-bottom: none; }

.faktura-field__label {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-light); margin-bottom: 6px;
}

.faktura-field__value { font-size: 1.05rem; color: var(--ink); font-weight: 500; }
.faktura-field__value--large { font-size: 1.3rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.faktura-field__value--note { font-size: 1rem; color: var(--ink-mid); font-style: italic; line-height: 1.5; }
.faktura-field__value .field,
.faktura-field__value .field__item { display: inline; }

/* Suma inline */
.faktura-field--suma { display: flex; align-items: baseline; gap: 12px; }
.faktura-field--suma .faktura-field__label { margin-bottom: 0; flex-shrink: 0; }
.faktura-field__value--suma {
  font-size: 2rem; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}

/* ── RIGHT: DOCUMENT PANEL ── */
.faktura-document__inner {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: sticky;
  top: 80px;
}
.faktura-document__icon svg {
  width: 72px; height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}
.faktura-document__label {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-light);
}
.faktura-document__missing { font-size: 0.85rem; color: var(--ink-light); font-style: italic; }
.faktura-document__meta {
  font-size: 0.78rem; color: var(--ink-light);
  padding-top: 12px; border-top: 1px solid var(--divider);
  width: 100%; text-align: center;
}

/* Download button — hide filename, show custom label */
.faktura-download .field--type-file .file a,
.faktura-download a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 14px 20px !important;
  color: #fff !important;
  font-size: 0px !important;
  font-weight: 700 !important;
  border-radius: var(--radius) !important;
  text-decoration: none !important;
  transition: background 0.15s !important;
}
.faktura-download .field--type-file .file a::before,
.faktura-download a::before {
  content: '↓  Preuzmi Dokument';
  font-size: 1rem; font-weight: 700; color: #fff;
}
.faktura-download .file-size { display: none; }

/* Faktura download — green */
.node--faktura .faktura-download .field--type-file .file a,
.node--faktura .faktura-download a { background: #0F5130 !important; }
.node--faktura .faktura-download .field--type-file .file a:hover,
.node--faktura .faktura-download a:hover { background: #166534 !important; }

/* Izvod download — blue */
.node--izvod .faktura-download .field--type-file .file a,
.node--izvod .faktura-download a,
.izvod-download .field--type-file .file a,
.izvod-download a { background: #1037A0 !important; }
.node--izvod .faktura-download .field--type-file .file a:hover,
.node--izvod .faktura-download a:hover,
.izvod-download .field--type-file .file a:hover,
.izvod-download a:hover { background: #2C5282 !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .views-element-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  :root { --header-h: 50px; --px: 16px; }
  .site-header__inner { gap: 12px; }
  .primary-nav .menu li a,
  #block-books-theme-main-menu ul li a { padding: 0 12px !important; font-size: 0.8rem !important; }
  table { font-size: 0.8rem; }
  thead th, tbody td { padding: 7px 8px !important; }
  .views-exposed-form { flex-direction: column; }
  .views-exposed-form input[type="text"] { min-width: 100%; }
  .landing-boxes { grid-template-columns: 1fr !important; }
  .landing-box { height: 120px !important; }
  .main-layout--has-sidebar { flex-direction: column; }
  .main-layout__sidebar { width: 100%; }
  .faktura-layout { grid-template-columns: 1fr; }
  .faktura-document__inner { position: static; }
  .faktura-field__value--suma { font-size: 1.5rem; }
  td.views-field-view-node a {
  white-space: normal;
  text-align: center;
  }
}

@media (max-width: 600px) {
  h1.page-title { font-size: 1.2rem; }
  .primary-nav .menu li a,
  #block-books-theme-main-menu ul li a { padding: 0 10px !important; font-size: 0.72rem !important; }
}

/* Force equal width on status badges */
td.views-field-flagged {
  width: 220px;
  min-width: 220px;
}

td.views-field-flagged .status-pregledano,
td.views-field-flagged .status-nepregledano {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Full-page login */
body.path-user-login {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0F1B2D;
}

body.path-user-login .layout-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.path-user-login #block-books-theme-page-title,
body.path-user-login .region-highlighted {
  display: none;
}

body.path-user-login .block-system-main-block {
  background: white;
  padding: 48px 40px;
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

body.path-user-login h1.page-title {
  display: none;
}

body.path-user-login #user-login-form::before {
  content: "Books";
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #0F1B2D;
  margin-bottom: 8px;
}

body.path-user-login #user-login-form::after {
  content: "Prijavite se na vaš nalog";
  display: block;
  color: #6B7280;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

body.path-user-login label {
  font-weight: 600;
  color: #0F1B2D;
  display: block;
  margin-bottom: 6px;
}

body.path-user-login input[type="text"],
body.path-user-login input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #D1D5DB;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

body.path-user-login input[type="text"]:focus,
body.path-user-login input[type="password"]:focus {
  outline: none;
  border-color: #E8A020;
}

body.path-user-login input[type="submit"] {
  width: 100%;
  background: #E8A020;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

body.path-user-login input[type="submit"]:hover {
  background: #c87d10;
}