/* =====================================================================
   Dovoljenja · dvigalo — Šolski center Celje
   Slog usklajen z zasnovo (Claude Design).
   ===================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
  color: #1f2d3d;
  background: #eef1f4;
  -webkit-font-smoothing: antialiased;
}
a { color: #1c5a94; text-decoration: none; }
a:hover { color: #103a5d; text-decoration: underline; }
input, select, textarea, button { font-family: inherit; }
::placeholder { color: #98a4b0; }

@keyframes scFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scPop  { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes scToast{ from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---- Osnovna postavitev ---- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.container { flex: 1; padding: 26px 30px 60px; max-width: 1320px; width: 100%; margin: 0 auto; }

/* ---- Glava ---- */
.appbar {
  background: #103a5d; color: #fff; padding: 0 26px; min-height: 62px;
  display: flex; align-items: center; gap: 22px; position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 34px; height: 34px; border-radius: 8px; background: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; color: #103a5d; font-size: 15px;
}
.brand-title { font-size: 15.5px; font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: 11.5px; font-weight: 400; color: rgba(255,255,255,.6); }
.appbar-spacer { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.user-box { text-align: right; line-height: 1.2; }
.user-name { font-size: 14px; font-weight: 700; }
.user-role { font-size: 11.5px; color: rgba(255,255,255,.62); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #2a6ca8; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.iconbtn {
  background: rgba(255,255,255,.1); border: none; color: #fff; width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
  position: relative; text-decoration: none;
}
.iconbtn:hover { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }
.iconbtn .dot-count {
  position: absolute; top: -5px; right: -5px; background: #e0483d; color: #fff; font-size: 10.5px;
  font-weight: 700; min-width: 17px; height: 17px; border-radius: 999px; display: flex; align-items: center;
  justify-content: center; padding: 0 4px;
}

/* ---- Podnavigacija (tehnik) ---- */
.subnav { display: flex; gap: 4px; background: #e4e9ee; padding: 4px; border-radius: 10px; margin-bottom: 22px; width: fit-content; }
.subnav a {
  padding: 8px 18px; border-radius: 7px; font-size: 14px; font-weight: 700; cursor: pointer;
  color: #5c6b7a; text-decoration: none; transition: all .15s;
}
.subnav a:hover { text-decoration: none; }
.subnav a.active { background: #fff; color: #103a5d; box-shadow: 0 1px 2px rgba(16,58,93,.12); }

/* ---- Naslov strani + orodna vrstica ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 24px; margin: 0 0 4px; color: #103a5d; font-weight: 700; }
.page-sub { font-size: 14px; color: #6a7683; margin: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; }

.search {
  padding: 10px 14px 10px 36px; border: 1.5px solid #d7dee5; border-radius: 9px; font-size: 14px; width: 240px;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2216%22 height=%2216%22 fill=%22none%22 stroke=%22%236a7683%22 stroke-width=%222%22><circle cx=%227%22 cy=%227%22 r=%225%22/><path d=%22M11 11l4 4%22/></svg>') 12px center no-repeat;
  color: #23303e;
}
.search:focus { outline: none; border-color: #1c5a94; }

/* ---- Gumbi ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  border-radius: 9px; font-size: 14.5px; font-weight: 700; cursor: pointer; border: 1.5px solid transparent;
  white-space: nowrap; transition: all .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #103a5d; color: #fff; border-color: #103a5d; }
.btn-primary:hover { background: #16406a; color: #fff; }
.btn-ghost { background: #fff; border-color: #d7dee5; color: #4a5763; }
.btn-ghost:hover { background: #f2f4f7; color: #4a5763; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 7px; }

.act-approve { background: #dcfce7; color: #166534; border: 1px solid #b6ecc7; }
.act-approve:hover { background: #c9f5d8; }
.act-reject  { background: #fff; color: #b4232a; border: 1px solid #f2c4c6; }
.act-reject:hover { background: #fdeded; }
.act-issue   { background: #103a5d; color: #fff; border: none; }
.act-issue:hover { background: #16406a; }
.act-return  { background: #eef2f6; color: #33414f; border: 1px solid #d7dee5; }
.act-return:hover { background: #e2e8ee; }
.act-done { color: #b3bcc5; font-size: 13px; align-self: center; }
.row-actions { display: inline-flex; gap: 7px; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; display: inline; }

/* ---- Filtri ---- */
.filters { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px;
  font-weight: 700; cursor: pointer; transition: all .15s; background: #fff; color: #4a5763; border: 1.5px solid #dde3e9;
  text-decoration: none;
}
.filter:hover { text-decoration: none; }
.filter.active { background: #103a5d; color: #fff; border-color: #103a5d; }
.filter .count {
  min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; font-size: 12px;
  background: #eef2f6; color: #66727e;
}
.filter.active .count { background: rgba(255,255,255,.22); color: #fff; }

/* ---- Kartica in tabela ---- */
.card { background: #fff; border: 1px solid #e4e9ee; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,58,93,.04); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead tr { background: #f6f8fa; text-align: left; color: #66727e; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.table th { padding: 12px 16px; font-weight: 700; }
.table td { padding: 13px 16px; vertical-align: top; }
.table tbody tr { border-top: 1px solid #eef1f4; }
.th-right, .td-right { text-align: right; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

.cell-strong { font-weight: 700; color: #23303e; }
.cell-meta { font-size: 12.5px; color: #78838f; margin-top: 2px; }
.cell-muted { color: #3d4a57; }
.cell-dim { color: #78838f; font-size: 12.5px; }

.days { font-size: 11.5px; font-weight: 700; color: #6a7683; margin-top: 4px; }
.days.urgent { color: #b4232a; }
.overdue { font-size: 11.5px; color: #b4232a; font-weight: 700; margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }

.empty { padding: 46px; text-align: center; color: #8a95a1; font-size: 14.5px; }
.note { font-size: 12.5px; color: #9aa4ae; margin: 16px 2px 0; line-height: 1.5; }

/* ---- Modalno okno ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,32,50,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; animation: scFade .15s ease; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; box-shadow: 0 24px 60px rgba(16,32,50,.3); animation: scPop .2s ease; overflow: hidden; max-height: 92vh; display: flex; flex-direction: column; }
.modal-head { padding: 22px 26px; border-bottom: 1px solid #eef1f4; display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 20px; margin: 0; color: #103a5d; font-weight: 700; }
.modal-head p { font-size: 13.5px; color: #6a7683; margin: 4px 0 0; }
.modal-close { background: #f2f4f7; border: none; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 17px; color: #6a7683; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.modal-close:hover { background: #e6eaef; color: #6a7683; text-decoration: none; }
.modal-body { padding: 24px 26px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.modal-foot { padding: 18px 26px; border-top: 1px solid #eef1f4; display: flex; justify-content: flex-end; gap: 10px; background: #fafbfc; }

/* ---- Polja obrazcev ---- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: #3d4a57; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid #d7dee5; border-radius: 9px; font-size: 14.5px; color: #23303e; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #1c5a94; }
.field textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-razred { display: grid; grid-template-columns: 1fr 1.6fr; gap: 14px; }
.form-error { background: #fdeded; color: #b4232a; padding: 10px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 700; }

/* ---- Obvestila (flash/toast) ---- */
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.toast { width: 360px; background: #fff; border: 1px solid #e4e9ee; border-left: 4px solid #2a6ca8; border-radius: 12px; box-shadow: 0 16px 44px rgba(16,32,50,.2); padding: 16px 18px; display: flex; gap: 13px; animation: scToast .25s ease; }
.toast.success { border-left-color: #16a34a; }
.toast.error { border-left-color: #dc2626; }
.toast-icon { width: 38px; height: 38px; border-radius: 9px; background: #e8f0f8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.toast.error .toast-icon { background: #fdeded; }
.toast.success .toast-icon { background: #e7f7ec; }
.toast-kicker { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #2a6ca8; text-transform: uppercase; margin-bottom: 3px; }
.toast.success .toast-kicker { color: #16a34a; }
.toast.error .toast-kicker { color: #dc2626; }
.toast-body { font-size: 13.5px; color: #23303e; line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; color: #a9b3bd; font-size: 15px; align-self: flex-start; }

/* ---- Nastavitve ---- */
.settings-card { background: #fff; border: 1px solid #e4e9ee; border-radius: 12px; box-shadow: 0 1px 3px rgba(16,58,93,.04); margin-bottom: 22px; overflow: hidden; }
.settings-card-head { padding: 18px 22px; border-bottom: 1px solid #eef1f4; }
.settings-card-head h2 { font-size: 17px; margin: 0 0 3px; color: #23303e; font-weight: 700; }
.settings-card-head p { font-size: 13px; color: #6a7683; margin: 0; }
.settings-card-body { padding: 18px 22px; }
.settings-foot { padding: 16px 22px; border-top: 1px solid #eef1f4; display: flex; justify-content: flex-end; background: #fafbfc; }
.tag { padding: 3px 10px; background: #dbeafe; color: #1e40af; border-radius: 999px; font-size: 12px; font-weight: 700; }

.info-box { display: flex; gap: 12px; align-items: flex-start; margin: 16px 22px; padding: 13px 15px; background: #eef5fb; border: 1px solid #d3e3f2; border-radius: 10px; font-size: 13px; color: #33475b; line-height: 1.55; }
.info-box strong { color: #103a5d; }
.ms-logo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 15px; height: 15px; }
.ms-logo span { display: block; }
.ms-badge { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.school-code { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 4px 9px; background: #e8f0f8; color: #103a5d; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.chip-toggle { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .12s; background: #fff; color: #6a7683; border: 1.5px solid #dde3e9; user-select: none; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle.on, .chip-toggle:has(input:checked) { background: #103a5d; color: #fff; border-color: #103a5d; }
.settings-select { width: 100%; max-width: 240px; padding: 9px 11px; border: 1.5px solid #d7dee5; border-radius: 8px; font-size: 14px; background: #fff; color: #23303e; }

.user-add-label { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: #66727e; text-transform: uppercase; margin-bottom: 10px; }
.user-add-grid { display: grid; grid-template-columns: 1.3fr 1.5fr 1fr 1fr auto; gap: 10px; align-items: center; }
.user-add-grid input, .user-add-grid select { padding: 10px 12px; border: 1.5px solid #d7dee5; border-radius: 8px; font-size: 14px; color: #23303e; background: #fff; }
.user-add-grid select:disabled { background: #f2f4f7; color: #a9b3bd; }
.role-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.role-tajnica { background: #fef3c7; color: #92400e; }
.role-ravnatelj { background: #dcfce7; color: #166534; }
.role-tehnik { background: #dbeafe; color: #1e40af; }
.link-ok { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: #16a34a; }
.link-warn { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: #b4232a; }

.tehnik-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tehnik-card { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; background: #f6f8fa; border: 1px solid #e4e9ee; border-radius: 10px; }
.tehnik-card .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.tehnik-name { font-size: 14px; font-weight: 700; color: #23303e; }
.tehnik-email { font-size: 12px; color: #78838f; }

/* ---- Obvestila – seznam ---- */
.notif-panel { position: absolute; top: 54px; right: 26px; width: 400px; max-width: calc(100vw - 40px); background: #fff; border: 1px solid #e4e9ee; border-radius: 12px; box-shadow: 0 20px 50px rgba(16,32,50,.24); z-index: 40; overflow: hidden; }
.notif-head { padding: 14px 16px; border-bottom: 1px solid #eef1f4; display: flex; align-items: center; justify-content: space-between; }
.notif-head h3 { margin: 0; font-size: 15px; color: #103a5d; }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-item { padding: 13px 16px; border-top: 1px solid #f2f4f7; }
.notif-item.unread { background: #f4f8fc; }
.notif-item .n-title { font-size: 13.5px; font-weight: 700; color: #23303e; line-height: 1.3; }
.notif-item .n-body { font-size: 12.5px; color: #6a7683; margin-top: 3px; line-height: 1.4; }
.notif-item .n-time { font-size: 11px; color: #a9b3bd; margin-top: 5px; }
.notif-empty { padding: 30px 16px; text-align: center; color: #8a95a1; font-size: 13.5px; }
.notif-foot { padding: 10px 16px; border-top: 1px solid #eef1f4; background: #fafbfc; }

/* ---- Prijava ---- */
.login-grid { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-left { background: linear-gradient(150deg, #103a5d 0%, #16406a 55%, #1c5a94 100%); color: #fff; padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-left .blob1 { position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.05); }
.login-left .blob2 { position: absolute; right: 40px; bottom: -140px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.04); }
.login-brand { display: flex; align-items: center; gap: 14px; position: relative; }
.login-brand .bx { width: 46px; height: 46px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #103a5d; font-size: 20px; letter-spacing: -1px; }
.login-brand .bt { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.login-mid { position: relative; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .4px; margin-bottom: 26px; }
.badge-pill .g { width: 8px; height: 8px; border-radius: 50%; background: #7fd1a8; }
.login-mid h1 { font-size: 42px; line-height: 1.1; margin: 0 0 18px; font-weight: 700; letter-spacing: -.5px; }
.login-mid p { font-size: 17px; line-height: 1.55; margin: 0; color: rgba(255,255,255,.82); max-width: 440px; }
.login-foot { position: relative; display: flex; gap: 28px; font-size: 13.5px; color: rgba(255,255,255,.7); }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; margin: 0 0 8px; font-weight: 700; color: #103a5d; }
.login-card > p { font-size: 15px; color: #5c6b7a; margin: 0 0 28px; line-height: 1.5; }
.ms-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 18px; background: #fff; border: 1.5px solid #d3dbe3; border-radius: 10px; cursor: pointer; font-size: 15.5px; font-weight: 700; color: #23282e; transition: border-color .15s, box-shadow .15s; text-decoration: none; }
.ms-btn:hover { border-color: #1c5a94; box-shadow: 0 4px 14px rgba(16,58,93,.12); color: #23282e; text-decoration: none; }
.ms-btn .ms-logo { grid-template-columns: 1fr 1fr; width: 20px; height: 20px; gap: 2px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: #a9b3bd; font-size: 13px; }
.divider .line { height: 1px; background: #e1e6eb; flex: 1; }
.login-note { font-size: 13px; color: #8a95a1; line-height: 1.5; margin: 20px 0 0; text-align: center; }
.login-form .field { margin-bottom: 14px; }
.login-form .btn-primary { width: 100%; padding: 13px; }

@media (max-width: 860px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .user-add-grid { grid-template-columns: 1fr 1fr; }
  .container { padding: 18px 16px 50px; }
  .table-scroll { overflow-x: auto; }
}
