*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #1B4FD8;
  --blue-dk: #1340B8;
  --blue-lt: #EEF3FF;
  --dark:    #0D1B2A;
  --mid:     #3D5166;
  --light:   #F7F9FC;
  --white:   #FFFFFF;
  --accent:  #00C9A7;
  --danger:  #D8341B;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(27,79,216,.10);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--dark); background: var(--white); min-height: 100vh; }

nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid #E4EAF4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; height: 64px;
}
.logo { text-decoration: none; font-weight: 700; font-size: 1.25rem; color: var(--blue); letter-spacing: -.5px; }
.logo span { color: var(--dark); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--mid); font-size: .92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }

main { max-width: 980px; margin: 0 auto; padding: 3rem 5% 5rem; }

.page-header { margin-bottom: 2.5rem; }
.section-label { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: .5rem; }
.page-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--mid); margin-top: .5rem; }

/* cards / lists */
.card-list { display: flex; flex-direction: column; gap: 1.1rem; }
.item-card {
  background: var(--white); border: 1px solid #E8EDF5; border-radius: var(--radius);
  padding: 1.5rem 1.75rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.item-card a.item-title { color: var(--dark); text-decoration: none; }
.item-card a.item-title:hover { color: var(--blue); }
.item-title { font-size: 1.1rem; font-weight: 700; }
.item-meta { color: var(--mid); font-size: .85rem; margin-top: .35rem; }
.item-meta .tag {
  display: inline-block; background: var(--blue-lt); color: var(--blue);
  border-radius: 50px; padding: .15rem .7rem; font-size: .75rem; font-weight: 600; margin-right: .4rem;
}

article.post-body { line-height: 1.75; font-size: 1.02rem; color: var(--dark); margin-top: 1.5rem; }
article.post-body p { margin-bottom: 1rem; }

/* table */
table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data-table th, table.data-table td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid #E8EDF5; font-size: .95rem; }
table.data-table th { background: var(--blue-lt); color: var(--blue-dk); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
table.data-table tr:last-child td { border-bottom: none; }
table.centered-table th, table.centered-table td { text-align: center; }
table.centered-table td:first-child { text-align: left; }

/* data hub (podaci index) */
.data-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.data-group h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: .75rem; padding-bottom: .5rem; border-bottom: 2px solid var(--blue-lt); }
.data-group-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.data-group-links a { color: var(--blue); text-decoration: none; font-size: .92rem; }
.data-group-links a:hover { text-decoration: underline; }

/* table search */
.table-search {
  width: 100%; max-width: 320px; padding: .6rem .9rem; margin-bottom: 1.25rem;
  border: 1.5px solid #DCE4F0; border-radius: 8px; font-family: inherit; font-size: .92rem;
}
.table-search:focus { outline: none; border-color: var(--blue); }

/* buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: .9rem; border-radius: 8px; padding: .6rem 1.3rem; border: none; cursor: pointer; transition: background .2s, transform .2s; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dk); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-lt); }
.btn-danger { background: var(--white); color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #FDEEEB; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }

/* forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--mid); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .65rem .9rem; border: 1.5px solid #DCE4F0; border-radius: 8px;
  font-family: inherit; font-size: .95rem; color: var(--dark);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--blue); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.checkbox-row { display: flex; align-items: center; gap: .5rem; }
.checkbox-row input { width: auto; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .3rem; }

/* admin */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.admin-card {
  display: block; background: var(--white); border: 1px solid #E8EDF5; border-radius: var(--radius);
  padding: 1.75rem; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s;
}
.admin-card:hover { transform: translateY(-3px); }
.admin-card h3 { font-size: 1.05rem; margin-bottom: .4rem; color: var(--dark); }
.admin-card p { color: var(--mid); font-size: .88rem; }
.login-box { max-width: 380px; margin: 6rem auto; background: var(--white); border: 1px solid #E8EDF5; border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.login-box h1 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.alert { padding: .8rem 1.1rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1.25rem; }
.alert-error { background: #FDEEEB; color: var(--danger); }
.alert-success { background: #E7FBF6; color: #0A8F76; }
.empty-state { color: var(--mid); font-style: italic; padding: 2rem 0; }

footer { background: var(--dark); color: rgba(255,255,255,.55); padding: 2.5rem 5%; text-align: center; font-size: .85rem; margin-top: 4rem; }
footer a { color: rgba(255,255,255,.75); }

@media (max-width: 700px) {
  .nav-links { display: none; }
  table.data-table { display: block; overflow-x: auto; }
}
