/* mojaskupina.si — dopolnila k AG Portal oblikovanju (ag-portal.css). Barvo skupine nastavi <style> v glavi. */

/* Barva skupine tudi za fokus (AG ima trdo kodirano rdečo) */
.ag-toolbar select:focus, .ag-toolbar input:focus, .ag-form-grid input:focus, .ag-form-grid select:focus, .ag-form-grid textarea:focus,
html[data-theme="dark"] .ag-form-grid input:focus, html[data-theme="dark"] .ag-form-grid select:focus, html[data-theme="dark"] .ag-form-grid textarea:focus {
  box-shadow: 0 0 0 3px rgba(var(--ag-accent-rgb, 196,30,58), .15);
}
.ag-stat-accent { border-color: color-mix(in srgb, var(--ag-accent) 35%, transparent); }

/* Tip dogodka »Vaja« (novo v SaaS) */
.ag-type-vaja, .ag-cal-chip.ag-type-vaja { background: #dcebfb; color: #1d4f86; }
.ag-cal-dot.ag-type-vaja, .ms-fill-vaja { background: #3b7dd8; }
html[data-theme="dark"] .ag-type-vaja, html[data-theme="dark"] .ag-cal-chip.ag-type-vaja { background: #1f344c; color: #9cc6f3; }
.ms-fill-poroka { background: #c41e3a; } .ms-fill-veselica { background: #2d6a4f; } .ms-fill-obletnica { background: #6c5ce7; } .ms-fill-drugo { background: #888; }

/* Preklop temnega načina */
.ms-theme-toggle {
  display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--ag-border); background: var(--ag-bg-card);
  color: var(--ag-ink); border-radius: 999px; padding: .4rem .7rem; cursor: pointer; font-size: .95rem; line-height: 1;
}
.ms-theme-toggle:hover { border-color: var(--ag-accent); }
html[data-theme="dark"] .ms-ico-moon, html:not([data-theme="dark"]) .ms-ico-sun { display: none; }
.ms-theme-toggle-float { position: fixed; top: 1rem; right: 1rem; z-index: 5; box-shadow: var(--ag-shadow-sm); }
.ms-theme-toggle-side { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: var(--ag-sidebar-text); align-self: flex-start; font-size: .85rem; }
.ms-theme-toggle-side:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
html[data-theme="dark"] .ms-theme-label::after { content: " izklopi"; }

/* Preklopnik skupin (v glavi stranske vrstice) */
.ms-switcher { position: relative; }
.ms-switcher > summary { list-style: none; cursor: pointer; border-radius: 12px; }
.ms-switcher > summary::-webkit-details-marker { display: none; }
.ms-switcher > summary:hover { background: rgba(255,255,255,.04); }
.ms-brand-text { min-width: 0; flex: 1; }
.ms-brand-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-switcher-caret { color: rgba(245,239,231,.6); font-size: .8rem; transition: transform .15s; }
.ms-switcher[open] .ms-switcher-caret { transform: rotate(180deg); }
.ms-switcher-menu {
  margin-top: .5rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .4rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.ms-switcher-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(245,239,231,.5); padding: .3rem .5rem; font-weight: 700; }
.ms-switcher-item {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem; border-radius: 9px; color: rgba(245,239,231,.85); font-size: .88rem;
}
.ag-sidebar .ms-switcher-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.ms-switcher-item.is-current { background: rgba(255,255,255,.08); color: #fff; font-weight: 600; }
.ms-switcher-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.ms-switcher-name small { font-size: .7rem; opacity: .65; font-weight: 400; }
.ms-mark-sm { width: 28px !important; height: 28px !important; font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; flex-shrink: 0; }
.ms-plus { border: 1px dashed rgba(245,239,231,.4); color: rgba(245,239,231,.8); font-size: 1rem; }
.ms-switcher-add { color: rgba(245,239,231,.75); border-top: 1px solid rgba(255,255,255,.06); margin-top: .2rem; padding-top: .55rem; }
.ms-logo { object-fit: cover; background: #fff; }

/* Izbira skupine na glavni domeni (svetla podlaga) */
.ms-band-list { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.ms-band-pick { border: 1px solid var(--ag-border); color: var(--ag-ink); background: var(--ag-bg-card); padding: .65rem .75rem; }
.ms-band-pick:hover { border-color: var(--ag-accent); color: var(--ag-ink); box-shadow: var(--ag-shadow-sm); }
.ms-stack { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.ms-stack form { margin: 0; }

/* Navigacija kot povezave (AG ima gumbe) */
a.ag-nav-item { text-decoration: none; }
.ms-nav-backdrop { display: none; }
@media (max-width: 980px) {
  .ag-shell.nav-open .ms-nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,10,20,.45); z-index: 35; }
}

/* Obrazci */
.ms-card-wide { max-width: 520px; }
.ms-form-card { max-width: 760px; }
.ms-form .ms-form-sep { margin: .5rem 0 0; font-size: .95rem; color: var(--ag-ink); }
.ag-form-grid label { color: var(--ag-muted); }
.ag-form-grid input, .ag-form-grid select, .ag-form-grid textarea { width: 100%; }
.ms-color { padding: .2rem !important; height: 42px; cursor: pointer; }
.ms-check { justify-content: flex-end; }
.ms-check span { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--ag-ink); padding: .55rem 0; }
.ms-check input { width: auto !important; min-width: 0 !important; }
.ms-slug { display: flex; align-items: stretch; }
.ms-slug input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; flex: 1; min-width: 0 !important; }
.ms-slug-suffix { display: inline-flex; align-items: center; padding: 0 .6rem; border: 1px solid var(--ag-border); border-left: 0; border-radius: 0 8px 8px 0; background: var(--ag-surface-2); color: var(--ag-muted); font-size: .85rem; white-space: nowrap; }
.ms-danger-zone { border-top: 1px solid var(--ag-border); margin-top: 1rem; padding-top: .85rem; }
@media (max-width: 600px) { .ag-form-grid { grid-template-columns: minmax(0, 1fr); } .ag-span-2 { grid-column: auto; } }

/* Nadzorna plošča */
.ms-upcoming li { align-items: center; }
.ms-up-link { display: flex; align-items: center; gap: .75rem; color: var(--ag-ink); min-width: 0; flex: 1; }
.ms-up-link:hover { color: var(--ag-ink); }
.ms-up-date { display: inline-flex; flex-direction: column; width: 46px; flex-shrink: 0; }
.ms-up-date b { font-size: 1.05rem; } .ms-up-date small { font-size: .68rem; text-transform: uppercase; }
html[data-theme="dark"] .ms-up-date { background: var(--ag-accent-soft); color: var(--ag-accent-text); }
.ms-up-body { display: flex; flex-direction: column; min-width: 0; }
.ms-up-body .ag-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-up-body .ag-loc { color: var(--ag-muted); font-size: .8rem; }
.ms-bars li { align-items: center; }
.ms-bars .ag-type { width: 88px; text-align: center; }
.ms-bar { flex: 1; height: 8px; background: var(--ag-surface-2); border-radius: 999px; overflow: hidden; }
.ms-bar-fill { display: block; height: 100%; border-radius: 999px; }

/* Člani */
a.ag-member-card { color: var(--ag-ink); }
a.ag-member-card:hover { color: var(--ag-ink); }
.ms-member-card.is-inactive { opacity: .6; }
div.ms-member-card { cursor: default; }
html[data-theme="dark"] .ag-member-card { background: var(--ag-bg-card); border-color: var(--ag-border); }

/* Dogodki */
.ms-ec-top { display: flex; gap: .4rem; margin-bottom: .5rem; }
a.ms-event-card { color: var(--ag-ink); display: block; }
.ag-table a.ag-title { color: var(--ag-ink); }
.ag-table a.ag-title:hover { color: var(--ag-accent-text); }
@media (max-width: 760px) {
  .ms-events-desktop { display: none; }
  .ag-cards-mobile { display: grid; gap: .75rem; }
}

/* Koledar: celice so povezave; stranski seznam je na telefonu pod mrežo (ne spodnji predal) */
a.ag-cal-cell { color: inherit; text-decoration: none; }
a.ag-cal-side-item { display: block; color: var(--ag-ink); }
html[data-theme="dark"] .ag-cal-side { background: var(--ag-bg-card); border-color: var(--ag-border); }
@media (max-width: 1100px) {
  .ms-cal-side-static { position: static; transform: none; border-radius: var(--ag-radius); max-height: none; box-shadow: var(--ag-shadow-sm); z-index: auto; }
}

/* Povezave-kartice: ne obarvaj kot povezavo (AG temni način barva vse <a>) */
html a.ag-cal-cell, html[data-theme] a.ag-cal-cell,
html a.ag-cal-side-item, html[data-theme] a.ag-cal-side-item,
html a.ag-member-card, html[data-theme] a.ag-member-card,
html a.ms-event-card, html[data-theme] a.ms-event-card,
html a.ms-up-link, html[data-theme] a.ms-up-link,
html .ag-table a.ag-title, html[data-theme] .ag-table a.ag-title,
html a.ms-band-pick, html[data-theme] a.ms-band-pick { color: var(--ag-ink); }
html[data-theme] .ag-table a.ag-title:hover, html[data-theme] a.ms-up-link:hover .ag-title { color: var(--ag-accent-text); }
html[data-theme] .ag-sidebar a.ms-switcher-item { color: rgba(245,239,231,.85); }
html[data-theme] .ag-sidebar a.ms-switcher-item:hover, html[data-theme] .ag-sidebar a.ms-switcher-item.is-current { color: #fff; }
html[data-theme] a.ag-nav-item { color: rgba(245,239,231,.78); }
html[data-theme] a.ag-nav-item:hover, html[data-theme] a.ag-nav-item.is-active { color: #fff; }
.ag-sidebar a.ms-switcher-item { color: rgba(245,239,231,.85); }
.ag-sidebar a.ag-nav-item.is-active, .ag-sidebar a.ag-nav-item:hover { color: #fff; }
@media (max-width: 1100px) { .ms-cal-side-static .ag-cal-side-list { max-height: none; } }
html[data-theme] .ag-stat-accent { border-color: color-mix(in srgb, var(--ag-accent) 40%, transparent); }
@media (max-width: 980px) { .ag-sidebar { padding-top: 4rem; } }

/* ===== Faza 2 ===== */
.ms-h2 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; }
.ms-row-actions { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.ms-row-actions form { margin: 0; }
.ms-wrap { flex-wrap: wrap; align-items: center; }
.ms-grow { flex: 1; }
.ms-logo { object-fit: contain; background: #fff; padding: 2px; }
.ms-logo-row { display: flex; gap: 1rem; align-items: center; }
.ms-logo-preview img, .ms-logo-preview .ag-portal-mark { width: 64px; height: 64px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--ag-border); }
.ms-logo-preview .ag-portal-mark { font-size: 1.2rem; }
.ms-offline-badge { position: fixed; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 60; background: #b91c1c; color: #fff; padding: .4rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 600; box-shadow: var(--ag-shadow); }
.ms-offline-badge[hidden] { display: none; }
.ms-inv-caka { background: #fff3cd; color: #856404; }
.ms-inv-sprejeto { background: #d8f3dc; color: var(--ag-ok); }
.ms-inv-preklicano, .ms-inv-poteklo { background: #f8d7da; color: #9e1830; }
html[data-theme="dark"] .ms-inv-caka { background: #4c3c1f; color: #f3d191; }
html[data-theme="dark"] .ms-inv-sprejeto { background: #1f4c31; color: #a3e0c6; }
html[data-theme="dark"] .ms-inv-preklicano, html[data-theme="dark"] .ms-inv-poteklo { background: #4c1f29; color: #ef95a5; }

/* Repertoar */
.ms-sort { color: inherit !important; text-decoration: none; }
.ms-key { display: inline-block; min-width: 2.2rem; text-align: center; padding: .12rem .45rem; border-radius: 6px; background: var(--ag-surface-2); border: 1px solid var(--ag-border); font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.ms-tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; margin: 0 .2rem .2rem 0; border-radius: 999px; background: var(--ag-accent-soft); color: var(--ag-accent-text); text-decoration: none; }
html[data-theme] a.ms-tag { color: var(--ag-accent-text); }
.ms-range { display: inline-flex; gap: .25rem; }
.ms-range input { width: 80px !important; min-width: 0 !important; }
.ms-filter label select, .ms-filter label input { min-width: 0; }
.ms-song-grid { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.ms-lyrics-input { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.5; padding: .7rem; border: 1px solid var(--ag-border); border-radius: 8px; background: var(--ag-input, #fff); color: var(--ag-ink); resize: vertical; }
code { background: var(--ag-surface-2); padding: .05rem .3rem; border-radius: 4px; font-size: .85em; }
@media (max-width: 980px) { .ms-song-grid { grid-template-columns: minmax(0, 1fr); } }

/* ChordPro v portalu */
.cp-render { font-size: 1.05rem; line-height: 1.35; overflow-x: auto; }
.cp-line { display: flex; flex-wrap: wrap; align-items: flex-end; min-height: 1.35em; }
.cp-chunk { display: inline-flex; flex-direction: column; white-space: pre; }
.cp-chord { color: var(--ag-accent-text); font-weight: 700; font-size: .78em; line-height: 1.2; min-height: 1.2em; padding-right: .3em; }
.cp-line.cp-plain { display: block; white-space: pre-wrap; }
.cp-gap { height: .7em; }
.cp-chorus { border-left: 3px solid var(--ag-accent); padding-left: .6em; font-weight: 600; margin: .3em 0 .6em; }
.cp-label { font-size: .68em; text-transform: uppercase; letter-spacing: .08em; color: var(--ag-muted); font-weight: 700; }
.cp-comment { font-size: .8em; color: var(--ag-muted); font-style: italic; margin: .3em 0; }

/* Seznami pesmi */
.ms-setlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.ms-setlist-card h3 a { color: var(--ag-ink); }
html[data-theme] .ms-setlist-card h3 a { color: var(--ag-ink); }
.ms-offline-ctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ms-offline-status { color: var(--ag-muted); }
.ms-offline-status.is-saved { color: var(--ag-ok-text); font-weight: 600; }
.ms-offline-card { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .85rem 1.1rem; }
.ms-setlist { list-style: none; margin: 0; padding: 0; counter-reset: sl; background: var(--ag-bg-card); border: 1px solid var(--ag-border); border-radius: var(--ag-radius); box-shadow: var(--ag-shadow-sm); overflow: hidden; }
.ms-sl-item { display: flex; align-items: center; gap: .65rem; padding: .6rem .85rem; border-bottom: 1px solid var(--ag-border); background: var(--ag-bg-card); }
.ms-sl-item:last-child { border-bottom: 0; }
.ms-sl-item:not(.is-break) { counter-increment: sl; }
.ms-sl-item:not(.is-break) .ms-sl-pos::before { content: counter(sl) "."; }
.ms-sl-pos { width: 1.8rem; text-align: right; font-weight: 700; color: var(--ag-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ms-sl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ms-sl-body .ag-title { font-weight: 600; color: var(--ag-ink); }
html[data-theme] .ms-sl-body a.ag-title { color: var(--ag-ink); }
.ms-sl-body .ag-loc { color: var(--ag-muted); font-size: .8rem; }
.ms-sl-item.is-break { background: var(--ag-surface-2); }
.ms-sl-item.is-break .ag-title { font-style: italic; color: var(--ag-muted); font-weight: 500; }
.ms-sl-dur { font-variant-numeric: tabular-nums; font-size: .85rem; }
.ms-drag { cursor: grab; color: var(--ag-muted); font-weight: 700; letter-spacing: -2px; padding: .3rem .25rem; touch-action: none; user-select: none; border-radius: 6px; }
.ms-drag:focus-visible { outline: 2px solid var(--ag-accent); }
.ms-sl-item.is-dragging { opacity: .85; box-shadow: var(--ag-shadow); position: relative; z-index: 2; outline: 2px solid var(--ag-accent); }
.ms-sl-empty { padding: 1rem; }
.ms-reorder-msg { margin: .5rem 0 0; color: var(--ag-muted); }
.ms-reorder-msg.is-ok { color: var(--ag-ok-text); } .ms-reorder-msg.is-error { color: var(--ag-accent-text); }
@media (max-width: 600px) { .ms-sl-item { flex-wrap: wrap; } .ms-sl-item .ms-row-actions { width: 100%; justify-content: flex-end; } }
.ms-logo-preview .ag-portal-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ag-accent); color: #fff; font-weight: 700; font-size: 1.1rem; }

/* Faza 3: nastop v živo */
.ms-live-dot { margin-left: auto; min-width: 1.3rem; height: 1.3rem; border-radius: 999px; background: #22c55e; color: #052e16; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; padding: 0 .3rem; }
.ag-nav-item { display: flex; align-items: center; }
.ms-live-btn { white-space: nowrap; }
.ms-code-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ms-code-form select { flex: 1; min-width: 12rem; }
.ms-code-input { flex: 1; min-width: 10rem; font-size: 1.6rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: .55rem .75rem; border-radius: 12px; border: 1px solid var(--ag-border); background: var(--ag-card); color: var(--ag-text); }
.ms-live-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .5rem; border-bottom: 1px solid var(--ag-border); color: inherit; text-decoration: none; border-radius: 10px; }
.ms-live-row:hover { background: var(--ag-accent-soft); }
.ms-live-row small { display: block; }
.ms-live-pulse { width: 12px; height: 12px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: ms-pulse 1.6s infinite; flex-shrink: 0; }
@keyframes ms-pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.ms-code-chip { font-weight: 800; letter-spacing: .12em; background: var(--ag-accent-soft); color: var(--ag-accent-text); padding: .3rem .6rem; border-radius: 8px; font-variant-numeric: tabular-nums; }
.ms-row-actions form { display: inline; }
.ms-code-input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; font-size: 1rem; color: var(--ag-muted); }
.ms-code-form select { padding: .65rem .75rem; border-radius: 12px; border: 1px solid var(--ag-border); background: var(--ag-card); color: var(--ag-text); font: inherit; }

/* ===== Faza 4: paritetni pogledi (finance, fond, zadeve, dokumenti, km, obvestila, profil) ===== */
.ag-form .ag-field, .ms-fieldset .ag-field { display: flex; flex-direction: column; gap: .25rem; margin: 0 0 .75rem; flex: 1 1 140px; min-width: 0; }
.ag-form .ag-field label, .ag-form .ag-field > span { font-size: .78rem; color: var(--ag-muted); font-weight: 500; }
.ag-form input:not([type=checkbox]):not([type=radio]), .ag-form select, .ag-form textarea,
.ms-inline input:not([type=checkbox]):not([type=radio]), .ms-inline select, .ms-refund input, .ms-clause input, .ms-clause textarea {
  padding: .55rem .7rem; border: 1px solid var(--ag-border); border-radius: 8px; font-size: .95rem; background: var(--ag-input, #fff); color: var(--ag-ink); font-family: inherit; width: 100%; box-sizing: border-box;
}
.ms-inline input:not([type=checkbox]), .ms-inline select { width: auto; }
.ag-form textarea, .ms-clause textarea { resize: vertical; line-height: 1.45; }
.ag-form input:focus, .ag-form select:focus, .ag-form textarea:focus { outline: none; border-color: var(--ag-accent); box-shadow: 0 0 0 3px rgba(var(--ag-accent-rgb, 196,30,58), .15); }
.ag-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.ag-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; margin: 0 0 .75rem; cursor: pointer; }
.ag-mb { margin-bottom: 1rem; }
.ag-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-danger { color: var(--ag-accent); }
.ms-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.ms-inline form { margin: 0; }
.ms-num { width: 6.5rem !important; }
.ms-nowrap { white-space: nowrap; }
.ms-grow { flex: 3 1 260px; }
.ms-full { width: 100%; }
.ms-card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ms-card-head h3 { margin: 0; }
.ms-sticky { position: sticky; top: 1rem; }
.ms-sticky-actions { position: sticky; bottom: 0; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; padding: .75rem 0 .25rem; background: linear-gradient(transparent, var(--ag-bg-card) 35%); margin-top: .5rem; z-index: 2; }
.ms-fieldset { border: 1px solid var(--ag-border); border-radius: var(--ag-radius-sm, 8px); padding: .75rem .9rem .25rem; margin: 0 0 1rem; }
.ms-fieldset legend { font-weight: 600; font-size: .85rem; padding: 0 .35rem; color: var(--ag-ink); }
.ms-legend li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; }

/* zadeve */
.ag-task-list { display: flex; flex-direction: column; gap: .75rem; }
.ag-task-card { border-left: 4px solid var(--ag-border); }
.ag-task-card.is-visoka { border-left-color: var(--ag-accent); }
.ag-task-card.is-normal { border-left-color: #d4a017; }
.ag-task-card.is-zakljuceno { opacity: .65; }
.ag-task-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.ag-task-head b { margin-right: auto; }
.ag-prio-visoka { background: #f8d7da; color: #9e1830; }
.ag-prio-normal { background: #fff3cd; color: #856404; }
.ag-prio-nizka { background: #e9ecef; color: #495057; }
.ag-my-task { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--ag-border); }
.ag-my-task:last-child { border-bottom: 0; }
.ms-task-mini { font-size: .88rem; }

/* obvestila */
.ms-recipients { display: flex; flex-direction: column; gap: .35rem; }
.ms-recipient { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem .65rem; border: 1px solid var(--ag-border); border-radius: 8px; cursor: pointer; }
.ms-recipient:hover { background: var(--ag-surface-2); }
.ms-push-preview { display: flex; flex-direction: column; gap: .15rem; background: var(--ag-surface-2); max-width: 420px; margin: .25rem 0 0; }
.ms-notify-result ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }

/* finance / fond */
.ms-unpaid-event { padding: .65rem 0; border-bottom: 1px solid var(--ag-border); }
.ms-unpaid-event:last-child { border-bottom: 0; }
.ms-unpaid-list { list-style: none; padding: .35rem 0 0 .5rem; margin: 0; display: flex; flex-direction: column; gap: .25rem; }
.ms-unpaid-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ms-refund { display: flex; flex-direction: column; gap: .4rem; padding: .6rem 0; border-bottom: 1px solid var(--ag-border); }
.ms-refund:last-child { border-bottom: 0; }
.ag-table tfoot th { border-top: 2px solid var(--ag-border); }
.ms-audit code { font-size: .78rem; background: var(--ag-surface-2); padding: .1rem .3rem; border-radius: 4px; }

/* dokumenti */
.ms-doc-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1rem; align-items: start; }
.ms-doc-preview { position: sticky; top: 1rem; padding: .5rem; }
.ms-doc-preview iframe { width: 100%; height: calc(100vh - 6rem); min-height: 640px; border: 1px solid var(--ag-border); border-radius: 6px; background: #fff; }
.ms-clause { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .75rem; }
.ms-clause input { font-weight: 600; }
.ms-item-row .ag-field { margin-bottom: .4rem; }
.ms-doc-new { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 1100px) { .ms-doc-editor { grid-template-columns: minmax(0, 1fr); } .ms-doc-preview { position: static; } }

/* razdelitev v obrazcu dogodka */
.ag-payout-row.is-off { opacity: .55; }
.ag-payout-row.is-off .ms-lineup-amt { visibility: hidden; }
.ms-lineup-on { display: inline-flex; align-items: center; gap: .4rem; }
.ms-lineup-amt { width: 7rem; }
.ms-paid-lab { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--ag-muted); }
.ms-pill-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--ag-border); background: var(--ag-bg-card); color: var(--ag-ink); font-size: .82rem; cursor: pointer; }
.ms-pill-btn.is-on, .ms-pill-btn:has(input:checked) { background: var(--ag-accent-soft, #fde2e8); border-color: var(--ag-accent); color: var(--ag-accent-dark, #9e1830); }
.ms-pill-btn input { position: absolute; opacity: 0; pointer-events: none; }

/* koledar, nav, nadzorna plošča člana */
.ms-chip-personal { background: #ede7f6 !important; color: #4527a0 !important; border-left: 3px solid #7e57c2; }
.ms-personal-item { border-left: 3px solid #7e57c2; padding-left: .5rem; }
.ms-nav-count { display: inline-flex; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--ag-accent); color: #fff; font-size: .7rem; align-items: center; justify-content: center; margin-left: auto; font-weight: 700; }
.ms-next { display: block; text-decoration: none; color: #fff; border-left: 4px solid var(--ag-accent); }
.ms-next h2, .ms-next p, .ms-next b { color: #fff; }
.ms-next .ag-muted, .ms-next p.ag-sm { color: rgba(255,255,255,.78); }
.ms-next h2 { margin: .2rem 0 .35rem; }
.ag-pe-card-head { display: flex; justify-content: space-between; align-items: center; }
.ag-pe-list > div { padding: .35rem 0; border-bottom: 1px solid var(--ag-border); }
.ag-pe-list > div:last-child { border-bottom: 0; }

/* profil */
.ms-2fa-setup { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.ms-qr { background: #fff; padding: .5rem; border-radius: 8px; border: 1px solid var(--ag-border); line-height: 0; }
.ms-qr svg { width: 180px; height: 180px; }
.ms-secret, .ms-copy { font-family: ui-monospace, monospace; font-size: .85rem; background: var(--ag-surface-2); padding: .35rem .5rem; border-radius: 6px; word-break: break-all; user-select: all; }
.ms-push { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ms-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }

[data-theme="dark"] .ms-chip-personal { background: #2e2545 !important; color: #d1c4e9 !important; }
[data-theme="dark"] .ag-prio-visoka { background: #4a1c24; color: #f5b5c0; }
[data-theme="dark"] .ag-prio-normal { background: #44391a; color: #f1d98a; }
[data-theme="dark"] .ag-prio-nizka { background: #2c2f36; color: #c9cfe0; }
.ag-chip-dot { width: .6rem; height: .6rem; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: .15rem; }
.ag-next-lineup { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; margin-top: .35rem; }

/* ===== Faza 5: slovenski izbirnik datuma (ponedeljek prvi) ===== */
input[data-sl] { font-variant-numeric: tabular-nums; }
input[data-sl].ms-date { min-width: 8.5rem; } input[data-sl].ms-datetime { min-width: 11.5rem; } input[data-sl].ms-time { min-width: 4.5rem; max-width: 7rem; }
input[data-sl].is-invalid { border-color: var(--ag-accent) !important; box-shadow: 0 0 0 3px rgba(196,30,58,.15); }
.ms-dp { position: absolute; z-index: 1000; width: 17.5rem; background: var(--ag-bg-card, #fff); color: var(--ag-ink); border: 1px solid var(--ag-border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: .6rem; font-size: .88rem; }
.ms-dp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; text-transform: capitalize; }
.ms-dp-head button, .ms-dp-foot button { border: 1px solid var(--ag-border); background: transparent; color: var(--ag-ink); border-radius: 8px; padding: .2rem .6rem; cursor: pointer; font: inherit; }
.ms-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.ms-dp-dow { font-size: .7rem; color: var(--ag-muted); text-transform: uppercase; padding: .2rem 0; }
.ms-dp-dow.is-we, .ms-dp-day.is-we { color: var(--ag-accent); }
.ms-dp-day { border: 0; background: transparent; color: var(--ag-ink); border-radius: 8px; padding: .38rem 0; cursor: pointer; font: inherit; }
.ms-dp-day:hover { background: var(--ag-surface-2); }
.ms-dp-day.is-today { outline: 1px solid var(--ag-accent); }
.ms-dp-day.is-sel { background: var(--ag-accent); color: #fff !important; }
.ms-dp-foot { display: flex; justify-content: space-between; margin-top: .45rem; }

/* Faza 5: profilne slike */
.ms-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: 0 0 auto; overflow: hidden; line-height: 1; }
.ms-avatar.has-img { background: transparent !important; }
.ms-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.ag-lineup-list li { display: flex; align-items: center; gap: .5rem; }
.ms-sig-thumb { max-height: 54px; max-width: 220px; background: #fff; border: 1px dashed var(--ag-border, #ddd); border-radius: 6px; padding: 4px; vertical-align: middle; }
.ms-sig-field { border: 1px solid var(--ag-border, #e4d9cb); border-radius: 10px; padding: .6rem .9rem; margin: .6rem 0; }
.ms-sig-field legend { font-weight: 600; padding: 0 .3rem; }
.ms-avatar-edit { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.ms-avatar-edit > div { flex: 1; min-width: 220px; }
.ms-avatar-edit input[type=file] { max-width: 100%; }

/* Faza 5: plačilo na obrazcu dogodka (več prostora, skupine) */
.ms-pay-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.25rem; }
.ms-pay-group h4 { margin: 0 0 .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ag-muted, #6b5f55); }
.ms-pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.ms-pay-grid > label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; min-width: 0; }
.ms-pay-grid input { width: 100%; min-width: 0; }
/* pesmi za posebne trenutke */
.ms-songs { display: flex; flex-direction: column; gap: .6rem; }
.ms-song-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.3fr) minmax(140px, 1.2fr) minmax(120px, 1fr) auto; gap: .5rem; align-items: end; padding: .5rem; border: 1px solid var(--ag-border, #e4d9cb); border-radius: 10px; }
.ms-song-row label { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; min-width: 0; }
.ms-song-row select, .ms-song-row input { width: 100%; min-width: 0; }
@media (max-width: 760px) { .ms-song-row { grid-template-columns: 1fr 1fr; } .ms-song-row .ms-song-del { justify-self: end; } }
.ms-moments { list-style: none; padding: 0; margin: 0; }
.ms-moments li { display: flex; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--ag-border, #eee); flex-wrap: wrap; }
.ms-moments li > span:first-child { min-width: 9rem; color: var(--ag-muted, #6b5f55); }
/* potrditev udeležbe */
.ms-rsvp-btns { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0; }
.ms-rsvp-btns label { flex: 1 1 6rem; }
.ms-rsvp-btns input { position: absolute; opacity: 0; pointer-events: none; }
.ms-rsvp-btns span { display: block; text-align: center; padding: .55rem .6rem; border-radius: 10px; border: 1.5px solid var(--ag-border, #ddd); cursor: pointer; font-weight: 600; }
.ms-rsvp-btns input:checked + span.is-potrdim { background: #d8f3dc; border-color: #1b6b35; color: #1b6b35; }
.ms-rsvp-btns input:checked + span.is-ne_morem { background: #fde2e4; border-color: #9b1c2c; color: #9b1c2c; }
.ms-rsvp-btns input:checked + span.is-morda { background: #fff4e0; border-color: #8a5300; color: #8a5300; }
.ms-rsvp-btns input:focus-visible + span { outline: 2px solid var(--ag-accent, #c41e3a); outline-offset: 2px; }
.ms-rsvp-pill-potrdim { background: #d8f3dc !important; color: #1b6b35 !important; }
.ms-rsvp-pill-ne_morem { background: #fde2e4 !important; color: #9b1c2c !important; }
.ms-rsvp-pill-morda { background: #fff4e0 !important; color: #8a5300 !important; }
.ms-rsvp-sum { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ms-who { display: inline-flex; align-items: center; gap: .45rem; }
.ms-rsvp-cell .ms-rsvp-note { display: block; margin-top: .15rem; max-width: 22rem; }
.ms-rsvp-card { margin-bottom: 1rem; }
.ms-rsvp-card .ms-full input { width: 100%; }
.ms-sum-link { margin-left: .4rem; white-space: nowrap; }
@media (max-width: 760px) { .ms-hide-sm { display: none; } }

/* ---- Faza 6: platforma (superadmin), obračunsko stanje, jeziki ---- */
.ms-platform-mark { background: #3a3f58; color: #fff; }
.ms-platform-note { margin: .75rem 1rem; line-height: 1.35; }
.ms-sa-bands td { vertical-align: top; }
.ag-pill.ms-pill-danger { background: #f8d7da; color: #842029; border-color: #f1aeb5; }
.ms-dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.ms-dl dt { color: var(--ag-muted, #6b7280); }
.ms-dl dd { margin: 0; }
.ms-radio-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.ms-radio-row label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.ms-danger-zone { border-color: #f1aeb5; margin-top: 1rem; }
.ag-btn.ms-btn-danger { background: #b42318; border-color: #b42318; color: #fff; }
.ms-access-banner { display: block; }
.ag-msg.is-info { background: #e7f0ff; border-color: #b6ccf5; }
html[data-theme="dark"] .ag-msg.is-info { background: #1f2e4c; border-color: #33507f; }
html[data-theme="dark"] .ag-pill.ms-pill-danger { background: #4c1f24; color: #f5b5bb; border-color: #7f333b; }
.ms-lang-picker { display: inline-flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.ms-lang-picker button, .ms-lang-picker a { background: none; border: 1px solid var(--ag-border, #ddd); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; cursor: pointer; color: inherit; text-decoration: none; }
.ms-lang-picker .is-current { background: var(--ag-accent, #2b6cb0); color: #fff; border-color: transparent; }
.ms-lang-float { position: fixed; top: .75rem; left: .75rem; z-index: 5; }

/* Razdelitev: znesek + € + »izplačano« ne gre v 120 px stolpec portala (daljši prevodi) */
.ag-payout-row { grid-template-columns: 28px 36px minmax(0, 1fr) auto; }
@media (max-width: 980px) { .ag-payout-row { grid-template-columns: 28px 36px 1fr; } }

/* ===== Enoten slog VSEH vnosnih polj (svetlo + temno) =====
   Osnova za vsak input/select/textarea v aplikaciji, tudi brez razreda portala (zneski x-money, datumi x-sl-date,
   dinamične vrstice: pesmi za trenutke, razdelitev, opomniki, seznami …). Brez tega brskalnik pri color-scheme: dark
   nariše svoja siva, oglata polja. :where() = specifičnost 0, zato namenski slogi (koda nastopa, oder, prijava) ostanejo. */
:where(input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search],
  input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=month],
  select, textarea) {
  padding: .55rem .7rem; border: 1px solid var(--ag-border); border-radius: 8px; font-family: inherit; font-size: .95rem;
  background-color: var(--ag-input, #fff); color: var(--ag-ink); box-sizing: border-box; max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
:where(textarea) { line-height: 1.45; resize: vertical; }
:where(input, select, textarea)::placeholder { color: var(--ag-muted); opacity: .8; }
:where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea):focus {
  outline: none; border-color: var(--ag-accent); box-shadow: 0 0 0 3px rgba(var(--ag-accent-rgb, 196,30,58), .15);
}
:where(input, select, textarea):disabled { background-color: var(--ag-surface-2); opacity: 1; }
/* Znesek z €: isto polje, € je le diskreten dodatek znotraj desnega roba (ovoj nima lastnega okvirja) */
.ms-eur { position: relative; display: block; background: none; border: 0; padding: 0; }
.ms-eur > input { width: 100%; padding-right: 1.9rem; text-align: right; font-variant-numeric: tabular-nums; }
.ms-eur > i { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .9rem; color: var(--ag-muted); pointer-events: none; }
input.ms-numin { font-variant-numeric: tabular-nums; }
/* Polje za kopiranje povezave (ICS): enak okvir kot ostala polja, le pisava ostane enakomerna (berljivost URL) */
input.ms-copy { font-size: .95rem; padding: .55rem .7rem; border: 1px solid var(--ag-border); border-radius: 8px; background: var(--ag-input, #fff); color: var(--ag-ink); }

/* ===== Tipi dogodkov po skupini: barva iz nastavitev (--tc) ===== */
.ag-type.ms-tc, .ag-cal-legend .ms-tc { background: color-mix(in srgb, var(--tc, #888) 16%, var(--ag-card, #fff)); color: color-mix(in srgb, var(--tc, #888) 78%, #000); }
html[data-theme="dark"] .ag-type.ms-tc, html[data-theme="dark"] .ag-cal-legend .ms-tc { background: color-mix(in srgb, var(--tc, #888) 30%, var(--ag-card, #18223f)); color: color-mix(in srgb, var(--tc, #888) 45%, #fff); }
.ag-cal-chip.ms-tc { background: color-mix(in srgb, var(--tc, #888) 16%, var(--ag-card, #fff)); color: color-mix(in srgb, var(--tc, #888) 78%, #000); }
html[data-theme="dark"] .ag-cal-chip.ms-tc { background: color-mix(in srgb, var(--tc, #888) 30%, var(--ag-card, #18223f)); color: color-mix(in srgb, var(--tc, #888) 45%, #fff); }
.ag-cal-dot.ms-tc, html[data-theme="dark"] .ag-cal-dot.ms-tc { background: var(--tc, #888); }
.ms-tc-ico { font-style: normal; }
.ms-et-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ms-et-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border: 1px solid var(--ag-border); border-radius: 10px; background: var(--ag-card); }
.ms-et-row.is-editing { border-color: var(--ag-accent); box-shadow: 0 0 0 3px rgba(var(--ag-accent-rgb, 196,30,58), .12); }
.ms-et-row.is-archived { opacity: .65; border-style: dashed; }
.ms-et-order { display: flex; flex-direction: column; gap: 2px; }
.ms-et-arrow { border: 1px solid var(--ag-border); background: var(--ag-input, #fff); color: var(--ag-muted); border-radius: 6px; font-size: .6rem; line-height: 1; padding: .2rem .35rem; cursor: pointer; }
.ms-et-arrow:disabled { opacity: .3; cursor: default; }
.ms-et-main { flex: 1; min-width: 0; }
.ms-et-title { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.ms-et-title .ag-type { font-size: .82rem; }
.ms-et-flags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.ms-et-flag { font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--ag-border); color: var(--ag-muted); }
.ms-et-flag.is-on { color: var(--ag-ink); border-color: color-mix(in srgb, var(--ag-ok-text, #2d6a4f) 45%, var(--ag-border)); }
.ms-et-acts { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.ms-et-acts form { margin: 0; }
.ms-et-del { color: var(--ag-accent-text, #c41e3a); }
.ms-et-preview { display: flex; align-items: center; min-height: 42px; }
.ms-et-preview .ag-type { font-size: .9rem; padding: .3rem .75rem; }
.ms-et-icons { display: flex; flex-wrap: wrap; gap: .3rem; margin: -.25rem 0 .9rem; }
.ms-et-ico { border: 1px solid var(--ag-border); background: var(--ag-input, #fff); color: var(--ag-ink); border-radius: 8px; padding: .2rem .45rem; font-size: 1rem; cursor: pointer; line-height: 1.3; }
.ms-et-ico:first-child { font-size: .78rem; }
.ms-et-ico:hover { border-color: var(--ag-accent); }
.ms-et-i18n { margin: -.25rem 0 .8rem; }
.ms-et-i18n summary { cursor: pointer; font-size: .85rem; margin-bottom: .5rem; }
.ms-et-flags-edit .ag-check { align-items: flex-start; margin-bottom: .45rem; }
.ms-et-del-actions { gap: .5rem; flex-wrap: wrap; align-items: center; }
.ms-et-del-actions form { margin: 0; }
@media (max-width: 720px) { .ms-et-row { flex-wrap: wrap; } .ms-et-acts { width: 100%; justify-content: flex-start; } }
