:root {
  --ink: #493746;
  --ink-soft: #695d67;
  --muted: #7d7279;
  --paper: #fffdfa;
  --cream: #faf7f2;
  --rose: #b66f83;
  --rose-dark: #98586c;
  --rose-pale: #f0dadd;
  --sage: #aeb49e;
  --lavender: #d8cedd;
  --line: #e4ddd8;
  --shadow: 0 12px 34px rgba(69, 49, 60, .08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); color: var(--ink); font-family: var(--sans); }
body { margin: 0; min-height: 100vh; background: var(--cream); }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--rose-dark); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 9px; color: var(--rose-dark); font-size: .69rem; font-weight: 750; letter-spacing: .31em; text-transform: uppercase; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-weight: 700; cursor: pointer; }
.primary-button { background: linear-gradient(135deg, #bd798d, #aa657a); color: #fff; box-shadow: 0 10px 24px rgba(167, 93, 116, .22); }
.primary-button:hover { background: linear-gradient(135deg, #aa657a, #95546a); }
.secondary-button { border-color: var(--line); background: var(--paper); color: var(--ink); }

/* Vstopna stran */
.welcome-page { overflow: hidden; background: #f9f5ef; }
.welcome { --pointer-x: 0px; --pointer-y: 0px; position: relative; display: grid; min-height: 100svh; place-items: center; isolation: isolate; padding: 42px 24px; background: url('/assets/welcome-still-life.png') center / cover no-repeat; }
.welcome::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at center, rgba(255, 253, 248, .18), transparent 62%); transform: translate(var(--pointer-x), var(--pointer-y)) scale(1.025); transition: transform .7s ease-out; pointer-events: none; }
.welcome-content { width: min(680px, 56vw); margin-top: -1vh; text-align: center; animation: welcome-in 1s both cubic-bezier(.2, .8, .2, 1); }
.welcome-heart { height: 58px; color: var(--rose); font: 300 3.5rem/1 var(--serif); transform: rotate(-10deg); }
.welcome-kicker { margin: 0 0 24px; color: var(--ink); font-size: clamp(.68rem, 1.15vw, .92rem); font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.welcome h1 { margin: 0 0 20px; color: #4d3947; font: 400 clamp(5.1rem, 8.5vw, 8.7rem)/.78 var(--serif); letter-spacing: -.065em; }
.welcome h1 span { display: block; }
.welcome-lead { margin: 0 auto 30px; color: #6b5a65; font: 400 clamp(1rem, 1.55vw, 1.35rem)/1.45 var(--serif); }
.welcome-action { min-width: min(100%, 380px); min-height: 58px; padding-inline: 30px; border-radius: 999px; font-size: 1.03rem; }
.microsoft-mark { display: grid; grid-template-columns: repeat(2, 10px); gap: 2px; }
.microsoft-mark i { width: 10px; height: 10px; background: #f35325; }
.microsoft-mark i:nth-child(2) { background: #81bc06; }
.microsoft-mark i:nth-child(3) { background: #05a6f0; }
.microsoft-mark i:nth-child(4) { background: #ffba08; }
.privacy-note { margin: 19px 0 0; color: #847981; font-size: .79rem; }
.lock-mark { position: relative; display: inline-block; width: 9px; height: 8px; margin-right: 5px; border: 1.5px solid currentColor; border-radius: 2px; vertical-align: -1px; }
.lock-mark::before { content: ""; position: absolute; width: 5px; height: 5px; top: -6px; left: 1px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.welcome-signature { display: grid; grid-template-columns: 74px 30px 74px; align-items: center; justify-content: center; gap: 7px; margin-top: 39px; color: #a39792; }
.welcome-signature > span { height: 1px; background: #cabdb5; }
.welcome-signature b { font: 400 1.65rem/1 var(--serif); }
.welcome-signature small { grid-column: 1 / -1; font-size: .56rem; line-height: 1.8; letter-spacing: .34em; text-transform: uppercase; }
.welcome-orbit { position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.welcome-orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: rgba(190, 119, 140, .48); animation: float-dot 7s ease-in-out infinite alternate; }
.welcome-orbit i:nth-child(1) { top: 33%; left: 24%; }
.welcome-orbit i:nth-child(2) { top: 14%; right: 21%; background: rgba(156, 167, 137, .48); animation-delay: -2s; }
.welcome-orbit i:nth-child(3) { bottom: 18%; left: 24%; background: rgba(174, 153, 183, .44); animation-delay: -4s; }
.welcome-orbit i:nth-child(4) { right: 14%; bottom: 25%; background: rgba(156, 167, 137, .45); animation-delay: -5s; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes float-dot { to { transform: translateY(-9px) rotate(12deg); } }

/* Zasebna galerija */
.site-header { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: minmax(230px, auto) 1fr auto; align-items: stretch; min-height: 72px; padding: 0 clamp(22px, 5.8vw, 92px); border-bottom: 1px solid rgba(224, 215, 210, .78); background: rgba(255, 253, 250, .91); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #453342; font: 400 1.78rem/1 var(--serif); text-decoration: none; }
.brand > span { color: #b78991; font-size: 1.35rem; }
.main-navigation { display: flex; align-items: stretch; gap: 30px; }
.main-navigation a { position: relative; display: grid; place-items: center; padding: 0 8px; color: var(--ink-soft); font: 1rem var(--serif); text-decoration: none; }
.main-navigation a.is-active { color: var(--rose-dark); }
.main-navigation a.is-active::after { content: ""; position: absolute; right: 8px; bottom: 0; left: 8px; height: 2px; background: var(--rose); }
.user-navigation { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font: .92rem var(--serif); }
.user-navigation a { text-decoration: none; }
.user-navigation i { width: 1px; height: 24px; background: var(--line); }
.user-avatar { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--rose-pale); color: var(--rose-dark); font: 700 .79rem var(--sans); }
.gallery-shell { width: min(1400px, calc(100% - clamp(30px, 11.8vw, 188px))); margin: 0 auto; padding: 42px 0 60px; }
.gallery-heading, .album-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.gallery-heading h1, .album-heading h1 { margin: 0; color: #493646; font: 400 clamp(2.8rem, 4.8vw, 4.55rem)/.95 var(--serif); letter-spacing: -.045em; }
.gallery-heading p:last-child, .album-heading div > p:last-child { margin: 9px 0 0; color: var(--ink-soft); font: 1.08rem/1.55 var(--serif); }
.gallery-motto { display: grid; justify-items: end; gap: 17px; padding-right: 16px; color: #a88a86; text-align: right; }
.gallery-motto strong { font: italic 400 clamp(1.2rem, 2vw, 1.8rem)/1.12 var(--serif); }
.gallery-motto small { font-size: .59rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.gallery-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; margin: 24px 0 22px; }
.gallery-filters { display: grid; grid-template-columns: minmax(260px, 3fr) minmax(150px, 1fr) minmax(150px, 1fr) auto; gap: 14px; margin: 0; }
.gallery-filters input, .gallery-filters select, .album-form input, .album-form select, .album-form textarea, .photo-editor input, .form-panel input[type=file] { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 253, 250, .94); padding: 10px 15px; color: var(--ink); }
.gallery-filters input, .gallery-filters select { font: .94rem var(--serif); }
.search-field { position: relative; }
.search-field input { padding-left: 48px; }
.search-icon { position: absolute; z-index: 1; top: 50%; left: 18px; color: var(--ink-soft); font: 1.7rem/1 var(--serif); transform: translateY(-55%) rotate(-20deg); }
.filter-submit { min-width: 94px; }
.new-album-button { min-width: 168px; font: 1rem var(--serif); }
.new-album-button span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #fff; color: var(--rose-dark); font: 700 1rem/1 var(--sans); }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.album-card, .photo-card, .form-panel, .empty-state { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 253, 250, .95); box-shadow: var(--shadow); }
.album-card { transition: transform .24s ease, box-shadow .24s ease; }
.album-card:hover { transform: translateY(-3px); box-shadow: 0 17px 38px rgba(69, 49, 60, .12); }
.album-card > a, .album-placeholder { display: block; aspect-ratio: 2.18 / 1; background: linear-gradient(145deg, var(--rose-pale), var(--lavender)); }
.album-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-placeholder { display: grid; place-items: center; color: rgba(255, 255, 255, .88); font: 3rem var(--serif); }
.album-card > div:last-child { padding: 11px 16px 15px; }
.album-card .eyebrow { margin: 0; color: #7e7078; font: .77rem var(--serif); letter-spacing: 0; text-transform: none; }
.album-card h2 { margin: 3px 0 5px; font: 400 1.35rem/1.08 var(--serif); }
.album-card h2 a { text-decoration: none; }
.album-card p:not(.eyebrow) { margin: 0; color: var(--muted); font: .82rem/1.45 var(--serif); }
.album-card small { float: right; margin-top: -44px; color: var(--muted); font: .73rem var(--serif); }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.photo-card > a { display: block; aspect-ratio: 1 / 1; background: #f1ecee; }
.photo-card > a img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-copy { padding: 15px; }
.photo-copy > p { margin: 4px 0 12px; }
.photo-copy details { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.photo-copy summary, .form-panel summary { cursor: pointer; font-weight: 700; }
.photo-copy dl { margin: 10px 0 0; }
.photo-copy dl div { display: grid; grid-template-columns: 78px 1fr; gap: 8px; padding: 5px 0; }
.photo-copy dt { color: var(--muted); }
.photo-copy dd { margin: 0; overflow-wrap: anywhere; }
.milestone-badge { display: inline-block; border-radius: 99px; background: var(--rose-pale); color: var(--rose-dark); padding: 5px 9px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.form-panel { margin: 28px 0; padding: 24px; }
.form-panel > summary { font-size: 1.1rem; }
.form-panel form { margin-top: 18px; }
.form-panel label, .album-form label, .photo-editor label { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.form-panel small { font-weight: 500; }
.album-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.album-form .wide { grid-column: 1 / -1; }
.check-row { display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; }
.check-row input { width: auto !important; min-height: 0 !important; }
.notice { margin: 0 0 18px; padding: 13px 16px; border-radius: 7px; }
.notice.success { background: #e4eee7; }
.notice.error { background: #f8dede; color: #742e3c; }
.empty-state { padding: 55px 24px; text-align: center; }
.empty-state > div { color: var(--rose); font-size: 3rem; }
.empty-state h2 { font: 400 2rem var(--serif); }
.empty-state p { color: var(--muted); }
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; padding: 0 max(20px, 6vw) 35px; color: #aa7c88; font-size: .58rem; font-weight: 700; letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.site-footer > span { justify-self: end; }
.site-footer small { justify-self: end; color: #9f9297; font-size: .54rem; }

/* Administracija in zasebna analitika */
.admin-shell { width: min(1380px, calc(100% - clamp(30px, 8vw, 120px))); margin: 0 auto; padding: 42px 0 72px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.admin-heading h1 { margin: 0; font: 400 clamp(2.8rem, 4.8vw, 4.4rem)/.95 var(--serif); letter-spacing: -.045em; }
.admin-heading p:last-child { margin: 10px 0 0; color: var(--muted); font: 1.03rem/1.5 var(--serif); }
.period-switcher { display: flex; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.period-switcher a { padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.period-switcher a:last-child { border-right: 0; }
.period-switcher a.is-active { background: var(--rose-dark); color: #fff; }
.admin-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-kpis article { display: grid; gap: 7px; min-height: 142px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 253, 250, .95); box-shadow: 0 8px 26px rgba(69, 49, 60, .045); }
.admin-kpis span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-kpis strong { font: 400 2.7rem/1 var(--serif); }
.admin-kpis small { color: var(--muted); font-size: .73rem; line-height: 1.4; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-panel { min-width: 0; margin-bottom: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 253, 250, .95); box-shadow: var(--shadow); }
.admin-panel-wide { grid-column: 1 / -1; }
.admin-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-panel h2 { margin: 0; font: 400 1.55rem/1.2 var(--serif); }
.admin-panel header a { color: var(--rose-dark); font-size: .8rem; font-weight: 700; }
.analytics-bars { display: grid; gap: 13px; }
.analytics-bar-row { display: grid; grid-template-columns: minmax(105px, 180px) minmax(100px, 1fr) 52px; align-items: center; gap: 12px; font-size: .79rem; }
.analytics-bar-row > span { overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.analytics-bar-row svg { width: 100%; height: 12px; overflow: visible; }
.analytics-bar-track { fill: #f0eae7; }
.analytics-bar-fill { fill: var(--rose); }
.analytics-bar-row strong { text-align: right; }
.audit-list, .member-usage-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.audit-list li, .member-usage-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-list li:first-child, .member-usage-list li:first-child { border-top: 0; }
.audit-list p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.audit-list time, .member-usage-list small { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.member-usage-list span { display: grid; gap: 4px; }
.member-usage-list b { color: var(--rose-dark); font-size: .77rem; white-space: nowrap; }
.privacy-panel { display: flex; align-items: baseline; gap: 18px; margin-top: 2px; padding: 18px 22px; border: 1px solid #dedfd2; border-radius: 9px; background: #f3f4ed; color: #626656; }
.privacy-panel strong { flex: 0 0 auto; font: 400 1.05rem var(--serif); }
.privacy-panel p { margin: 0; font-size: .77rem; line-height: 1.55; }
.admin-empty { padding: 28px 0; color: var(--muted); text-align: center; }
.admin-empty p { margin: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table-wrap table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.admin-table-wrap th { padding: 10px 12px; border-bottom: 2px solid var(--line); color: var(--muted); font-size: .65rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.admin-table-wrap td { max-width: 320px; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table-wrap tbody tr:hover { background: #fcf7f6; }
.admin-table-wrap details summary { color: var(--rose-dark); cursor: pointer; font-weight: 700; }
.audit-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.audit-filters label { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.audit-filters select { width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.audit-filters > a { align-self: center; color: var(--rose-dark); font-size: .78rem; font-weight: 700; }
.audit-metadata { margin: 8px 0 0; }
.audit-metadata div { display: grid; grid-template-columns: 80px 1fr; gap: 6px; padding: 3px 0; }
.audit-metadata dt { color: var(--muted); }
.audit-metadata dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  .site-header { grid-template-columns: auto 1fr auto; padding-inline: 24px; }
  .gallery-shell { width: min(100% - 40px, 1100px); }
  .gallery-toolbar { grid-template-columns: 1fr; }
  .new-album-button { justify-self: end; }
  .gallery-filters { grid-template-columns: minmax(220px, 2fr) 1fr 1fr auto; }
  .admin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .welcome { align-items: start; padding-top: max(13vh, 74px); background-position: 47% center; }
  .welcome::after { content: ""; position: absolute; z-index: -1; inset: 0; background: rgba(255, 252, 247, .56); backdrop-filter: blur(2px); }
  .welcome-content { width: min(580px, 92vw); }
  .welcome h1 { font-size: clamp(4.6rem, 17vw, 7.2rem); }
  .welcome-signature { margin-top: 28px; }
  .site-header { grid-template-columns: 1fr auto; min-height: 64px; }
  .main-navigation { display: none; }
  .user-navigation > span:not(.user-avatar) { display: none; }
  .gallery-heading, .album-heading { align-items: flex-start; flex-direction: column; }
  .gallery-motto { display: none; }
  .gallery-filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-submit { justify-self: stretch; }
  .album-grid, .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-form { grid-template-columns: 1fr 1fr; }
  .album-form label:first-of-type { grid-column: 1 / -1; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > span, .site-footer small { justify-self: center; }
  .admin-shell { width: min(100% - 32px, 900px); padding-top: 32px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .admin-panel-wide { grid-column: auto; }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy-panel { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (max-width: 560px) {
  .brand { font-size: 1.35rem; }
  .site-header { padding-inline: 15px; }
  .gallery-shell { width: min(100% - 24px, 1240px); padding-top: 30px; }
  .gallery-heading h1, .album-heading h1 { font-size: clamp(2.6rem, 13vw, 3.5rem); }
  .album-grid, .photo-grid, .gallery-filters, .album-form { grid-template-columns: 1fr; }
  .album-form label, .search-field { grid-column: auto !important; }
  .new-album-button { width: 100%; }
  .album-card > a, .album-placeholder { aspect-ratio: 1.72 / 1; }
  .site-footer { line-height: 1.8; }
  .welcome { padding-inline: 16px; background-position: 43% center; }
  .welcome-heart { height: 46px; }
  .welcome-kicker { margin-bottom: 18px; letter-spacing: .2em; }
  .welcome h1 { font-size: clamp(4.35rem, 22vw, 6rem); }
  .welcome-lead br { display: none; }
  .welcome-action { font-size: .92rem; }
  .privacy-note { font-size: .72rem; }
  .admin-site-header .user-navigation { gap: 9px; }
  .admin-heading h1 { font-size: clamp(2.6rem, 13vw, 3.5rem); }
  .period-switcher { display: grid; width: 100%; grid-template-columns: repeat(4, 1fr); }
  .period-switcher a { padding-inline: 6px; text-align: center; }
  .admin-kpis { grid-template-columns: 1fr; }
  .admin-kpis article { min-height: 116px; }
  .analytics-bar-row { grid-template-columns: minmax(82px, 120px) minmax(74px, 1fr) 42px; gap: 8px; }
  .admin-panel { padding: 18px; }
  .audit-filters { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .welcome::before { transform: none; }
}
