[hidden] {
  display: none !important;
}

/* MyFit Fakturace: příbuzný, ale samostatný vzhled vůči skladové aplikaci. */
:root {
  --ink: #f5efe5;
  --muted: #b6aa98;
  --line: #34463f;
  --paper: #151d1b;
  --canvas: #09100e;
  --brand: #bd7548;
  --brand-dark: #8e4e32;
  --warn: #e2b964;
  --warn-bg: #352817;
  --danger: #ff9a91;
  --danger-bg: #3a1d1d;
  --shadow: 0 18px 45px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

body { background: radial-gradient(circle at 78% 0, #14221d 0, transparent 34%), var(--canvas); }
h1, h2, .page-head h1 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.page-head h1 { font-size: clamp(34px, 4vw, 52px); }
.panel { background: linear-gradient(145deg, #18221f, #111816); border-color: var(--line); }
.login-shell { background: radial-gradient(circle at 20% 10%, #1c352d, transparent 38%), var(--canvas); }
.login-card { border-color: #5f492f; }
.brand, .logo span { background: linear-gradient(145deg, #dfb65d, #a86a39); color: #17130d; box-shadow: inset 0 0 0 4px #f2d48733; }
aside { background: linear-gradient(180deg, #0b110f, #070b0a); border-right: 1px solid #493b29; }
.logo { align-items: flex-start; }
.logo b { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.05; }
.logo b small { display: block; color: #c09b61; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 11px; letter-spacing: .08em; margin-top: 5px; text-transform: uppercase; }
nav a { color: #c8bcaa; border: 1px solid transparent; font-weight: 700; }
nav a:hover { background: #1a2521; color: #fff5e6; }
nav a.active { background: linear-gradient(90deg, #3d2a1d, #18231f); border-color: #d4a454; box-shadow: inset 3px 0 #d4a454; color: #f4d58f; }
.shell { min-height: 100vh; }
.topbar { background: #0e1613; border-color: var(--line); }
.topbar small { color: #c89d59; }
main { padding-top: 38px; }
button { background: linear-gradient(135deg, #c67b4b, #a85d38); box-shadow: 0 8px 20px #0004; }
button:hover { background: linear-gradient(135deg, #d78a56, #b96840); }
.ghost, .cancel { color: #f5efe5 !important; border-color: #735d3c; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: #e0b963; }
.login-card input, .document-form input, .document-form select, .document-form textarea, .filters input, .filters select, .partner-search input { background: #0d1512; border-color: #53645d; color: var(--ink); }
.document-form input[readonly] { background: #17221e; color: #c4b9a8; }
.filters { background: #121b18; }
.table { background: transparent; }
.table th { background: #19241f; color: #c6b9a6; }
.table td { border-color: #304139; }
.table tbody tr:hover { background: #1b2924; }
.table .overdue { background: #331d1b; box-shadow: inset 5px 0 0 #ff685b; }
.overdue-badge {
  background: #5b211d;
  border: 1px solid #ff7569;
  color: #fff2ef;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(255, 104, 91, .42), inset 0 0 10px rgba(255, 255, 255, .05);
}
.badge { background: #243c34; color: #d8eee5; border: 1px solid #365a4d; }
.badge.warn { background: #3b2d19; color: #efc86f; border-color: #76572d; }
.badge.danger { background: #3d1d1d; color: #ffaaa1; border-color: #7a3c39; }
.secondary { color: #aa9e8d; }
dialog { background: #0e1613; color: var(--ink); border: 1px solid #526057; }
dialog::backdrop { background: #020504d9; }
.dialog-head, .document-form footer { background: #101815; border-color: var(--line); }
.form-section, .item-card { border-color: #41544c; background: #111a17; }
.form-section legend, .item-card legend { color: #e0b763; }
.item-card { background: #131d1a; }
.remove-item { background: #1c1715; color: #ff9a91; border-color: #73423c; }
.notice { background: #352817; color: #edc97b; }
.document-total strong { color: #e6bd6b; }
.items-bottom-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.category p strong { color: #e2bb70; }
.company-settings h2 { margin: 0 0 22px; font-size: 30px; }
.company-details, .partner-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0 0 24px; }
.company-details div, .partner-card dl div { display: grid; gap: 4px; }
.company-details .wide, .partner-card dl .wide { grid-column: 1 / -1; }
.company-details dt, .partner-card dt { color: #b6a78f; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.company-details dd, .partner-card dd { margin: 0; }
.company-details a, .partner-card a, .attachment-list a { color: #e0b763; }
.partner-search { margin-bottom: 18px; padding: 18px; }
.partner-search label { display: block; color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.partner-search div { display: flex; gap: 10px; }
.partner-search input { flex: 1; border: 1px solid #53645d; border-radius: 8px; padding: 11px; }
.partner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.partner-card { padding: 22px; }
.partner-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.partner-card-head h2 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; margin: 0 0 7px; }
.attachment-section > label { display: grid; gap: 7px; }
.attachment-list { display: grid; gap: 8px; margin-top: 18px; }
.attachment-list a { align-items: center; background: #18241f; border: 1px solid #3d5148; border-radius: 8px; display: flex; justify-content: space-between; padding: 10px 12px; text-decoration: none; }
.attachment-list a:hover { border-color: #c3954e; }
.attachment-list span { color: var(--muted); font-size: 12px; }
.table-action { box-shadow: none; font-size: 12px; padding: 7px 10px; }
.row-actions { align-items: stretch; display: flex; flex-direction: column; gap: 7px; }
.secondary-action { background: transparent; border: 1px solid #8b7046; color: #e8c779; }
.secondary-action:hover { background: #302619; }
.status-document-summary { background: #17231f; border: 1px solid #3b5047; border-radius: 10px; display: grid; gap: 4px; padding: 14px; }
.status-document-summary span { color: var(--muted); }
.empty { color: #b6aa98; }
.document-detail { display: grid; gap: 18px; padding: 22px; }
.detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-summary > div { background: #17231f; border: 1px solid #3b5047; border-radius: 10px; display: grid; gap: 5px; padding: 14px; }
.detail-summary span, .record-list article span { color: var(--muted); font-size: 12px; }
.detail-section { background: #111a17; border: 1px solid #41544c; border-radius: 12px; padding: 18px; }
.detail-section h3 { color: #e0b763; margin: 0 0 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button-link, .small-link { background: linear-gradient(135deg, #c67b4b, #a85d38); border-radius: 8px; color: white; display: inline-flex; font-weight: 800; padding: 10px 14px; text-decoration: none; }
.small-link { font-size: 12px; padding: 7px 10px; }
.danger-button { background: #542520; border-color: #a84a43; color: #ffd8d3; }
.danger-note { background: #3a1d1d; border: 1px solid #7a3c39; border-radius: 8px; color: #ffaaa1; font-weight: 800; padding: 12px; }
.compact-form { align-items: end; display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.compact-form label { display: grid; gap: 6px; }
.compact-form input, .compact-form select { background: #0d1512; border: 1px solid #53645d; border-radius: 8px; color: var(--ink); padding: 10px; }
.compact-form .error { grid-column: 1 / -1; }
.record-list { display: grid; gap: 8px; }
.record-list article { align-items: center; background: #17231f; border: 1px solid #34483f; border-radius: 9px; display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.record-list article > div { display: grid; gap: 3px; }
.small { box-shadow: none; font-size: 12px; padding: 7px 10px; }
.audit-table { display: grid; gap: 1px; }
.audit-table > div { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 12px; padding: 9px; border-bottom: 1px solid #304139; }
.audit-table time, .audit-table span { color: var(--muted); font-size: 12px; }
.tag-chip { align-items: center; background: color-mix(in srgb, var(--tag-color) 22%, #17231f); border: 1px solid var(--tag-color); border-radius: 999px; display: inline-flex; gap: 8px; padding: 7px 11px; }
.tag-chip button { background: transparent; box-shadow: none; color: inherit; padding: 0 3px; }
.checkbox { align-items: center; display: flex !important; grid-auto-flow: column; justify-content: start; }
.checkbox input { width: auto; }

@media (max-width: 1050px) { .partner-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .company-details, .partner-card dl { grid-template-columns: 1fr; }
  .company-details .wide, .partner-card dl .wide { grid-column: auto; }
  .partner-search div { align-items: stretch; flex-direction: column; }
  .detail-summary, .compact-form { grid-template-columns: 1fr; }
  .audit-table > div { grid-template-columns: 1fr; }
}
