/* ─────────────────────────────────────────────────────────────────────────
   Defra Digital Waste Tracking — shared styles for the Worxflo admin pages.
   Previously these were duplicated inline in every .razor file; they now live
   here once. Reference from App.razor / _Host.cshtml:
     <link rel="stylesheet" href="css/defra-waste.css" />
   ───────────────────────────────────────────────────────────────────────── */

.dwt-shell { font-family: Arial, Helvetica, sans-serif; min-height: 100vh; background: #f3f2f1; color: #0b0c0c; }

/* Header */
.dwt-header { background: #0b0c0c; color: #fff; padding: 12px 0; }
.dwt-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.dwt-logo { display: flex; align-items: center; gap: 14px; }
.dwt-crown { font-size: 28px; line-height: 1; }
.dwt-dept { font-size: 10px; letter-spacing: .08em; color: #b1b4b6; text-transform: uppercase; }
.dwt-service { font-size: 16px; font-weight: 700; }
.dwt-back-link { color: #b1b4b6; text-decoration: none; font-size: 14px; }
.dwt-back-link:hover { color: #fff; }
.dwt-badge { background: #1d70b8; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 3px; text-transform: uppercase; letter-spacing: .05em; }
.dwt-badge-demo { background: #f47738; }
.dwt-badge-live { background: #00703c; }

/* Layout */
.dwt-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; }
.dwt-breadcrumb { font-size: 13px; color: #505a5f; margin-bottom: 12px; }
.dwt-breadcrumb a { color: #1d70b8; text-decoration: none; }
.dwt-breadcrumb a:hover { text-decoration: underline; }
.dwt-page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.dwt-hero { margin-bottom: 24px; }
h1 { font-size: 26px; font-weight: 700; margin: 0; }
h2 { font-size: 16px; font-weight: 700; margin: 20px 0 12px; border-bottom: 1px solid #e5e5e5; padding-bottom: 6px; }
h2:first-child { margin-top: 0; }
.dwt-lead { font-size: 15px; color: #505a5f; margin: 8px 0 20px; line-height: 1.5; }
.dwt-section-title { border: none; font-size: 20px; margin: 28px 0 14px; }

.dwt-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.dwt-two-col-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dwt-three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 900px) {
  .dwt-two-col, .dwt-two-col-inner, .dwt-three-col { grid-template-columns: 1fr; }
}

.dwt-form-panel, .dwt-result-panel { background: #fff; border: 1px solid #b1b4b6; border-radius: 6px; padding: 22px; }
.dwt-result-panel { position: sticky; top: 16px; max-height: 92vh; overflow-y: auto; }

/* Method tags */
.dwt-method-tag, .dwt-method { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 3px; color: #fff; display: inline-block; }
.dwt-post { background: #00703c; }
.dwt-put { background: #f47738; }
.dwt-get { background: #1d70b8; }
.dwt-endpoint { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #505a5f; margin-left: 8px; }

/* Notices */
.dwt-notice { background: #fff7bf; border-left: 5px solid #ffdd00; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; line-height: 1.5; }
.dwt-notice-green { background: #d4edda; border-left-color: #00703c; }
.dwt-notice-blue { background: #e6f0f8; border-left-color: #1d70b8; }

/* Fields */
.dwt-field { margin-bottom: 14px; }
.dwt-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.dwt-req { color: #d4351c; }
.dwt-input { width: 100%; padding: 8px 10px; border: 2px solid #0b0c0c; border-radius: 3px; font-size: 14px; box-sizing: border-box; font-family: inherit; background: #fff; color: #0b0c0c; }
.dwt-input:focus { outline: 3px solid #ffdd00; outline-offset: 0; }
.dwt-input-readonly, .dwt-input:disabled { background: #f3f2f1; color: #505a5f; border-color: #b1b4b6; }
.dwt-hint { font-size: 12px; color: #505a5f; margin-top: 3px; display: block; line-height: 1.4; }
.dwt-checkbox-field { display: flex; align-items: center; gap: 8px; }
.dwt-checkbox-field label { margin: 0; font-weight: 400; }
.dwt-checkbox-field input[type=checkbox] { width: 18px; height: 18px; }

/* Buttons */
.dwt-btn { padding: 10px 22px; border: none; border-radius: 3px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.dwt-btn-primary { background: #00703c; color: #fff; }
.dwt-btn-primary:hover:not(:disabled) { background: #005a30; }
.dwt-btn-put { background: #f47738; color: #fff; }
.dwt-btn-put:hover:not(:disabled) { background: #d3611f; }
.dwt-btn-get { background: #1d70b8; color: #fff; }
.dwt-btn-get:hover:not(:disabled) { background: #144e86; }
.dwt-btn-secondary { background: #f3f2f1; color: #0b0c0c; border: 1px solid #b1b4b6; }
.dwt-btn-small { padding: 5px 12px; font-size: 13px; }
.dwt-btn-link { background: none; border: none; color: #d4351c; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }
.dwt-btn:disabled { opacity: .5; cursor: not-allowed; }
.dwt-btn-row { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* Result panel */
.dwt-empty { color: #505a5f; font-style: italic; font-size: 14px; padding: 16px 0; }
.dwt-spinner { font-size: 15px; color: #505a5f; padding: 16px 0; }
.dwt-status-bar { padding: 6px 12px; border-radius: 3px; font-size: 13px; font-weight: 700; margin-bottom: 12px; display: inline-block; }
.dwt-status-ok { background: #d4edda; color: #155724; }
.dwt-status-warn { background: #fff3cd; color: #856404; }
.dwt-status-err { background: #f8d7da; color: #721c24; }
.dwt-meta-row { font-size: 12px; color: #505a5f; margin-bottom: 12px; word-break: break-all; }
.dwt-json { background: #0b0c0c; color: #7ee787; padding: 14px; border-radius: 4px; font-size: 12.5px; line-height: 1.45; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace; }
.dwt-json-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #505a5f; margin: 14px 0 6px; }
.dwt-error { background: #f8d7da; border-left: 5px solid #d4351c; padding: 12px 16px; font-size: 14px; color: #721c24; margin-top: 12px; border-radius: 3px; }
.dwt-error-inline { background: #f8d7da; border-left: 4px solid #d4351c; padding: 8px 12px; font-size: 13px; color: #721c24; margin-top: 10px; border-radius: 3px; }

.dwt-tracking-id { background: #00703c; color: #fff; border-radius: 6px; padding: 16px 20px; margin-bottom: 14px; }
.dwt-tracking-id .dwt-id-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; display: block; margin-bottom: 4px; }
.dwt-tracking-id .dwt-id-value { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; letter-spacing: .08em; }

/* Validation lists */
.dwt-validation-list { list-style: none; padding: 0; margin: 8px 0 0; }
.dwt-validation-list li { border-left: 4px solid #b1b4b6; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; background: #f8f8f8; border-radius: 0 3px 3px 0; }
.dwt-validation-list li.warn { border-left-color: #ffdd00; background: #fffbe6; }
.dwt-validation-list li.err { border-left-color: #d4351c; background: #fdf2f2; }
.dwt-validation-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #505a5f; display: block; }
.dwt-validation-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #505a5f; }

/* Cards (dashboard) */
.dwt-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.dwt-card { display: flex; gap: 14px; background: #fff; border: 1px solid #b1b4b6; border-radius: 6px; padding: 18px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.dwt-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.12); transform: translateY(-2px); }
.dwt-card-icon { font-size: 28px; line-height: 1; }
.dwt-card-content h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.dwt-card-content p { margin: 0 0 10px; font-size: 13px; color: #505a5f; line-height: 1.45; }

.dwt-info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
@media (max-width: 900px) { .dwt-info-row { grid-template-columns: 1fr; } }
.dwt-info-box { background: #fff; border: 1px solid #b1b4b6; border-radius: 6px; padding: 18px; }
.dwt-info-box h4 { margin: 0 0 10px; font-size: 14px; }
.dwt-info-box ol, .dwt-info-box ul { margin: 0; padding-left: 20px; font-size: 13px; color: #505a5f; line-height: 1.6; }

/* Repeating item cards */
.dwt-item-card { background: #f8f8f8; border: 1px solid #d3d3d3; border-radius: 5px; padding: 14px; margin-bottom: 14px; }
.dwt-item-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 14px; font-weight: 700; }
.dwt-list-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; border-bottom: 1px solid #e5e5e5; padding-bottom: 6px; }
.dwt-list-header h2 { margin: 0; border: none; padding: 0; }

/* Tables */
.dwt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dwt-table th { background: #0b0c0c; color: #fff; text-align: left; padding: 8px 10px; font-weight: 700; }
.dwt-table td { padding: 8px 10px; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.dwt-table tr:nth-child(even) td { background: #fafafa; }
.dwt-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.dwt-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.dwt-pill-haz { background: #f8d7da; color: #721c24; }
.dwt-pill-nonhaz { background: #d4edda; color: #155724; }

.dwt-spec-note { background: #fff; border: 1px solid #b1b4b6; border-radius: 6px; padding: 22px; margin-top: 28px; }
.dwt-spec-note h3 { margin: 0 0 10px; font-size: 16px; }
.dwt-spec-note ul, .dwt-spec-note ol { padding-left: 20px; font-size: 14px; line-height: 1.6; margin: 0; }
.dwt-spec-note code { background: #f3f2f1; padding: 1px 5px; border-radius: 3px; font-size: 13px; }

.dwt-tabs { display: flex; gap: 4px; border-bottom: 2px solid #b1b4b6; margin-bottom: 18px; flex-wrap: wrap; }
.dwt-tab { background: #f3f2f1; border: 1px solid #b1b4b6; border-bottom: none; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 4px 4px 0 0; font-family: inherit; }
.dwt-tab.active { background: #fff; color: #1d70b8; border-bottom: 2px solid #fff; margin-bottom: -2px; }

/* Resolved EWC codes shown under the code input */
.dwt-ewc-resolved { list-style: none; padding: 0; margin: 6px 0 0; }
.dwt-ewc-resolved li { font-size: 12px; line-height: 1.4; padding: 4px 8px; margin-bottom: 3px; border-left: 3px solid #b1b4b6; background: #f8f8f8; border-radius: 0 3px 3px 0; color: #505a5f; }
.dwt-ewc-resolved li strong { font-family: ui-monospace, Menlo, Consolas, monospace; color: #0b0c0c; margin-right: 6px; }
.dwt-ewc-resolved li.ok { border-left-color: #00703c; }
.dwt-ewc-resolved li.haz { border-left-color: #d4351c; background: #fdf2f2; }
.dwt-ewc-resolved li.unknown { border-left-color: #f47738; background: #fff4ec; color: #7a3d10; }
.dwt-ewc-resolved .dwt-pill { margin-right: 6px; }
