/* Webcassa Design Language — framework-free base styles.
   Use with any stack (Frappe/ERPNext, Django, Laravel, static sites):
   <link rel="stylesheet" href="tokens.css"> then <link rel="stylesheet" href="wdl-base.css">.
   Class names are prefixed wdl- to avoid clashing with host frameworks. */
html { font-family: var(--wdl-font-family-sans); color: var(--wdl-color-text-default); background: var(--wdl-color-bg-canvas); }
body { margin: 0; font-size: var(--wdl-density-fontSize); line-height: 1.5; }
:focus-visible { outline: var(--wdl-size-focusRing) solid var(--wdl-color-focus-ring); outline-offset: var(--wdl-size-focusOffset); }
.wdl-tabular { font-variant-numeric: tabular-nums; }
.wdl-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wdl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--wdl-density-controlHeight); min-width: var(--wdl-size-target); padding: 0 var(--wdl-density-paddingX); border-radius: var(--wdl-radius-control); border: 1px solid var(--wdl-color-border-input); background: var(--wdl-color-bg-surface); color: var(--wdl-color-text-default); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.wdl-btn:hover { background: var(--wdl-color-bg-control-hover); }
.wdl-btn--primary { background: var(--wdl-color-bg-accent); border-color: transparent; color: var(--wdl-color-text-on-accent); }
.wdl-btn--primary:hover { background: var(--wdl-color-bg-accent-hover); }
.wdl-btn--danger { background: var(--wdl-color-status-danger-solid); border-color: transparent; color: var(--wdl-color-status-danger-on-solid); }

.wdl-field { display: flex; flex-direction: column; gap: 4px; }
.wdl-label { font-weight: 600; }
.wdl-hint { color: var(--wdl-color-text-muted); }
.wdl-error { color: var(--wdl-color-status-danger-fg); font-weight: 600; }
.wdl-input { height: var(--wdl-density-controlHeight); padding: 0 var(--wdl-density-paddingX); border: 1px solid var(--wdl-color-border-input); border-radius: var(--wdl-radius-control); background: var(--wdl-color-bg-surface); color: inherit; font: inherit; }
.wdl-input[aria-invalid="true"] { border: 2px solid var(--wdl-color-status-danger-border); }

.wdl-card { background: var(--wdl-color-bg-surface); border: 1px solid var(--wdl-color-border-default); border-radius: var(--wdl-radius-container); }
.wdl-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--wdl-color-bg-control); }
.wdl-badge--info { background: var(--wdl-color-status-info-bg); color: var(--wdl-color-status-info-fg); }
.wdl-badge--success { background: var(--wdl-color-status-success-bg); color: var(--wdl-color-status-success-fg); }
.wdl-badge--warning { background: var(--wdl-color-status-warning-bg); color: var(--wdl-color-status-warning-fg); }
.wdl-badge--danger { background: var(--wdl-color-status-danger-bg); color: var(--wdl-color-status-danger-fg); }

.wdl-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wdl-table caption { text-align: left; padding: 8px 12px; color: var(--wdl-color-text-muted); }
.wdl-table th { text-align: left; font-weight: 600; color: var(--wdl-color-text-muted); background: var(--wdl-color-bg-canvas); }
.wdl-table th, .wdl-table td { height: var(--wdl-density-rowHeight); padding: 0 8px; border-top: 1px solid var(--wdl-color-border-subtle); }
.wdl-table .wdl-num { text-align: right; white-space: nowrap; }

.wdl-error-summary { padding: 16px; border: 2px solid var(--wdl-color-status-danger-border); border-radius: var(--wdl-radius-container); background: var(--wdl-color-bg-surface); }
.wdl-error-summary a { color: var(--wdl-color-status-danger-fg); font-weight: 600; }
