/* Reklamace BMRC — UI téma (nad Bootstrap 5) */

:root {
	--bmrc: #0d5bdd;
	--bmrc-dark: #0a47ab;
	--bmrc-soft: #eaf1fe;
	--ink: #1f2937;
	--muted: #6b7280;
	--line: #e6e8ec;
	--radius: .7rem;
}

body {
	min-height: 100vh;
	background: #f4f6fa;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}

/* ---- Navbar ---- */
.navbar.bg-primary { background: linear-gradient(90deg, var(--bmrc), var(--bmrc-dark)) !important; }
.navbar-brand { letter-spacing: .2px; }
.navbar .btn-outline-light { --bs-btn-border-color: rgba(255,255,255,.4); }

/* ---- Karty ---- */
.card { border-radius: var(--radius); }
.card.shadow-sm { box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06) !important; }
.card-header { border-top-left-radius: var(--radius) !important; border-top-right-radius: var(--radius) !important; }

/* karty fungující jako odkaz (dashboard) */
a.card { transition: transform .12s ease, box-shadow .12s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(16,24,40,.12) !important; }

/* ---- Tlačítka ---- */
.btn { border-radius: .55rem; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--bmrc); --bs-btn-border-color: var(--bmrc); --bs-btn-hover-bg: var(--bmrc-dark); --bs-btn-hover-border-color: var(--bmrc-dark); }
.btn-lg { padding: .7rem 1.25rem; }

/* ---- Formuláře ---- */
.form-control, .form-select { border-radius: .55rem; }
.form-control:focus, .form-select:focus { border-color: var(--bmrc); box-shadow: 0 0 0 .2rem rgba(13,91,221,.15); }
.form-label { font-weight: 500; margin-bottom: .3rem; }
.form-control.is-invalid, .form-select.is-invalid { border-color: #dc3545; }

/* ---- Tabulky ---- */
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.table-hover tbody tr { transition: background .1s ease; }

/* ---- Flash ---- */
.flash-wrap { position: sticky; top: .75rem; z-index: 1030; }
.alert { border: 0; border-radius: var(--radius); box-shadow: 0 2px 10px rgba(16,24,40,.07); }

/* ---- Stepper (průvodce) ---- */
.stepper { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.stepper li { flex: 1; position: relative; text-align: center; font-size: .85rem; color: var(--muted); padding-top: 2.4rem; }
.stepper li::before {
	content: ''; position: absolute; top: 1rem; left: 0; right: 0; height: 3px; background: var(--line); z-index: 0;
}
.stepper li:first-child::before { left: 50%; }
.stepper li:last-child::before { right: 50%; }
.stepper .dot {
	position: absolute; top: 0; left: 50%; transform: translateX(-50%);
	width: 2rem; height: 2rem; border-radius: 50%; background: #fff; border: 3px solid var(--line);
	display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; z-index: 1; color: var(--muted);
}
.stepper li.done { color: var(--ink); }
.stepper li.done::before, .stepper li.active::before { background: var(--bmrc); }
.stepper li.done .dot { background: var(--bmrc); border-color: var(--bmrc); color: #fff; }
.stepper li.active { color: var(--bmrc); font-weight: 600; }
.stepper li.active .dot { border-color: var(--bmrc); color: var(--bmrc); box-shadow: 0 0 0 4px rgba(13,91,221,.12); }

/* ---- Lišta aktivního zákazníka ---- */
.customer-bar {
	display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
	background: var(--bmrc-soft); border: 1px solid #d6e2fb; border-radius: var(--radius);
	padding: .6rem .9rem; margin-bottom: 1.25rem;
}
.avatar {
	width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--bmrc); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto;
}

/* ---- Přílohy / dropzone ---- */
.attach-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.attach-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: .5rem; margin-bottom: .35rem; background: #fff; }
.attach-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lišta zákazníka „lepí" nahoře — kontext zákazníka i počtu položek je stále vidět */
.customer-bar { position: sticky; top: .5rem; z-index: 1020; }

/* ---- Boční panel rozpracované reklamace (offcanvas) ---- */
.cart-panel-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.cart-panel-list li {
	display: flex; align-items: center; gap: .6rem;
	padding: .7rem 1rem; border-bottom: 1px solid var(--line);
}
.min-w-0 { min-width: 0; }

/* ---- Inline formulář v modalu (iframe) ---- */
.addrow-frame { width: 100%; height: min(76vh, 640px); border: 0; display: block; }

/* ---- Zvýraznění právě přidaného řádku ---- */
@keyframes rowFlash { from { background-color: rgba(13,91,221,.18); } to { background-color: transparent; } }
.row-flash > td { animation: rowFlash 2.2s ease-out; }

/* ---- Drobnosti ---- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .bi { font-size: 2.5rem; opacity: .35; display: block; margin-bottom: .5rem; }
.text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.badge { font-weight: 600; }
.cursor-pointer { cursor: pointer; }
