:root { color-scheme: dark; font-family: Segoe UI, Arial, sans-serif; background: #07121d; color: #eef7ff; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 10%, #16445a 0, transparent 38%), linear-gradient(135deg, #07121d, #0c2635); }
.shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card { width: min(100%, 520px); padding: 42px; border: 1px solid #2e6778; border-radius: 22px; background: rgba(7, 20, 31, .91); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.card.wide { width: 100%; max-width: none; min-height: calc(100vh - 48px); padding: 32px 42px; }
.card.settings { width: min(100%, 900px); padding: 32px 42px; }
.brand { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; color: #f7c85a; }
.brand img { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; }
.brand span { display: block; font-size: 24px; font-weight: 800; letter-spacing: .14em; }
.brand small { color: #9ac4d0; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0 0 12px; font-size: 30px; }
.lead, .muted { color: #a9c1cc; line-height: 1.55; }
form { display: grid; gap: 16px; margin: 26px 0 18px; }
label { display: grid; gap: 7px; color: #c8e0e8; font-size: 14px; }
input { width: 100%; padding: 13px 14px; border: 1px solid #376d7d; border-radius: 10px; background: #0a1b28; color: #fff; font-size: 16px; }
select { width: 100%; padding: 13px 14px; border: 1px solid #376d7d; border-radius: 10px; background: #0a1b28; color: #fff; font-size: 16px; }
input:focus { outline: 2px solid #f7c85a; outline-offset: 2px; }
input[type="checkbox"] { width: auto; accent-color: #14877d; }
button, .button { display: inline-block; width: 100%; padding: 13px 16px; border: 0; border-radius: 10px; background: #f7c85a; color: #15202a; font-weight: 800; font-size: 16px; text-align: center; text-decoration: none; cursor: pointer; }
.secondary { background: #234354; color: #eef7ff; }
a { color: #f7c85a; }
.card nav { margin: -8px 0 24px; color: #a9c1cc; }
.card nav a { margin-right: 8px; }
.card h2 { margin-top: 28px; font-size: 19px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
.profile-table { max-width: 760px; }
.profile-table th { width: 34%; color: #a9c1cc; font-weight: 600; }
.readonly-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0 30px; }
.readonly-grid input[readonly] { background: #172b3d; color: #c8e0e8; cursor: default; }
th, td { padding: 10px 6px; border-bottom: 1px solid #2e6778; text-align: left; }
.inline { display: inline; margin: 0; }
button.small { width: auto; padding: 7px 9px; font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.success { padding: 10px 12px; border-radius: 8px; background: #235d50; color: #d6fff2; }
.success-hidden { opacity: 0; max-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; transition: opacity .35s ease, max-height .35s ease, padding .35s ease, margin .35s ease; }
.notice { padding: 10px 12px; border-radius: 8px; background: #6a3030; color: #ffd8d8; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 28px; }
.stats div { flex: 1 1 180px; padding: 18px; border: 1px solid #2e6778; border-radius: 12px; }
.stats strong, .stats small { display: block; }
.stats strong { font-size: 28px; color: #f7c85a; }
.stats small { margin-top: 4px; color: #a9c1cc; }
.card nav { margin: -8px 0 24px; color: #a9c1cc; }
.card nav a { margin-right: 8px; }
.card h2 { margin-top: 28px; font-size: 19px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
th, td { padding: 10px 6px; border-bottom: 1px solid #2e6778; text-align: left; vertical-align: middle; }
.inline { display: inline-flex; gap: 8px; margin: 0 4px 4px 0; align-items: center; }
.inline input { width: 150px; padding: 8px; font-size: 13px; }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.suggestion-actions .inline { margin: 0; }
.suggestion-actions button { white-space: nowrap; }
.confirm { background: #237a55; color: #fff; }
.table-input { width: 100%; min-width: 130px; padding: 8px 10px; font-size: 14px; }
#users-edit-form { display: none; }
button.small { width: auto; padding: 7px 9px; font-size: 12px; }
.danger { background: #783f43; color: #fff; }
.tabs { display: flex; gap: 4px; margin: 20px 0 18px; border-bottom: 1px solid #2e6778; }
.tabs a { padding: 12px 20px; border: 1px solid transparent; border-radius: 10px 10px 0 0; text-decoration: none; color: #c8e0e8; }
.tabs a.active { color: #15202a; background: #f7c85a; font-weight: 800; }
.admin-actions { display: flex; justify-content: flex-start; margin: 22px 0 14px; }
.admin-actions button { width: auto; padding: 11px 22px; }
.sync-form { display: block; margin: 22px 0 18px; }
.sync-form button.small { width: auto; padding: 8px 14px; font-size: 14px; }
.metadata-progress { max-width: 760px; margin: 24px 0; padding: 20px; border: 1px solid #2e6778; border-radius: 12px; background: rgba(10,27,40,.72); }
.metadata-progress strong, .metadata-progress span { display: block; }
.metadata-progress span { margin-top: 8px; color: #a9c1cc; }
.progress-bar { height: 12px; margin-top: 18px; overflow: hidden; border-radius: 8px; background: #172b3d; }
.progress-bar i { display: block; height: 100%; border-radius: 8px; background: #f7c85a; transition: width .3s ease; }
.metadata-fix-current { max-width: 820px; margin: 22px 0; padding: 16px 18px; border: 1px solid #2e6778; border-radius: 12px; background: rgba(10,27,40,.72); }
.metadata-fix-current span { display: inline-block; margin-top: 7px; color: #a9c1cc; }
.metadata-fix-search { display: grid; grid-template-columns: minmax(250px, 1fr) 150px auto; gap: 12px; max-width: 820px; align-items: end; }
.metadata-fix-search label { margin: 0; }
.metadata-fix-search button { width: auto; margin: 0; white-space: nowrap; }
.metadata-fix-results { display: grid; gap: 10px; max-width: 820px; }
.metadata-fix-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 14px 16px; border: 1px solid #2e6778; border-radius: 10px; background: rgba(10,27,40,.72); }
.metadata-fix-result div { min-width: 0; }
.metadata-fix-result strong { color: #f7c85a; }
.metadata-fix-result span, .metadata-fix-result small { color: #a9c1cc; }
.metadata-fix-result small { display: block; margin-top: 4px; }
.metadata-fix-result button { width: auto; margin: 0; white-space: nowrap; }
.metadata-modal[hidden] { display: none; }
.metadata-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; }
.metadata-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(2px); }
.metadata-modal-panel { position: relative; z-index: 1; width: min(900px, 100%); max-height: min(88vh, 900px); overflow-y: auto; padding: 28px; border: 1px solid #4c8190; border-radius: 16px; background: #0b202d; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.metadata-modal-panel h2 { margin-top: 0; padding-right: 42px; }
.metadata-modal-close { position: absolute; top: 15px; right: 15px; width: 38px; padding: 4px; background: #234354; color: #fff; font-size: 24px; line-height: 1; }
.metadata-modal .metadata-fix-current, .metadata-modal .metadata-fix-search, .metadata-modal .metadata-fix-results { max-width: none; }
.film-detail .metadata-fix-open { width: auto; border: 0; font: inherit; cursor: pointer; }
.new-user { margin: 24px 0; border: 1px solid #2e6778; border-radius: 12px; padding: 0 18px 18px; }
.new-user summary { cursor: pointer; display: inline-block; margin: 0 -18px; padding: 12px 18px; color: #15202a; background: #f7c85a; border-radius: 11px; font-weight: 800; list-style: none; }
.new-user[open] summary { margin-bottom: 18px; border-radius: 11px 11px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 16px; }
@media (max-width: 850px) { .card.wide { padding: 24px 16px; } .form-grid { grid-template-columns: 1fr 1fr; } table { display: block; overflow-x: auto; white-space: nowrap; } }
.modal { display: none; position: fixed; inset: 0; z-index: 10; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, .66); }
.modal.open { display: flex; }
.modal-box { position: relative; width: min(100%, 680px); max-height: 92vh; overflow-y: auto; padding: 34px; border: 1px solid #4c8190; border-radius: 16px; background: #0b202d; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; padding: 5px; background: #234354; color: #fff; font-size: 24px; }
.modal-kicker { color: #f7c85a; font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.modal-box h2 { margin-top: 8px; font-size: 30px; }
@media (max-width: 520px) { .card { padding: 28px 22px; } }

.suggestions-table { width: 100%; table-layout: fixed; font-size: 13px; }
.suggestions-table th, .suggestions-table td { overflow-wrap: anywhere; word-break: break-word; vertical-align: top; }
.suggestions-table th:nth-child(1) { width: 17%; }
.suggestions-table th:nth-child(2) { width: 6%; }
.suggestions-table th:nth-child(3) { width: 8%; }
.suggestions-table th:nth-child(4) { width: 3%; }
.suggestions-table th:nth-child(5) { width: 4%; }
.suggestions-table th:nth-child(6) { width: 36%; }
.suggestions-table th:nth-child(7) { width: 9%; }
.suggestions-table th:nth-child(8) { width: 4%; }
.suggestions-table th:nth-child(9) { width: 5%; }
.suggestions-table th:nth-child(10) { width: 8%; }
.suggestions-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; }
.card .suggestions-heading h2 { margin: 0; }
form.suggestion-filter { display: flex; align-items: center; margin: 0; }
form.suggestion-filter label { display: flex; align-items: center; gap: 9px; margin: 0; white-space: nowrap; }
form.suggestion-filter select { flex: 0 0 190px; width: 190px; padding: 7px 10px; font-size: 14px; }
.status { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-waiting { background: #6a5421; color: #fff1be; }
.status-saved { background: #235d50; color: #d6fff2; }
.status-rejected { background: #783f43; color: #ffd8d8; }
.status-unknown { background: #234354; color: #eef7ff; }

.stats-section { margin-top: 26px; }
.stats-section h2 { margin: 0; font-size: 19px; }

.source-check-form { max-width: 520px; }
.source-check-form button.small { width: auto; padding: 8px 14px; font-size: 14px; }

.film-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 12px; border: 1px solid #2e6778; border-radius: 12px; background: rgba(9, 29, 42, .72); }
.film-toolbar a, .film-search button { width: auto; margin: 0; padding: 9px 12px; border: 1px solid #397489; border-radius: 8px; background: #173849; color: #dceff5; font-size: 13px; font-weight: 700; text-decoration: none; }
.film-toolbar a:hover, .film-toolbar a.active { background: #f7c85a; color: #15202a; }
.film-search { display: flex; flex: 1 1 230px; gap: 7px; margin: 0; }
.film-search input { min-width: 130px; margin: 0; padding: 8px 10px; }
.film-search button { background: #2385a5; color: #fff; border: 0; }
.film-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 18px 0; }
.film-groups a { padding: 13px 14px; border: 1px solid #2e6778; border-radius: 10px; background: rgba(12, 38, 54, .8); color: #e5f3f7; text-decoration: none; }
.film-groups a:hover { border-color: #f7c85a; }
.film-groups strong, .film-groups small { display: block; }
.film-groups small { margin-top: 4px; color: #a9c1cc; }
.film-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.45fr) minmax(190px, .48fr); gap: 20px; align-items: start; }
.film-sidebar { display: grid; gap: 20px; }
.film-list { overflow: hidden; border: 1px solid #2e6778; border-radius: 12px; background: rgba(7, 28, 41, .68); }
.film-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(46, 103, 120, .72); color: #e4f2f7; text-decoration: none; }
.film-row:last-child { border-bottom: 0; }
.film-row:hover, .film-row.active { background: #237d9a; color: #fff; }
.film-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-title b { color: #f7c85a; }
.film-title small, .source-count { color: #a9c1cc; }
.film-row:hover .source-count, .film-row.active .source-count { color: #ddf6ff; }
.source-count { flex: 0 0 auto; font-size: 12px; white-space: nowrap; }
.film-detail { padding: 20px; border: 1px solid #2e6778; border-radius: 12px; background: rgba(8, 28, 42, .88); }
.card .film-detail h2 { margin: 0 0 16px; font-size: 23px; }
.film-detail p { margin: 11px 0; }
.film-detail p span { display: block; margin-bottom: 2px; color: #a9c1cc; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tmdb-link { display: inline-block; padding: 9px 12px; border-radius: 8px; background: #2385a5; color: #fff; font-weight: 700; text-decoration: none; }
.film-overview { padding-top: 14px; border-top: 1px solid rgba(46, 103, 120, .72); color: #dbeaf0; line-height: 1.5; }
.film-poster { min-height: 250px; overflow: hidden; border: 1px solid #2e6778; border-radius: 12px; background: rgba(8, 28, 42, .88); }
.film-poster img { display: block; width: 100%; height: auto; }
.poster-placeholder { display: flex; min-height: 250px; align-items: center; justify-content: center; padding: 20px; color: #a9c1cc; text-align: center; }
.film-sources { overflow: hidden; border: 1px solid #2e6778; border-radius: 12px; background: rgba(8, 28, 42, .88); }
.card .film-sources h2 { margin: 0; padding: 14px 16px; border-bottom: 1px solid #2e6778; font-size: 17px; }
.film-source { padding: 12px 16px; border-bottom: 1px solid rgba(46, 103, 120, .72); }
.film-source:last-child { border-bottom: 0; }
.film-source strong, .film-source span, .film-source small { display: block; }
.film-source strong { color: #f7c85a; font-size: 13px; }
.film-source span { margin-top: 4px; font-size: 12px; }
.film-source .audio { color: #a9eaab; }
.film-source .subtitles { color: #ef9a83; }
.film-source .stereo { color: #83d9ef; }
.film-source small { margin-top: 6px; overflow: hidden; color: #a9c1cc; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.film-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-top: 1px solid #2e6778; }
.film-pagination a { color: #f7c85a; font-weight: 700; text-decoration: none; }
.film-pagination span { color: #a9c1cc; font-size: 13px; }

/* Prihlaseni sjednocene se stavebni dokumentaci. */
body.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: #eef4f2; background-image: linear-gradient(135deg, rgba(247, 248, 250, .52) 0%, rgba(238, 244, 242, .36) 100%), url('login-backgrounds/stavebni-dokumentace.png'); background-position: center; background-repeat: no-repeat; background-size: cover; color: #20252d; }
.login-shell { width: min(420px, 100%); }
.login-panel { padding: 28px; border: 1px solid #d4e0dc; border-radius: 8px; background: rgba(255, 255, 255, .94); box-shadow: 0 24px 70px rgba(32, 37, 45, .24); backdrop-filter: blur(8px); }
.login-brand { color: #0f766e; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.login-panel h1 { margin: 8px 0 10px; color: #20252d; }
.login-panel .muted { color: #66737a; }
.login-form { display: grid; gap: 14px; margin-top: 22px; }
.login-form label { display: grid; gap: 7px; color: #66737a; font-size: 13px; font-weight: 700; }
.login-form input { min-height: 42px; padding: 9px 11px; border: 1px solid #d4e0dc; border-radius: 6px; background: #fff; color: #20252d; font: inherit; }
.login-form input:focus { outline: 2px solid rgba(15, 118, 110, .18); outline-offset: 0; border-color: #0f766e; }
.login-form .password-option { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: #20252d; font-weight: 400; }
.login-form .password-option input { width: auto; min-height: 0; padding: 0; accent-color: #0f766e; }
.login-form .primary-button { width: 100%; border: 1px solid #0f766e; border-radius: 6px; background: #0f766e; color: #fff; }
.login-form .primary-button:hover { background: #0d635d; }
.login-error { margin: 18px 0 0; padding: 10px 12px; border: 1px solid #f1b8b4; border-radius: 6px; background: #fff1f0; color: #9f2d24; font-weight: 700; }
@media (max-width: 980px) { .film-layout { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); } .film-poster { display: none; } }
@media (max-width: 850px) { .film-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .metadata-fix-search { grid-template-columns: 1fr; } .metadata-fix-result { align-items: flex-start; flex-direction: column; } .metadata-modal { padding: 12px; } .metadata-modal-panel { max-height: 94vh; padding: 22px 16px; } }
@media (max-width: 520px) { .film-toolbar { padding: 9px; } .film-toolbar a { flex: 1 1 auto; text-align: center; } .film-search { flex-basis: 100%; } .film-row { padding: 12px; } .source-count { display: none; } .film-pagination { flex-wrap: wrap; } }
