/* =========================
   Ożywione Chwile – App UI
   (ciemny, filmowy styl)
   ========================= */

/* Reset / baza */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.45;
    color: var(--text);
    background: radial-gradient(1200px 700px at 15% 10%, rgba(255, 214, 102, .08), transparent 55%),
                radial-gradient(900px 600px at 80% 0%, rgba(103, 232, 249, .06), transparent 55%),
                radial-gradient(900px 600px at 70% 95%, rgba(168, 85, 247, .05), transparent 55%),
                var(--bg);
}

/* Zmienne */
:root{
    --bg: #0b0f14;
    --panel: rgba(17, 24, 39, .82);
    --panel2: rgba(17, 24, 39, .60);
    --border: rgba(148, 163, 184, .16);
    --border2: rgba(148, 163, 184, .10);
    --text: rgba(226, 232, 240, .92);
    --muted: rgba(148, 163, 184, .82);
    --muted2: rgba(148, 163, 184, .62);
    --shadow: 0 14px 40px rgba(0,0,0,.45);
    --shadow2: 0 8px 22px rgba(0,0,0,.35);
    --radius: 16px;

    --accent: #ffd666;     /* ciepły filmowy amber */
    --accent2: #67e8f9;    /* chłodny cyan */
    --danger: #fb7185;
    --ok: #34d399;
    --warn: #fbbf24;

    --focus: 0 0 0 3px rgba(255, 214, 102, .25);
}

/* Linki */
a { color: rgba(226, 232, 240, .92); text-decoration: none; }
a:hover { color: white; text-decoration: underline; }

/* Układ */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 16px 56px;
}
hr {
    border: 0;
    border-top: 1px solid var(--border2);
    margin: 14px 0;
}

/* Nagłówki */
h1, h2, h3 {
    margin: 0 0 10px;
    letter-spacing: .2px;
}
h1 { font-size: 22px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 800; color: rgba(226, 232, 240, .92); }
p { margin: 10px 0; color: var(--text); }

/* Karty */
.card {
    background: linear-gradient(180deg, rgba(17,24,39,.82), rgba(17,24,39,.62));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow2);
    padding: 16px;
    backdrop-filter: blur(10px);
}
.card h3 { margin-top: 0; }
.card .muted { color: var(--muted); }

/* „Topbar” */
.shotTopbar, .projectTopbar, .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.shotTopbar__title { margin: 0; }
.shotTopbar__meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.shotTopbar__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Row */
.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.row > div { flex: 1 1 240px; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: rgba(226, 232, 240, .92);
    background: rgba(2, 6, 23, .45);
    border: 1px solid var(--border2);
}

/* Flash */
.flash{
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, .55);
    box-shadow: var(--shadow2);
}
.flash.ok{
    border-color: rgba(52, 211, 153, .35);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, .12), var(--shadow2);
}
.flash.err{
    border-color: rgba(251, 113, 133, .40);
    box-shadow: 0 0 0 1px rgba(251, 113, 133, .12), var(--shadow2);
}

/* Przyciski */
.btn, button.btn, a.btn {
    appearance: none;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, .40);
    color: rgba(226, 232, 240, .92);
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .08s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn:hover, button.btn:hover, a.btn:hover {
    background: rgba(2, 6, 23, .55);
    border-color: rgba(148, 163, 184, .28);
    text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus { outline: none; box-shadow: var(--focus); }

.btn.small { padding: 7px 10px; border-radius: 10px; font-size: 12px; }
.btn.primary {
    border-color: rgba(255, 214, 102, .35);
    background: linear-gradient(180deg, rgba(255,214,102,.16), rgba(255,214,102,.06));
}
.btn.primary:hover { border-color: rgba(255, 214, 102, .55); }
.btn.danger {
    border-color: rgba(251,113,133,.40);
    background: linear-gradient(180deg, rgba(251,113,133,.14), rgba(251,113,133,.05));
}
.btn.danger:hover { border-color: rgba(251,113,133,.65); }

/* Formularze */
label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: .2px;
}
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(2, 6, 23, .40);
    color: rgba(226, 232, 240, .92);
    outline: none;
    transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
textarea { min-height: 90px; resize: vertical; }
select { cursor: pointer; }
input:focus, select:focus, textarea:focus {
    border-color: rgba(255, 214, 102, .45);
    box-shadow: var(--focus);
    background: rgba(2, 6, 23, .50);
}

input[type="file"]{
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, .28);
    background: rgba(2, 6, 23, .28);
    color: rgba(226, 232, 240, .92);
}

/* Tabele */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(2, 6, 23, .30);
}
.table thead th {
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 6, 23, .42);
}
.table tbody td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--border2);
    vertical-align: top;
    color: rgba(226, 232, 240, .90);
    font-size: 13px;
}
.table tbody tr:hover td {
    background: rgba(255, 214, 102, .03);
}
.table tbody tr:last-child td { border-bottom: 0; }

/* Miniatury */
.thumb {
    display: block;
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(2, 6, 23, .45);
    box-shadow: 0 10px 18px rgba(0,0,0,.25);
    transition: transform .12s ease, border-color .12s ease;
}
a:hover .thumb { transform: translateY(-1px); border-color: rgba(255,214,102,.35); }

/* Biblioteka (kafelki) – lekkie dopieszczenie */
.shotLibrary__grid .card {
    box-shadow: 0 10px 22px rgba(0,0,0,.30);
}
.shotLibrary__item {
    position: relative;
    overflow: hidden;
}
.shotLibrary__item:before{
    content:"";
    position:absolute;
    inset:-2px;
    background: radial-gradient(500px 200px at 20% 0%, rgba(255,214,102,.10), transparent 60%),
                radial-gradient(500px 200px at 90% 10%, rgba(103,232,249,.08), transparent 60%);
    pointer-events:none;
    opacity:.65;
}
.shotLibrary__item > * { position: relative; }

/* Drobne */
nav a { margin-right: 10px; }
small, .small { color: var(--muted); }

/* Responsywność */
@media (max-width: 700px){
    .shotTopbar, .projectTopbar, .topbar { flex-direction: column; align-items: flex-start; }
    .shotTopbar__actions { justify-content: flex-start; }
    .thumb { width: 84px; height: 56px; }
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tbody tr { border-bottom: 1px solid var(--border); }
    .table tbody td { border: 0; border-bottom: 1px solid var(--border2); }
    .table tbody td:last-child { border-bottom: 0; }
}
.editable{
  cursor: text;
  display: inline-block;
  min-width: 40px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.editable:hover{
  border-color: var(--border2);
  background: rgba(255,255,255,.04);
}
.inline-edit{
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,.04);
  color: inherit;
}
.inlineEdit {
  padding: 6px 8px;
  border-radius: 10px;
  outline: none;
  min-height: 18px;
}
.inlineEdit:focus {
  box-shadow: 0 0 0 2px rgba(120,180,255,.25);
  background: rgba(255,255,255,.03);
}

.inlineInput, .inlineSelect {
  width: 100%;
  min-width: 90px;
}

.isSaving {
  opacity: .65;
  pointer-events: none;
}
