body{font-family:Arial,sans-serif;margin:0;background:#f7f7f8;color:#222}.site-header{background:#111827;color:white}.header-main{display:flex;align-items:center;gap:16px;padding:14px 22px}.brand{font-weight:700;font-size:20px}nav{display:flex;gap:12px;flex:1;flex-wrap:wrap}nav a{color:white;text-decoration:none}main{max-width:1200px;margin:24px auto;padding:0 20px}.card{background:white;border-radius:12px;padding:18px;box-shadow:0 1px 8px #0001;margin-bottom:18px}table{width:100%;border-collapse:collapse;background:white;border-radius:12px;overflow:hidden}th,td{padding:10px;border-bottom:1px solid #eee;text-align:left;vertical-align:top}label{display:block;margin-top:10px;font-weight:600}input,select,textarea{width:100%;max-width:520px;padding:8px;margin-top:4px;border:1px solid #ccc;border-radius:8px}textarea{min-height:90px}button,.button{background:#2563eb;color:white;padding:8px 12px;border:0;border-radius:8px;text-decoration:none;display:inline-block;margin-top:10px;cursor:pointer}.secondary{background:#6b7280}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.switcher{display:flex;align-items:center;gap:8px}.switcher select{max-width:180px}

.muted{color:#6b7280;font-size:0.92rem}
.message{background:#eef2ff;border:1px solid #c7d2fe;padding:12px;border-radius:10px}
.warning{background:#fff7ed;border:1px solid #fed7aa}
.nowrap{white-space:nowrap}
.inline-form{display:inline}
.link-button{background:transparent;color:#2563eb;padding:0;border:0;margin:0;text-decoration:underline;cursor:pointer}
.filter-card summary{cursor:pointer;margin-bottom:12px}
.filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;align-items:end}
.filter-grid label{margin-top:0}
.filter-actions{display:flex;gap:8px;align-items:end}
.two-column-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px;align-items:start}
.form-full{grid-column:1/-1}
.inline-grid{display:grid;grid-template-columns:2fr 1fr 120px auto;gap:12px;align-items:end}
.compact-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,260px));gap:12px;align-items:end}
.contract-details{margin-bottom:18px;border:1px solid #e5e7eb;border-radius:10px;padding:12px;background:#fff}
.contract-details summary{cursor:pointer;margin-bottom:10px}
input::placeholder{color:#9ca3af}
input.explicit-value{color:#111827;font-weight:600}

.badge{display:inline-block;padding:4px 8px;border-radius:999px;font-weight:600}
.status-customer-draft{background:#f3f4f6}
.status-customer-tosend{background:#fef9c3}
.status-customer-sent{background:#fdba74}
.status-customer-paid{background:#dcfce7}
.status-supplier-informed{background:#fef9c3}
.status-supplier-topay{background:#fdba74}
.status-supplier-paid{background:#dcfce7}
.metric-highlight{border-left:6px solid #f59e0b;background:#fffbeb}
th.money,td.money,.money{text-align:right;white-space:nowrap}

.button.compact{padding:4px 8px;margin-top:0;font-size:0.9rem}.two-column-display{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}.invoice-send-view th{width:220px}

.danger{background:#dc2626}.inline-form .button,.inline-form button{margin-top:0}.actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}

.customer-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.customer-actions .button{margin-top:0}
@media (max-width: 900px){.customer-actions{flex-direction:column;align-items:flex-start;gap:10px}}

.context-bar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#1f2937;border-top:1px solid #374151;padding:10px 22px}
.context-title{font-weight:700;color:#f9fafb;margin-right:4px;white-space:nowrap}
.switcher{display:flex;align-items:center;gap:8px;margin:0}
.context-bar label{margin:0;color:#e5e7eb;font-size:0.9rem;white-space:nowrap}
.context-bar select{width:auto;min-width:90px;max-width:260px;margin:0;padding:6px 9px;background:white;color:#111827}
.context-bar .switcher:first-of-type select{min-width:180px}
.logout-form button{margin-top:0;white-space:nowrap;background:#374151}
@media (max-width: 900px){.header-main{flex-wrap:wrap}.context-bar{align-items:flex-start;flex-direction:column}.switcher{width:100%;align-items:flex-start;flex-direction:column}.context-bar select{width:100%;max-width:100%}}


/* v22 deployment-safe header styling.
   Keep both the new .site-header markup and the older plain <header> layout readable.
   If you see no current version next to Fakt in the header, the updated FaktApp.dll has not been deployed/restarted. */
header{background:#111827;color:white}
.site-header{background:#111827;color:white}
.site-header .header-main, header:not(.site-header){display:flex;align-items:center;gap:16px;padding:14px 22px;flex-wrap:wrap}
header:not(.site-header) nav{display:flex;gap:12px;flex:1;flex-wrap:wrap}
header:not(.site-header) nav a, .site-header nav a{color:white;text-decoration:none}
header:not(.site-header) .switcher{display:flex;align-items:center;gap:8px;margin:0}
header:not(.site-header) .switcher label{margin:0;color:#f9fafb;white-space:nowrap}
header:not(.site-header) .switcher select{width:auto;min-width:180px;max-width:260px;margin:0;background:white;color:#111827}
header:not(.site-header) form button{margin-top:0;white-space:nowrap}
.app-version{font-size:0.72rem;font-weight:500;color:#9ca3af;margin-left:4px}

/* v23 */
.validation-summary{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;border-radius:10px;padding:10px;margin-bottom:12px}
.validation-summary:empty{display:none}
.checkbox-label{display:flex;align-items:center;gap:8px;font-weight:600}
.checkbox-label input[type="checkbox"]{width:auto;max-width:none;margin:0}
input[type="checkbox"]{width:auto;max-width:none}
input[readonly]{background:#f3f4f6;color:#374151}
.send-dialog-form{margin-top:18px;border-top:1px solid #e5e7eb;padding-top:16px}
.send-dialog-form input[type="file"]{background:white}
button:disabled,input[type="submit"]:disabled{opacity:.65;cursor:wait}

/* v25 */
.notes-row td{background:#f9fafb;color:#4b5563;font-size:.92rem;border-top:0}


/* v26 */
.document-grid{align-items:start}
.document-box{border:1px solid #e5e7eb;border-radius:10px;padding:14px;background:#fff}
.document-box h3{margin-top:0}
.compact-upload-form input[type="file"]{max-width:100%}

/* v28 */
.date-cell{white-space:nowrap;word-break:normal;overflow-wrap:normal;hyphens:none;min-width:6.5rem}
.metric-card{color:inherit;text-decoration:none;display:block;transition:transform .08s ease,box-shadow .08s ease}
.metric-card:hover{transform:translateY(-1px);box-shadow:0 4px 14px #0002}
.metric-card h3{margin-top:0}
.metric-hint{display:inline-block;margin-top:4px;color:#2563eb;font-size:.88rem;font-weight:600}
