/* GARAGE TOOLBOX — app-specifični stilovi.
   Pravilo: ovde ide SAMO ono što je jedinstveno za Garage.
   Sve što bi i Driver koristio ide u ../core/css/core.css.  */

/* Dnevnik — termini */
.apt-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: .75rem; }
.apt-row .rowmain { flex: 1; background: none; border: none; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: .2rem; padding: 0; }
.apt-row .rowmain b { font-size: .95rem; }
.apt-row .rowmain .muted { font-size: .78rem; color: var(--c-muted, #888); }

.apt-scheduled { border-left: 3px solid var(--c-primary, #3b82f6); }
.apt-active     { border-left: 3px solid #f59e0b; background: rgba(245,158,11,.06); }
.apt-done       { border-left: 3px solid var(--c-ok, #22c55e); opacity: .65; }
.apt-cancelled  { border-left: 3px solid #ef4444; opacity: .5; }

.aptbtn { border: none; border-radius: 5px; padding: .3rem .6rem; font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.aptbtn.start { background: #f59e0b; color: #fff; }
.aptbtn.done  { background: var(--c-ok, #22c55e); color: #fff; }

/* Stats */
.stat-big { font-size: 1.8rem; font-weight: 700; color: var(--c-primary, #D5281B); margin: .3rem 0; }
.stat-sub { font-size: .85rem; color: var(--c-muted, #888); }

.stat-bar-row { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; font-size: .82rem; }
.stat-bar-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-bar-track { width: 90px; height: 8px; background: #e5e7eb; border-radius: 4px; flex-shrink: 0; }
.stat-bar-fill  { height: 100%; background: var(--c-primary, #D5281B); border-radius: 4px; }
.stat-bar-val   { min-width: 1.5rem; text-align: right; font-weight: 600; }

.month-chart { display: flex; align-items: flex-end; gap: .4rem; height: 90px; padding-top: .5rem; }
.month-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: .2rem; }
.month-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.month-bar { width: 100%; background: var(--c-primary, #D5281B); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .55; transition: height .3s; }
.month-col.active .month-bar { opacity: 1; }
.month-label { font-size: .68rem; color: var(--c-muted, #888); }

/* Inspekcija DVI */
.insp-row { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--c-border, #e5e7eb); }
.insp-row:last-child { border-bottom: none; }
.insp-label { font-size: .85rem; flex: 1; }
.insp-btns { display: flex; gap: .2rem; flex-shrink: 0; }
.insp-btn { width: 34px; height: 30px; border: 1px solid #ccc; border-radius: 5px; background: #f4f4f4; cursor: pointer; font-weight: 700; font-size: .8rem; opacity: .35; transition: opacity .1s; }
.insp-btn.sel { opacity: 1; color: #fff; border-color: transparent; }
.insp-btn.ok.sel    { background: var(--c-ok, #22c55e); }
.insp-btn.prati.sel { background: #f59e0b; }
.insp-btn.hitno.sel { background: #ef4444; }

.insp-sum { display: flex; gap: .4rem; flex-wrap: wrap; }
.insp-badge { font-size: .73rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; }
.insp-badge.ok    { background: #dcfce7; color: #166534; }
.insp-badge.prati { background: #fef3c7; color: #92400e; }
.insp-badge.hitno { background: #fee2e2; color: #991b1b; }

.insp-summary { margin-bottom: .5rem; min-height: 1.5rem; }

/* Foto vozila */
.veh-cover { width: 100%; max-height: 180px; overflow: hidden; border-radius: .5rem; margin-bottom: .75rem; }
.veh-cover img { width: 100%; height: 180px; object-fit: cover; display: block; }

/* Event detalji */
.evt-item-row { display: flex; align-items: baseline; gap: .4rem; padding: .35rem 0; border-bottom: 1px solid var(--c-border, #e5e7eb); font-size: .87rem; }
.evt-item-row:last-child { border-bottom: none; }
.evt-item-row.total { font-weight: 600; border-top: 1px solid var(--c-border, #e5e7eb); margin-top: .2rem; padding-top: .4rem; }
.evt-item-name { flex: 1; }
.evt-item-detail { color: var(--c-muted, #888); font-size: .78rem; white-space: nowrap; }
.evt-item-sum { font-weight: 600; white-space: nowrap; min-width: 60px; text-align: right; }

/* Check liste */
.chk-row { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--c-border, #e5e7eb); }
.chk-row:last-of-type { border-bottom: none; }
.chk-row input[type=checkbox] { width: 1.2rem; height: 1.2rem; flex-shrink: 0; margin-top: .12rem; cursor: pointer; accent-color: var(--c-primary, #D5281B); }
.chk-row label { flex: 1; font-size: .93rem; cursor: pointer; line-height: 1.35; }
.chk-note-btn { background: none; border: none; padding: .15rem .3rem; cursor: pointer; font-size: .85rem; opacity: .5; }
.chk-note-btn:hover { opacity: 1; }
.chk-note { width: 100%; box-sizing: border-box; margin: .25rem 0 .4rem; padding: .35rem .5rem; border: 1px solid var(--c-border, #e5e7eb); border-radius: .3rem; background: var(--c-bg, #f8f8f8); color: inherit; font-size: .82rem; font-family: inherit; resize: vertical; }

/* Vizit karta */
.biz-card { text-align: center; padding: 1.5rem 1rem; }
.biz-logo { max-height: 70px; max-width: 160px; object-fit: contain; display: block; margin: 0 auto .75rem; }
.biz-name { font-size: 1.2rem; font-weight: 700; margin-bottom: .6rem; color: var(--c-primary, #D5281B); }
.biz-line { font-size: .95rem; margin: .35rem 0; color: var(--c-text, #1C1F24); }
.biz-line a { color: inherit; text-decoration: none; }

/* Servisne kategorije — chip UI */
.svc-cats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .3rem; }
.chip-sub  { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .2rem; padding-left: .5rem; }
.chip-label { font-size: .72rem; font-weight: 600; color: var(--c-muted, #6b7280); margin: .6rem 0 .1rem; text-transform: uppercase; letter-spacing: .04em; }
.chip {
  border: 1.5px solid var(--c-border, #e5e7eb);
  border-radius: 999px;
  padding: .3rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  background: var(--c-bg, #f8f8f8);
  color: var(--c-text, #1C1F24);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.chip.chip-sm { font-size: .75rem; padding: .2rem .55rem; }
.chip.chip-on {
  background: var(--c-primary, #D5281B);
  border-color: var(--c-primary, #D5281B);
  color: #fff;
}

/* Kalkulatori */
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.calc-result { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--c-border, #e5e7eb); min-height: 1rem; }
.calc-line { font-size: .9rem; margin: .2rem 0; }
.calc-line b { color: var(--c-primary, #D5281B); }

/* Nedeljni kalendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem 0 .6rem; }
.cal-nav span { font-size: .9rem; font-weight: 600; text-align: center; flex: 1; }
.cal-day { background: var(--c-surface, #fff); border-radius: .5rem; border: 1px solid var(--c-border, #e5e7eb); margin-bottom: .4rem; overflow: hidden; }
.cal-day.today { border-color: var(--c-primary, #D5281B); }
.cal-day-hd { display: flex; align-items: center; justify-content: space-between; padding: .45rem .7rem; background: var(--c-bg, #f8f8f8); }
.cal-day.today .cal-day-hd { background: rgba(213,40,27,.07); }
.cal-day-hd span { font-size: .88rem; }
.cal-day-hd span b { color: var(--c-primary, #D5281B); }
.btn-mini { border: 1px solid var(--c-border, #e5e7eb); border-radius: 5px; background: var(--c-surface, #fff); color: var(--c-primary, #D5281B); font-size: .85rem; font-weight: 700; width: 26px; height: 26px; cursor: pointer; line-height: 1; }
.cal-apt { padding: .35rem .7rem; border-bottom: 1px solid var(--c-border, #e5e7eb); font-size: .82rem; cursor: pointer; }
.cal-apt:last-child { border-bottom: none; }
.cal-apt:active { background: var(--c-bg, #f8f8f8); }
.cal-apt b { color: var(--c-primary, #D5281B); margin-right: .25rem; }
.cal-apt-active { border-left: 3px solid #f59e0b; background: rgba(245,158,11,.05); }
.cal-empty { padding: .35rem .7rem; font-size: .8rem; color: var(--c-muted, #888); }

/* Notification bell */
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.bell-btn { position: relative; background: none; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; padding: .2rem .3rem; line-height: 1; }
.bell-count { position: absolute; top: -3px; right: -5px; min-width: 16px; height: 16px; background: #ef4444; border-radius: 999px; font-size: 10px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--c-accent, #1C1F24); }

/* Notification sheet */
.notif-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); }
.notif-sheet { position: fixed; bottom: 0; left: 0; right: 0; z-index: 101; background: var(--c-surface, #fff); border-radius: 1rem 1rem 0 0; max-height: 80vh; display: flex; flex-direction: column; }
.notif-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem .6rem; border-bottom: 1px solid var(--c-border, #e5e7eb); }
.notif-sheet-head h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.notif-sheet-readall { background: none; border: none; color: var(--c-primary, #D5281B); font-size: .82rem; font-weight: 600; cursor: pointer; padding: 0; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-row { padding: .7rem 1rem; border-bottom: 1px solid var(--c-border, #e5e7eb); }
.notif-row.unread { border-left: 3px solid var(--c-primary, #D5281B); background: rgba(213,40,27,.04); }
.notif-row-title { font-size: .88rem; font-weight: 600; margin-bottom: .15rem; }
.notif-row-body { font-size: .8rem; color: var(--c-muted, #6b7280); line-height: 1.35; }
.notif-row-time { font-size: .7rem; color: var(--c-muted, #6b7280); margin-top: .2rem; }
.notif-empty { padding: 2.5rem 1rem; text-align: center; color: var(--c-muted, #6b7280); font-size: .9rem; }
