[hidden] { display: none !important; }
:root {
    --bg: #0b0c0f;
    --panel: #15171c;
    --line: #262a32;
    --text: #eceef2;
    --muted: #8b919c;
    --accent: #1f6bff;
    --accent-ink: #fff;
    --sel: #3d8bff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body.pmj { font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body.pmj-noscroll { overflow: hidden; }
a { color: inherit; }

.pmj-top { display: flex; align-items: baseline; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.pmj-logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
.pmj-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.pmj-logo-mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 90, 255, .35); flex: none; }
.pmj-logo-accent { background: linear-gradient(135deg, #2f6bff, #00b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pmj-tagline { color: var(--muted); font-size: 13px; }

.pmj-wrap { max-width: 1600px; margin: 0 auto; padding: 24px; }
.pmj-hero { padding: 24px 0 28px; }
.pmj-hero h1 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -.03em; margin: 0 0 6px; }
.pmj-hero p { color: var(--muted); margin: 0; }
.pmj-empty { color: var(--muted); padding: 40px 0; text-align: center; }

.pmj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.pmj-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; transition: transform .15s, border-color .15s; }
.pmj-card:hover { transform: translateY(-2px); border-color: #3a404b; }
.pmj-card-img { display: block; aspect-ratio: 3 / 2; background: #1c1f26; }
.pmj-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmj-card-body { display: block; padding: 12px 14px 14px; }
.pmj-card-title { display: block; font-weight: 700; font-size: 16px; }
.pmj-card-meta { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.pmj-ghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 8px 0 18px; }
.pmj-ghead h1 { margin: 0; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.03em; line-height: 1.15; }
.pmj-gmeta { margin: 4px 0 0; color: var(--muted); }

.pmj-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pmj-btn:hover { filter: brightness(1.1); }
.pmj-btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.pmj-btn-ghost:hover { border-color: #4a515e; filter: none; }
.pmj-link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }

.pmj-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; margin: 0 0 6px; }
.pmj-team { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; flex-basis: 100%; margin: 6px 0 0; }
.pmj-chip { flex: none; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pmj-chip small { color: var(--muted); margin-left: 4px; }
.pmj-chip:hover { border-color: #4a515e; }
.pmj-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pmj-chip.is-on small { color: rgba(255, 255, 255, .8); }

.pmj-toolbar { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin: 6px 0 10px; }

.pmj-grid { width: 100%; }
.pmj-row { display: flex; gap: 6px; margin-bottom: 6px; }
.pmj-item { position: relative; flex: none; height: 100%; overflow: hidden; border-radius: 4px; background: #1c1f26; cursor: zoom-in; }
.pmj-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pmj-item:hover img { transform: scale(1.02); }
.pmj-check { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); cursor: pointer; opacity: 0; transition: opacity .15s; padding: 0; }
.pmj-item:hover .pmj-check, .pmj-item.is-sel .pmj-check { opacity: 1; }
.pmj-item.is-sel { outline: 3px solid var(--sel); outline-offset: -3px; }
.pmj-item.is-sel .pmj-check { background: var(--sel); border-color: var(--sel); }
.pmj-item.is-sel .pmj-check::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 700; line-height: 22px; }
@media (hover: none) { .pmj-check { opacity: 1; } }

.pmj-selbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 24px); }
.pmj-selbar form { margin: 0; }

.pmj-lb { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 8, .97); display: flex; flex-direction: column; }
.pmj-lb[hidden] { display: none; }
.pmj-lb-fig { flex: 1; margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 50px 60px 10px; }
.pmj-lb-fig img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.pmj-lb-close, .pmj-lb-prev, .pmj-lb-next { position: absolute; background: rgba(255, 255, 255, .08); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; }
.pmj-lb-close { top: 10px; right: 12px; }
.pmj-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.pmj-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.pmj-lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 20px 18px; }
.pmj-lb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pmj-lb-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pmj-lb-sel { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; cursor: pointer; }

.pmj-gate { max-width: 460px; text-align: center; padding-top: 80px; }
.pmj-pw { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.pmj-pw input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 9px 16px; font: inherit; }
.pmj-pw button { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.pmj-err { color: #ff6b6b; }

.pmj-foot { color: var(--muted); font-size: 12px; text-align: center; padding: 40px 16px 90px; border-top: 1px solid var(--line); margin-top: 40px; }

@media (max-width: 600px) {
    .pmj-top { padding: 12px 16px; }
    .pmj-tagline { display: none; }
    .pmj-wrap { padding: 16px; }
    .pmj-row { gap: 4px; margin-bottom: 4px; }
    .pmj-lb-fig { padding: 56px 0 6px; }
    .pmj-lb-prev, .pmj-lb-next { display: none; }
    .pmj-lb-bar { padding: 10px 14px 16px; }
    .pmj-selbar { gap: 10px; padding-left: 14px; font-size: 13px; }
}

/* Navigacija */
.pmj-top { flex-wrap: wrap; }
.pmj-nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.pmj-nav a { color: var(--muted); text-decoration: none; }
.pmj-nav a:hover { color: var(--text); }

/* Moj prostor */
.pmj-block { margin: 10px 0 36px; }
.pmj-block h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 14px; }
.pmj-newfolder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 18px; }
.pmj-newfolder input, .pmj-login input[type=text], .pmj-login input[type=password] { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; }
.pmj-newfolder input[type=text] { flex: 1 1 260px; min-width: 0; }
.pmj-newfolder input[type=date] { color-scheme: dark; }
.pmj-newfolder-msg { color: var(--muted); font-size: 13px; }
.pmj-login { text-align: left; max-width: 340px; margin: 20px auto 0; }
.pmj-login p { margin: 0 0 12px; }
.pmj-login label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.pmj-login input[type=text], .pmj-login input[type=password] { width: 100%; }
.pmj-login .login-remember label { display: flex; gap: 6px; align-items: center; }
.pmj-login input[type=submit] { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer; width: 100%; }

/* Ubacivanje */
.pmj-upload { margin: 0 0 14px; }
.pmj-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; padding: 26px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.pmj-drop:hover, .pmj-drop.is-over { border-color: var(--accent); background: rgba(61, 139, 255, .06); }
.pmj-drop strong { font-size: 20px; }
.pmj-drop { border-color: var(--accent); background: rgba(31, 107, 255, .08); padding: 34px 16px; }
@media (max-width: 640px) { .pmj-drop { padding: 44px 16px; } .pmj-drop strong { font-size: 22px; } }
.pmj-drop span { color: var(--muted); font-size: 13px; }
.pmj-upq { margin-top: 12px; }
.pmj-upq .pmj-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.pmj-upq .pmj-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.pmj-upmsg { color: var(--muted); font-size: 13px; margin-top: 6px; }
.pmj-lb-del { color: #ff6b6b; }
@media (max-width: 600px) { .pmj-nav { width: 100%; margin-left: 0; } }

/* Tražilica */
.pmj-search { flex: 1 1 260px; max-width: 420px; margin: 0 12px; }
.pmj-search input { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; }
.pmj-search input:focus { outline: none; border-color: var(--accent); }
.pmj-search-big { display: flex; gap: 8px; max-width: 560px; margin: 0 0 22px; flex: none; }
.pmj-search-big input { font-size: 16px; padding: 11px 18px; }
.pmj-btn-danger { background: #d9363e; border-color: #d9363e; }
.pmj-lb-gal { font-size: 14px; }
@media (max-width: 600px) { .pmj-search { order: 3; flex-basis: 100%; max-width: none; margin: 10px 0 0; } }

/* Uređivanje oznaka u pregledu fotke */
.pmj-chipwrap { display: inline-flex; align-items: center; }
.pmj-chipwrap .pmj-chip { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pmj-untag { background: var(--panel); color: #ff6b6b; border: 1px solid var(--line); border-left: 0; border-radius: 0 999px 999px 0; padding: 6px 10px 6px 8px; font: inherit; font-size: 14px; line-height: 1; cursor: pointer; }
.pmj-untag:hover { background: #3a1d1d; }
.pmj-addtag { background: transparent; border: 1px dashed var(--line); color: var(--text); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; width: 150px; }
.pmj-addtag:focus { outline: none; border-color: var(--accent); }
.pmj-tagerr { color: #ff8a8a; font-size: 13px; align-self: center; }

/* Izrezivanje */
.pmj-lb.is-crop .pmj-lb-bar, .pmj-lb.is-crop .pmj-lb-prev, .pmj-lb.is-crop .pmj-lb-next, .pmj-lb.is-crop .pmj-lb-close { visibility: hidden; }
.pmj-crop { position: fixed; z-index: 3; overflow: hidden; touch-action: none; user-select: none; }
.pmj-crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .6); outline: 2px solid #fff; cursor: move; touch-action: none;
    background-image: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35));
    background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%; background-position: 0 33.33%, 0 66.66%, 33.33% 0, 66.66% 0; background-repeat: no-repeat; }
.pmj-crop-box i { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; touch-action: none; }
.pmj-crop-box i[data-h="nw"] { left: -5px; top: -5px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.pmj-crop-box i[data-h="ne"] { right: -5px; top: -5px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.pmj-crop-box i[data-h="sw"] { left: -5px; bottom: -5px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.pmj-crop-box i[data-h="se"] { right: -5px; bottom: -5px; border-left: 0; border-top: 0; cursor: nwse-resize; }
.pmj-crop-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 12px 14px 18px; background: rgba(5, 6, 8, .92); }
.pmj-crop-sp { flex: 0 0 16px; }
@media (max-width: 640px) { .pmj-crop-box i { width: 32px; height: 32px; } .pmj-crop-sp { flex-basis: 100%; height: 0; } }
