/* Crno Jaje · Social Manager. Light, calm and red: the design of crnojaje-social-manager-ui-v9.
   Bootstrap stays underneath for the settings' grid and form controls; everything you see is styled here. */

:root {
    --bg: #f7f8fa;
    --white: #fff;
    --text: #20242b;
    --muted: #7b8491;
    --faint: #a3abb6;
    --line: #e8eaee;
    --line-strong: #dfe3e9;
    --red: #ec493e;
    --red-dark: #c9372d;
    --soft: #fff0ee;
    --soft-line: #f2c4c0;
    --green: #24845e;
    --green-soft: #e9f8f0;
    --amber: #a86a12;
    --amber-soft: #fff6e2;
    --blue: #2f6fd0;
    --blue-soft: #edf3fd;
    --violet: #6a4bc4;
    --violet-soft: #f2eefc;
    --panel: #f8f9fb;
    --shadow: 0 10px 35px rgba(27, 35, 45, 0.035);
    --shadow-pop: 0 30px 90px rgba(18, 25, 38, 0.21);
    --font: Inter, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

    --bs-body-font-family: var(--font);
    --bs-body-font-size: 14px;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--line);
    --bs-link-color: var(--red-dark);
    --bs-link-color-rgb: 201, 55, 45;
    --bs-link-hover-color: var(--red);
    --bs-link-hover-color-rgb: 236, 73, 62;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { color: var(--text); font-weight: 800; }
code { color: #b13e35; font-size: 0.92em; }
::selection { background: rgba(236, 73, 62, 0.18); }
details > summary { cursor: pointer; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 29px 17px 20px; display: flex; flex-direction: column; gap: 30px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 13px; color: var(--text); }
.brand:hover { color: var(--text); }
.logo { background: var(--red); color: #fff; border-radius: 12px; width: 36px; height: 36px; display: grid; place-items: center; font-weight: 900; flex-shrink: 0; }
.brand strong { display: block; font-size: 16px; letter-spacing: -0.5px; line-height: 1.25; }
.brand small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 1.4px; }
.nav { display: grid; gap: 4px; }
.nav a { border: 0; background: transparent; color: #68717e; text-align: left; padding: 12px 14px; border-radius: 10px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.nav a:hover { background: #f6f7f9; color: var(--text); }
.nav a.active { background: var(--soft); color: var(--red); }
.nav .ico { width: 20px; text-align: center; font-size: 17px; line-height: 1; flex-shrink: 0; }
.nav .ico .bi { font-size: 15px; }
.nav-section { margin: 18px 14px 4px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); }
.nav-out { margin-left: auto; font-size: 11px; opacity: 0.6; }
.nav-count { margin-left: auto; background: var(--red); color: #fff; border-radius: 20px; font-size: 11px; font-weight: 800; padding: 1px 8px; }
.sidebottom { margin-top: auto; background: var(--panel); padding: 14px; border-radius: 13px; font-size: 12px; color: #697382; display: grid; gap: 12px; }
.status-line { display: grid; gap: 2px; }
.status-line .indent { padding-left: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #31b67a; margin-right: 5px; }
.dot.test { background: var(--violet); }
.dot.paused { background: var(--red); }
.me { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 12px; }
.me .avatar { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.me .who { min-width: 0; flex: 1; line-height: 1.25; }
.me .who strong { display: block; color: var(--text); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who a { color: var(--muted); font-size: 11px; }
.me .who a:hover { color: var(--red); }
.me form { margin: 0; }
.me button, .me .bell { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: #4d5562; display: grid; place-items: center; padding: 0; position: relative; }
.me button:hover, .me .bell:hover { color: var(--red); border-color: var(--soft-line); }
.me .bell .count { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; border-radius: 10px; padding: 1px 5px; }

.main { min-width: 0; padding: 34px clamp(20px, 4vw, 60px) 90px; max-width: 1600px; width: 100%; margin: 0 auto; }

/* ---------- page head ---------- */
.top { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 32px; flex-wrap: wrap; }
.top > div:first-child { min-width: 0; }
.eyebrow { color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.top h1 { font-size: 31px; letter-spacing: -1.2px; margin: 4px 0; line-height: 1.2; }
.top .muted { max-width: 780px; }
.topactions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.topactions form { margin: 0; }

/* ---------- buttons ---------- */
.btn {
    --bs-btn-padding-x: 15px; --bs-btn-padding-y: 10px; --bs-btn-font-size: 14px; --bs-btn-font-weight: 700; --bs-btn-line-height: 1.4;
    --bs-btn-border-radius: 9px; --bs-btn-color: #303640; --bs-btn-bg: #fff; --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: #f6f7f9; --bs-btn-hover-border-color: var(--line-strong);
    --bs-btn-active-color: var(--text); --bs-btn-active-bg: #eff1f4; --bs-btn-active-border-color: var(--line-strong);
    --bs-btn-disabled-color: #303640; --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: var(--line);
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.18);
    border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 15px; font-weight: 700; color: #303640; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
}
.btn:hover { color: var(--text); }
.btn.primary, .btn-cj {
    --bs-btn-color: #fff; --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--red-dark); --bs-btn-active-border-color: var(--red-dark);
    --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--red); --bs-btn-disabled-border-color: var(--red);
    background: var(--red); border-color: var(--red); color: #fff;
}
.btn.primary:hover, .btn-cj:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-dark-cj { --bs-btn-color: #fff; --bs-btn-bg: var(--text); --bs-btn-border-color: var(--text); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #000; background: var(--text); border-color: var(--text); color: #fff; }
.btn-dark-cj:hover { color: #fff; background: #000; }
.btn-soft { background: #fff; }
.btn.small, .btn-sm { --bs-btn-padding-x: 11px; --bs-btn-padding-y: 7px; --bs-btn-font-size: 12px; padding: 7px 11px; font-size: 12px; border-radius: 8px; }
.btn-lg { --bs-btn-padding-x: 20px; --bs-btn-padding-y: 12px; padding: 12px 20px; font-size: 15px; }
.btn-link { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: transparent; --bs-btn-hover-border-color: transparent; background: transparent; border-color: transparent; color: var(--muted); font-weight: 700; }
.btn-link:hover { color: var(--red); background: transparent; }
.btn-link.text-danger, .btn.danger-link { color: #c2362c !important; background: transparent; border-color: transparent; }
.btn:disabled, .btn.is-busy { opacity: 0.65; pointer-events: none; }
.btn.pause-ai { border-color: var(--soft-line); color: #b83d35; background: #fff7f6; }
.btn.pause-ai.is-paused { background: var(--green-soft); color: #24754f; border-color: #bfe6ce; }

/* ---------- notes ---------- */
.note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 22px; padding: 12px 15px; border-radius: 10px; font-weight: 600; border: 1px solid var(--line); background: #fff; }
.note > span:first-child { flex-shrink: 0; }
.note.bad, .ai-paused-note { border-color: var(--soft-line); background: #fff7f6; color: #a63d36; }
.note.warn { border-color: #f1dcae; background: #fffaf0; color: #87580f; }
.note.ok { border-color: #bfe6ce; background: #f2fbf6; color: #1f6b4b; }
.ai-paused-note { display: block; margin: -13px 0 22px; padding: 12px 15px; border: 1px solid var(--soft-line); border-radius: 10px; font-weight: 600; }
.alert { border-radius: 10px; border: 1px solid var(--line); padding: 12px 15px; font-weight: 600; }
.alert-danger { background: #fff7f6; border-color: var(--soft-line); color: #a63d36; }
.alert-warning { background: #fffaf0; border-color: #f1dcae; color: #87580f; }
.alert-success { background: #f2fbf6; border-color: #bfe6ce; color: #1f6b4b; }
.alert-info { background: var(--blue-soft); border-color: #cfe0fa; color: #26559f; }

.alerts { display: grid; gap: 8px; margin: -12px 0 24px; }
.alerts .note { margin: 0; align-items: center; }
.alerts .note > div { flex: 1; min-width: 0; }
.alerts .note small { display: block; font-weight: 500; opacity: 0.85; word-break: break-word; }
.alerts form { margin: 0; }
.alerts .x { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; opacity: 0.7; }
.alerts .x:hover { opacity: 1; background: rgba(0, 0, 0, 0.05); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 29px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 18px 20px; border-radius: 14px; min-width: 0; }
.stat label, .stat .label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; font-weight: 500; }
.stat strong, .stat .value { font-size: 26px; letter-spacing: -1px; font-weight: 800; line-height: 1.25; }
.stat strong.state { font-size: 18px; letter-spacing: -0.4px; }
.stat strong.state.ok { color: var(--green); }
.stat strong.state.bad { color: #b83d35; }
.stat strong.state.busy { color: var(--blue); }
.stat strong.state.wait { color: var(--amber); }
.stat span { font-size: 12px; color: #798390; margin-left: 5px; }
.stat .stat-icon { display: none; }

/* ---------- section heads, pills ---------- */
.sectionhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 16px; flex-wrap: wrap; }
.sectionhead h2 { margin: 0; font-size: 19px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 11px; padding: 5px 9px; background: #f0f2f5; border-radius: 20px; color: #697280; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.bad { background: #fff1f0; color: #b83d35; }
.pill.wait { background: var(--amber-soft); color: var(--amber); }
.pill.busy { background: var(--blue-soft); color: var(--blue); }
.pill.test { background: var(--violet-soft); color: var(--violet); }
.pill a { color: inherit; }

/* ---------- post cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; scroll-margin-top: 24px; }
.pcard.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px rgba(236, 73, 62, 0.25); } 100% { box-shadow: var(--shadow); } }
.photo { height: 178px; background: #eef0f3 center / cover no-repeat; position: relative; }
.photo.empty { display: grid; place-items: center; color: var(--faint); font-size: 34px; }
.photo .time { position: absolute; top: 12px; left: 12px; background: #fff; padding: 7px 10px; border-radius: 8px; font-weight: 800; font-size: 12px; }
.photo .status { position: absolute; top: 12px; right: 12px; background: var(--green-soft); color: #20845d; border-radius: 8px; padding: 6px 9px; font-weight: 800; font-size: 11px; }
.photo .status.wait { background: var(--amber-soft); color: var(--amber); }
.photo .status.busy { background: var(--blue-soft); color: var(--blue); }
.photo .status.bad { background: #fff1f0; color: #b83d35; }
.photo .status.muted { background: #f0f2f5; color: #697280; }
.photo .progress-line { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.6); }
.photo .progress-line > span { display: block; height: 100%; background: var(--blue); transition: width 0.4s; }
.cardbody { padding: 17px; display: flex; flex-direction: column; flex: 1; }
.pcard h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.4px; margin: 7px 0 5px; }
.pcard h3 a { color: inherit; text-decoration: none; }
.pcard h3 a:hover { color: var(--red); text-decoration: underline; }
.pcard p { margin: 0; color: var(--muted); font-size: 12px; }
.pcard .problem { margin-top: 10px; font-size: 12px; color: #a63d36; background: #fff7f6; border: 1px solid var(--soft-line); border-radius: 8px; padding: 8px 10px; }
.pcard .why { margin-top: 8px; font-size: 11px; color: var(--faint); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 15px 0; }
.chip { background: #f5f6f8; border-radius: 6px; padding: 5px 8px; font-size: 11px; color: #5f6875; font-weight: 700; }
.chip-btn { border: 0; cursor: pointer; font-family: inherit; }
.chip-btn:hover, .chip-btn:focus-visible { background: var(--soft); color: var(--red); }

/* A post's preview (Danas → a channel on a card): as the network shows it. */
.pv-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pv { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13px; color: #1c1e21; text-align: left; }
.pv img, .pv video { display: block; }
.pv-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.pv-head img, .pv-who img, .pv-comment.fb img { width: 32px; height: 32px; border-radius: 50%; background: #111; object-fit: contain; padding: 3px; flex-shrink: 0; }
.pv-head small { display: block; color: #65676b; font-size: 11px; }
.pv-more { margin-left: auto; color: #65676b; font-weight: 800; }
.pv-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 5; background: #000; }
.pv-carousel::-webkit-scrollbar { display: none; }
.pv-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; }
.pv-slide img { width: 100%; height: 100%; object-fit: cover; }
.pv-carousel.square { aspect-ratio: 1 / 1; }
.pv-count { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: #fff; border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: 700; }
.pv-media { position: relative; }
.pv-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, 0.9); color: #262626; display: grid; place-items: center; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25); cursor: pointer; font-size: 14px; }
.pv-arrow:hover { background: #fff; }
.pv-arrow.prev { left: 8px; }
.pv-arrow.next { right: 8px; }
.pv-arrow[hidden] { display: none; }
.pv-dots { display: flex; justify-content: center; gap: 4px; padding-top: 9px; }
.pv-dots span { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.pv-dots span.on { background: #0095f6; }
.pv-bar { display: flex; gap: 14px; padding: 9px 12px 4px; font-size: 19px; }
.pv-bar .pv-end { margin-left: auto; }
.pv-bar.fb { justify-content: space-around; font-size: 12px; font-weight: 700; color: #65676b; border-top: 1px solid #e4e6eb; margin-top: 8px; padding: 8px 6px; }
.pv-bar.fb i { margin-right: 4px; }
.pv-text { padding: 4px 12px 10px; white-space: pre-line; line-height: 1.45; max-height: 260px; overflow-y: auto; }
.pv-feed.fb .pv-text { padding: 0 12px 10px; }
.pv-comment { padding: 0 12px 12px; color: #444; white-space: pre-line; word-break: break-word; }
.pv-comment.fb { display: flex; gap: 8px; align-items: flex-start; padding-top: 4px; }
.pv-comment.fb > div { background: #f0f2f5; border-radius: 14px; padding: 7px 11px; }
.pv-comment.fb img { width: 26px; height: 26px; }
.pv-grid { display: grid; gap: 2px; grid-template-columns: repeat(6, 1fr); background: #fff; }
.pv-cell { position: relative; aspect-ratio: 1; overflow: hidden; grid-column: span 2; }
.pv-cell img { width: 100%; height: 100%; object-fit: cover; }
/* Facebook's layouts: one big; two side by side; one wide over two or three; two over three. */
.pv-grid.n1 .pv-cell { grid-column: span 6; aspect-ratio: 4 / 3; }
.pv-grid.n2 .pv-cell, .pv-grid.n3 .pv-cell, .pv-grid.n5 .pv-cell:nth-child(-n+2) { grid-column: span 3; }
.pv-grid.n3 .pv-cell:first-child, .pv-grid.n4 .pv-cell:first-child { grid-column: span 6; aspect-ratio: 2 / 1; }
.pv-plus { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 26px; font-weight: 800; }
.pv-feed-video { width: 100%; aspect-ratio: 9 / 16; max-height: 520px; background: #000; object-fit: contain; }
.pv-novideo { display: grid; place-items: center; background: #111; color: #fff; font-weight: 700; padding: 16px; text-align: center; height: 100%; }
.pv-novideo.square { aspect-ratio: 1; height: auto; }
.pv-vertical { position: relative; max-width: 300px; aspect-ratio: 9 / 16; background: #000; border: 0; color: #fff; }
.pv-vertical video { width: 100%; height: 100%; object-fit: contain; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; padding: 8px 10px; background: linear-gradient(rgba(0, 0, 0, 0.45), transparent); pointer-events: none; }
.pv-progress { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden; margin-bottom: 8px; }
.pv-progress span { display: block; width: 35%; height: 100%; background: #fff; }
.pv-who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pv-who img { width: 28px; height: 28px; }
.pv-who small { opacity: 0.75; }
.pv-sticker { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); background: #fff; color: #2563eb; border-radius: 8px; padding: 6px 12px; font-weight: 800; font-size: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); pointer-events: none; white-space: nowrap; }
.pv-reel-text { position: absolute; left: 0; right: 44px; bottom: 52px; padding: 0 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); pointer-events: none; }
.pv-reel-caption { margin-top: 6px; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-side { position: absolute; right: 10px; bottom: 60px; display: flex; flex-direction: column; gap: 16px; font-size: 22px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); pointer-events: none; }
.pv-reel-comment { max-width: 300px; padding-top: 10px; }
.pv-side .pv-share { transform: scaleX(-1); }
.pv-vertical.pv-photos { flex: none; }
.pv-vertical.pv-photos .pv-carousel { position: absolute; inset: 0; aspect-ratio: auto; }
.pv-vertical.pv-photos .pv-slide img { object-fit: contain; }
.pv-vertical.pv-photos .pv-dots { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0; }
.pv-vertical.pv-photos .pv-dots span { background: rgba(255, 255, 255, 0.45); }
.pv-vertical.pv-photos .pv-dots span.on { background: #fff; }
.pv-note { text-align: center; max-width: 380px; margin: 0; }
.cardactions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: auto; }
.cardactions button, .cardactions .wide { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 6px; font-size: 12px; font-weight: 700; color: #4d5562; }
.cardactions button:first-child { background: #f9fafb; }
.cardactions button:hover { border-color: var(--line-strong); color: var(--text); }
.cardactions button:disabled { opacity: 0.5; cursor: default; }
.cardactions form { margin: 0; grid-column: 1 / -1; }
.cardactions .video-btn { background: #fff7f6; border-color: var(--soft-line); color: #b83d35; }
.cardactions .video-btn:hover { border-color: #b83d35; color: #9f2f28; }
.cardactions .wide { width: 100%; }
.cardactions .wide.go { background: var(--red); border-color: var(--red); color: #fff; }
.cardactions .wide.go:hover { background: var(--red-dark); color: #fff; }

/* the Instagram Stories waiting for a person */
.manual-list { display: grid; gap: 10px; }
.manual { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid #f1dcae; border-radius: 14px; padding: 10px 14px 10px 10px; }
.manual img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #eef0f3; }
.manual strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manual small { color: var(--muted); }
.manual .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.manual form { margin: 0; }

.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed #dce0e6; border-radius: 12px; background: rgba(255, 255, 255, 0.5); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty form, .empty .btn { margin-top: 14px; }
.minihelp { font-size: 12px; color: var(--muted); }

/* ---------- panels, forms ---------- */
.panel, .card-cj { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 21px; box-shadow: var(--shadow); }
.card-cj + .card-cj { margin-top: 18px; }
.panel h3 { margin: 0 0 4px; font-size: 16px; }
.card-cj > h2:first-child, .card-cj h2 { font-size: 16px; letter-spacing: -0.3px; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.card-cj h2 i, .card-head h2 i { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--soft); color: var(--red); font-size: 14px; flex-shrink: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.panel-note { color: var(--muted); font-size: 13px; margin: -4px 0 14px; }
.lead { color: var(--muted); font-size: 14px; }
.small-label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 800; }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; align-content: start; }
.field > label, .field .form-label { font-weight: 700; font-size: 12px; margin: 0; color: var(--text); }
.field small { color: var(--muted); font-size: 11.5px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea,
.form-control, .form-select {
    border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 12px; background-color: #fff; width: 100%; color: var(--text); font-size: 14px; line-height: 1.4;
}
.field textarea, textarea.form-control { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .form-control:focus, .form-select:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.14); }
.form-control[readonly] { background: var(--panel); }
.form-select { padding-right: 34px; }
.form-control-sm, .form-select-sm { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.form-select-sm { padding-right: 30px; }
.form-control-lg { padding: 13px 14px; font-size: 16px; }
.form-control-color { padding: 4px; height: 44px; }
.form-label { font-weight: 700; font-size: 12px; margin-bottom: 6px; color: var(--text); }
.form-text { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.form-check-input { border-color: var(--line-strong); }
.form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.14); border-color: var(--red); }
.form-check-label { font-size: 14px; }
.check-row { display: flex; gap: 15px; flex-wrap: wrap; }
.check-row label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; cursor: pointer; }
.check-row input { accent-color: var(--red); width: 16px; height: 16px; }
.readonly-value { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 11px 12px; font-weight: 600; }

/* A column per network (Instagram, Facebook, TikTok, as in Postavke → Društvene mreže); one under the other when narrow. */
.platform-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 2px; }
.platform-col { display: grid; gap: 10px; align-content: start; }
.platform-choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; cursor: pointer; font-weight: 650; margin: 0; }
.platform-choice:has(input:checked) { border-color: var(--red); background: #fff4f2; }
.platform-choice input { accent-color: var(--red); width: 17px; height: 17px; }
.platform-choice small { display: block; color: var(--muted); font-weight: 500; }
.modal-section { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 18px; }
.modal-section h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.3px; }
.modal-section .minihelp { margin: 0 0 14px; }
.modal-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.modal-buttons .left { margin-right: auto; }
.modal-buttons form { margin: 0; }

/* "Predloži drugu": the agent's proposal in its window. */
.proposal-wait { margin: 0 0 16px; }
.proposal-offer { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.proposal-offer[hidden] { display: none; }
.proposal-offer img { width: 170px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; flex: none; background: #f0f2f5; }
.proposal-offer h3 { font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
.proposal-offer h3 a { color: inherit; text-decoration: none; }
.proposal-offer h3 a:hover { color: var(--red); text-decoration: underline; }
.proposal-offer p { margin: 0 0 4px; }
.proposal-offer p:empty { display: none; }
.proposal .problem { margin-bottom: 16px; font-size: 13px; color: #a63d36; background: #fff7f6; border: 1px solid var(--soft-line); border-radius: 8px; padding: 8px 10px; }
@media (max-width: 520px) {
    .proposal-offer { flex-direction: column; }
    .proposal-offer img { width: 100%; }
}

/* ---------- modal, toast ---------- */
.modalback { position: fixed; inset: 0; background: #1d253480; display: none; align-items: center; justify-content: center; padding: 18px; z-index: 1080; }
.modalback.show { display: flex; }
.cj-modal { background: #fff; width: min(610px, 100%); max-height: 90vh; overflow: auto; border-radius: 18px; padding: 25px; box-shadow: var(--shadow-pop); }
.cj-modal.wide { width: min(1200px, 100%); max-height: 94vh; }
.modalheader { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.modalheader h2 { margin: 0; font-size: 21px; letter-spacing: -0.5px; }
.close { border: 0; background: #f3f4f6; border-radius: 9px; width: 34px; height: 34px; font-size: 19px; flex-shrink: 0; }
.close:hover { background: #eaecef; }
template { display: none; }
.toast-cj { position: fixed; bottom: 24px; right: 104px; background: #242b34; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 2000; max-width: min(460px, calc(100vw - 130px)); font-weight: 600; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.45); animation: pop 0.22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* "Uredi tekst": the networks' texts side by side */
.text-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.text-columns textarea { min-height: 360px; }
.text-columns label .bi { margin-right: 4px; }

/* videos in the modal: the video on the left, its text and music on the right */
.video-layout.split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.video-layout.split .video-side .minihelp { max-width: 300px; margin-left: auto; margin-right: auto; }
.video-form h3 { margin: 0 0 4px; font-size: 16px; letter-spacing: -0.3px; }
.video-form .minihelp { margin: 0 0 14px; }
.videos { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.videos figure { margin: 0; text-align: center; }
.videos video, .videos .placeholder { height: min(520px, 65vh, calc((100vw - 90px) * 16 / 9)); aspect-ratio: 9 / 16; border-radius: 12px; background: #111 center / cover; display: block; object-fit: cover; }
/* Full screen: the whole 9:16 frame, black beside it (cover would crop it to the screen). */
.videos video:fullscreen { width: 100%; height: 100%; border-radius: 0; background: #000; object-fit: contain; }
.videos video:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; background: #000; object-fit: contain; }
.videos .placeholder { display: flex; align-items: flex-end; padding: 16px; color: #fff; text-shadow: 0 2px 9px #000; font-size: 16px; font-weight: 800; text-align: left; position: relative; }
.videos .placeholder em { position: absolute; top: 12px; left: 12px; right: 12px; font-style: normal; font-size: 11px; background: rgba(0, 0, 0, 0.55); border-radius: 8px; padding: 6px 8px; text-shadow: none; font-weight: 700; }
.videos figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.videos figcaption a { font-weight: 700; }

/* ---------- tables ---------- */
.dtable, .table-cj { width: 100%; border-collapse: collapse; background: #fff; }
.dtable { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); border-collapse: separate; border-spacing: 0; }
.dtable th, .dtable td, .table-cj th, .table-cj td { text-align: left; padding: 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tr:last-child td, .table-cj tr:last-child td { border-bottom: 0; }
.dtable th, .table-cj th { color: #7c8490; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: #fafbfc; font-weight: 700; white-space: nowrap; }
.table-cj td { vertical-align: top; padding: 12px 15px; }
.table-cj tbody tr:hover { background: #fcfcfd; }
.dtable td small { display: block; color: var(--muted); }
.dtable tr.off td { opacity: 0.5; }
.table-wrap { overflow-x: auto; border-radius: 14px; }
.card-cj .table-wrap { margin: 0 -21px; border-radius: 0; }
.card-cj .table-cj th:first-child, .card-cj .table-cj td:first-child { padding-left: 21px; }
.card-cj .table-cj th:last-child, .card-cj .table-cj td:last-child { padding-right: 21px; }
tr.muted td { opacity: 0.55; }
.action-icons { display: flex; align-items: center; gap: 8px; }
.action-icons form { margin: 0; }
.icon-action { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #4d5562; padding: 0; }
.icon-action:hover { background: #f4f5f7; }
.icon-action.danger:hover { color: #d93636; background: #fff1f1; border-color: #f7caca; }
.icon-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- history ---------- */
.seg-links { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg-links a { padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 12px; color: #68717e; }
.seg-links a.active { background: var(--soft); color: var(--red); }

/* Dnevnik AI */
.ailog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ailog-filters .seg-links { flex-wrap: wrap; }
.ailog-filters .seg-links a { display: inline-flex; align-items: center; gap: 5px; }
.ailog-stop { display: block; margin-top: 6px; padding: 3px 10px; font-size: 12px; white-space: nowrap; }
.ailog-note { max-width: 280px; font-size: 11px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-group + .day-group { margin-top: 22px; }
.day-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 0 0 8px; font-weight: 800; }
.scheduleline { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.scheduleline:last-child { border: 0; }
.scheduleline > b { width: 44px; flex-shrink: 0; }
.scheduleline > img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #eef0f3; flex-shrink: 0; }
.scheduleline > div { flex: 1; min-width: 0; }
.scheduleline small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scheduleline .title { font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.scheduleline .nets { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.scheduleline .nets .chip { display: inline-flex; gap: 5px; align-items: center; }
.scheduleline .nets a.chip:hover { background: var(--soft); color: var(--red); }
.scheduleline .nets .chip.bad { background: #fff1f0; color: #b83d35; }
.scheduleline .nets .chip.test { background: var(--violet-soft); color: var(--violet); }
.scheduleline .nets form { display: inline; margin: 0; }
.scheduleline .nets .chip button { border: 0; background: transparent; color: inherit; font-weight: 800; padding: 0; text-decoration: underline; }
.bottomgrid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bottomgrid > * { min-width: 0; }

/* ---------- badges (settings, helper) ---------- */
.badge-cj { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #f0f2f5; color: #697280; }
.st-planned, .st-draft, .st-skipped, .st-rejected { background: #f0f2f5; color: #697280; }
.st-generating, .st-publishing { background: var(--blue-soft); color: var(--blue); }
.st-awaitingapproval, .st-manualrequired { background: var(--amber-soft); color: var(--amber); }
.st-approved, .st-ready { background: var(--soft); color: var(--red-dark); }
.st-published, .st-manualdone, .st-posted { background: var(--green-soft); color: var(--green); }
.st-partiallypublished { background: var(--amber-soft); color: var(--amber); }
.st-failed, .st-missed { background: #fff1f0; color: #b83d35; }
.st-simulated { background: var(--violet-soft); color: var(--violet); }
.net-fb { color: #1877f2; }
.net-ig { color: #d62976; }
.net-tt { color: #111; }

/* ---------- settings: Društvene mreže ---------- */
.status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.status-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.status-card > div { min-width: 0; flex: 1; }
.status-card small { display: block; font-size: 12px; color: var(--muted); }
.status-card strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 17px; flex-shrink: 0; }
.sc-icon.fb, .net-badge.facebook { background: #1877f2; }
.sc-icon.ig, .net-badge.instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.sc-icon.tt, .net-badge.tiktok { background: #111; text-shadow: -1px -1px 0 #25f4ee, 1px 1px 0 #fe2c55; }
.sc-icon.pub { background: var(--red); }
.status-card .dot { width: 9px; height: 9px; margin: 0; background: #d4d7dd; flex-shrink: 0; }
.status-card .dot.on { background: #31b67a; box-shadow: 0 0 0 4px var(--green-soft); }
.status-card .dot.test { background: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.net-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.net-grid .card-cj + .card-cj { margin-top: 0; }
.net-panel.span-2 { grid-column: 1 / -1; }
.net-panel.is-off .targets { opacity: 0.45; pointer-events: none; }
.check-result { border-radius: 10px; padding: 10px 14px; font-size: 13px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 14px; }
.check-result.is-ok { background: #f2fbf6; color: #1f6b4b; border-color: #bfe6ce; }
.check-result.is-alert { background: #fff7f6; color: #a63d36; border-color: var(--soft-line); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field.span-2 { grid-column: 1 / -1; }
.field-foot { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.forget { font-size: 12px; color: #b83d35; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.oauth { margin-top: 6px; border-top: 1px dashed var(--line-strong); padding-top: 14px; }
.oauth summary { font-weight: 700; font-size: 13px; }
.switch-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.switch-row > div strong { display: block; font-weight: 700; }
.switch-row > div small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.switch-row.big { grid-template-columns: minmax(0, 1fr) auto; }
.switch-row.big strong { font-size: 15px; }
.switch-row.head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.net-badge { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 18px; }
.publish-panel { border-color: #ddd5f5; }
.publish-panel.live { border-color: #bfe6ce; background: #fbfefc; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d6dae0; transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.2); }
.switch.sm { width: 40px; height: 22px; }
.switch.sm span::after { width: 16px; height: 16px; }
.switch.sm input:checked + span::after { transform: translateX(18px); }
.targets { display: flex; flex-direction: column; }
.target-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.target-row:last-child { border-bottom: 0; }
.target-row .tr-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--panel); font-size: 15px; }
.target-row .tr-body { margin: 12px 0 0 46px; display: flex; flex-direction: column; gap: 10px; }
.target-row.is-off .tr-body { opacity: 0.4; pointer-events: none; }
.chip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-label { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); width: 62px; }
/* A slot's categories (Raspored): the main lists, then every other tag, with a search box. */
[data-kind-panel][hidden] { display: none !important; }
.category-picker .cp-groups { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.category-picker .cp-group { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.category-picker .cp-group:last-of-type { padding-bottom: 0; border-bottom: 0; }
.category-picker .cp-group[hidden], .category-picker .chip-check[hidden] { display: none; }
.category-picker .cp-search { margin-top: 8px; }
.category-picker .cp-none { margin: 0; }
.category-picker .cp-main span { font-weight: 800; }
.music-field select { width: 100%; }
.music-field audio { display: block; width: 100%; height: 36px; margin-top: 8px; }
/* A select with a search (the calendar's category): its button, the list below it with a search box. */
.search-select { position: relative; }
.search-select .ss-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.search-select .ss-button { display: block; width: 100%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-select .ss-panel { position: absolute; z-index: 40; left: 0; top: calc(100% + 4px); width: max(100%, 300px); max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14); padding: 8px; }
.search-select .ss-panel[hidden] { display: none; }
.search-select .ss-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 300px; overflow-y: auto; }
.search-select .ss-group { padding: 8px 8px 4px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.search-select .ss-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.search-select .ss-item small { color: var(--muted); font-weight: 400; }
.search-select .ss-item.active { background: var(--soft); }
.search-select .ss-item[aria-selected="true"] { color: var(--red); font-weight: 700; }
.search-select .ss-group[hidden], .search-select .ss-item[hidden], .search-select .ss-empty[hidden] { display: none; }
.search-select .ss-empty { padding: 8px; font-size: 13px; color: var(--muted); }
/* A channel's week: a column per day, a row per slot. */
.week-grid { display: grid; grid-template-columns: 62px repeat(7, max-content); gap: 6px; align-items: center; overflow-x: auto; }
.week-grid .wg-day { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.week-grid .chip-check span { padding: 5px 8px; }
.chip-check { position: relative; margin: 0; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-check span { display: inline-block; padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: #fff; color: #5f6875; user-select: none; }
.chip-check input:checked + span { background: var(--soft); border-color: var(--soft-line); color: var(--red); }
.chip-check input:focus-visible + span { box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.2); }
.mini-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; margin: 0; }
.mini-switch input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--red); }
.inline-select { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.inline-select .form-select { width: auto; max-width: 100%; }
.save-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.25); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }

/* ---------- settings: data, users, AI ---------- */
.data-path { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--panel); margin-bottom: 12px; word-break: break-all; }
.data-path code { color: var(--text); }
.data-usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.data-usage div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.data-usage dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.data-usage dd { margin: 2px 0 0; font-weight: 800; font-size: 16px; }
.user-role, .user-reset { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-role .form-select { width: auto; min-width: 150px; }
.user-reset .form-control { width: 170px; }
.code-box { background: #1f242b; color: #e6e8eb; border-radius: 12px; padding: 14px; font-family: Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
.guide ol > li { margin-bottom: 16px; line-height: 1.6; }
.guide code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* ---------- settings: Planiranje i kalendar ---------- */
.jobs .dtable td:first-child { width: 70px; }
.jobs .run-state { font-size: 12px; color: var(--muted); display: block; max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobs .run-state.bad { color: #b83d35; }
.cat-list { display: flex; flex-direction: column; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; margin: 0; }
.cat-row:last-child { border-bottom: 0; }
.cat-name { flex: 1; min-width: 160px; }
.cat-name strong { display: block; font-size: 13px; }
.cat-name small { color: var(--muted); }
.year-grid { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; }
.year-grid th { font-size: 11px; color: var(--muted); font-weight: 700; text-align: center; padding: 4px 2px; }
.year-grid th:first-child { text-align: left; color: var(--text); font-size: 13px; padding-right: 12px; white-space: nowrap; }
.year-grid th.now { color: var(--red); }
.year-grid tbody th { font-weight: 700; }
.year-grid tbody th small { color: var(--muted); font-weight: 500; }
.year-grid td { padding: 0 2px; text-align: center; }
.year-grid td.now { background: var(--soft); }
.year-grid tr.off { opacity: 0.45; }
.yg-cats { display: block; margin-left: 16px; font-size: 11px; font-weight: 500; color: var(--muted); white-space: normal; max-width: 260px; }
.yg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.yg-cell { display: block; height: 18px; border-radius: 5px; background: #f0f2f5; }
.yg-cell.l1 { background: color-mix(in srgb, var(--c) 30%, #fff); }
.yg-cell.l2 { background: var(--c); }
.theme-form { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 10px; background: #fff; }
.theme-form.is-new { border-style: dashed; background: var(--panel); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); background: var(--bg); }
.login-art { position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; color: var(--text); background: #fff; border-right: 1px solid var(--line); }
.login-art > * { position: relative; z-index: 1; }
.login-art::after { content: ""; position: absolute; right: -160px; bottom: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(236, 73, 62, 0.14), transparent 65%); }
.login-art .art-brand { display: flex; align-items: center; gap: 14px; }
.login-art .art-brand img.egg { height: 48px; }
.login-art .art-brand img.word { height: 30px; filter: invert(1); }
.login-art h2 { font-size: 40px; line-height: 1.1; letter-spacing: -1.5px; max-width: 560px; margin: 0; }
.login-art h2 span { color: var(--red); }
.login-art p { color: var(--muted); max-width: 520px; margin-top: 14px; font-size: 15px; }
.login-art .features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.login-art .features span { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); color: #5f6875; }
.login-side { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow-pop); border: 1px solid var(--line); }
.login-card .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; width: auto; height: auto; background: transparent; color: var(--text); place-items: start; }
.login-card .logo img.egg { height: 44px; }
.login-card .logo img.word { height: 26px; filter: invert(1); }

/* ---------- the helper "Jaje" ---------- */
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 1060; width: 58px; height: 58px; border-radius: 18px; border: 1px solid var(--line); background: #fff; box-shadow: 0 14px 34px -10px rgba(27, 35, 45, 0.3); display: grid; place-items: center; padding: 0; transition: transform 0.18s; }
.chat-fab img { height: 36px; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #31b67a; box-shadow: 0 0 0 2px #fff; }
.chat-panel { position: fixed; right: 24px; bottom: 96px; z-index: 1060; width: min(430px, calc(100vw - 24px)); height: min(640px, calc(100vh - 120px)); background: #fff; border-radius: 18px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; animation: pop 0.2s ease-out; }
.chat-head { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-head img { height: 30px; }
.chat-head .who { font-weight: 800; line-height: 1.2; }
.chat-head .who small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.chat-head button { margin-left: auto; background: #f3f4f6; border: 0; color: #4d5562; width: 32px; height: 32px; border-radius: 9px; }
.chat-head button:hover { background: #eaecef; }
.chat-head button + button { margin-left: 6px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.assistant a { color: var(--red-dark); font-weight: 700; }
.msg.assistant p { margin: 0 0 6px; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 4px 0 6px; padding-left: 18px; }
.msg.assistant code { background: var(--soft); padding: 0 4px; border-radius: 4px; }
.tool-chip { align-self: flex-start; font-size: 11px; color: #5f6875; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; }
.tool-chip.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tool-chip.err { background: #fff1f0; color: #b83d35; border-color: transparent; }
.chat-changed { align-self: stretch; background: var(--soft); border: 1px solid var(--soft-line); color: var(--red-dark); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.chat-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; background: #fff; }
.chat-foot textarea { flex: 1; resize: none; border-radius: 10px; border: 1px solid var(--line-strong); padding: 10px 12px; font-size: 14px; max-height: 140px; }
.chat-foot textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(236, 73, 62, 0.14); }
.chat-foot button { height: 42px; width: 42px; padding: 0; }
.chat-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-hints button { font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 5px 11px; font-weight: 600; color: #4d5562; }
.chat-hints button:hover { border-color: var(--soft-line); color: var(--red); }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--red); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 1150px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .bottomgrid { grid-template-columns: 1fr; }
    .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .status-strip, .net-grid { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .video-layout.split { grid-template-columns: minmax(0, 1fr); }
    .text-columns textarea { min-height: 200px; }
    .sidebar { padding: 12px; gap: 12px; position: static; height: auto; overflow: visible; min-width: 0; }
    .brand { padding: 0; }
    .nav { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
    .nav a { white-space: nowrap; padding: 9px; }
    .nav-section { display: none; }
    .sidebottom { margin-top: 0; padding: 10px 12px; gap: 8px; }
    .status-line { display: none; }
    .me { border-top: 0; padding-top: 0; }
    .main { padding: 23px 15px 100px; }
    .top { align-items: flex-start; flex-direction: column; }
    .top h1 { font-size: 27px; }
    .cards, .bottomgrid, .formgrid, .field-grid { grid-template-columns: 1fr; }
    .photo { height: 210px; }
    .topactions { width: 100%; }
    .manual { grid-template-columns: 52px minmax(0, 1fr); }
    .manual img { width: 52px; height: 52px; }
    .manual .acts { grid-column: 1 / -1; justify-content: flex-start; }
    .dtable th, .dtable td { padding: 12px 10px; }
    .toast-cj { right: 16px; left: 16px; bottom: 92px; max-width: none; }
    .login-page { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .chat-fab { right: 16px; bottom: 16px; }
    .chat-panel { right: 12px; bottom: 84px; }
}
@media (max-width: 520px) {
    .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat { padding: 14px; }
    .stat strong, .stat .value { font-size: 22px; }
}
