/* v1 — License Hub additions on top of the design's style.css (same tokens; only what the dynamic pages need) */
.form-grid label.full, .form-grid .full { grid-column: 1 / -1; }
.form-grid textarea, .settings-form textarea, .modal textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: var(--surface-2); font: inherit; font-size: 12px; resize: vertical; }
.form-grid textarea:focus, .settings-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-grid .hint, .settings-form .hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.new-customer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; border: 1px dashed color-mix(in srgb, var(--primary), white 55%); border-radius: 12px; background: var(--primary-soft); }
.new-customer[hidden] { display: none; }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.modal.wide { width: min(820px, 100%); }
.form-errors { display: flex; gap: 10px; margin-bottom: 14px; padding: 11px 13px; border: 1px solid #f6d9dd; border-radius: 11px; color: var(--red); background: var(--red-soft); font-size: 12px; }
.form-errors svg { width: 18px; height: 18px; flex: 0 0 auto; }
.form-errors ul { margin: 0; padding-inline-start: 16px; line-height: 1.7; }
.toast.error > span { color: var(--red); background: var(--red-soft); }
form.inline { display: contents; }
.row-actions form { display: contents; }
.row-actions a { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.row-actions a:hover { color: var(--primary); background: var(--primary-soft); }
.row-actions a svg { width: 14px; height: 14px; }
.pagination a { min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 12px; text-decoration: none; }
.pagination a:hover, .pagination a.active { border-color: var(--primary); color: white; background: var(--primary); }
.pagination a svg { width: 13px; height: 13px; }
.pagination a:last-child svg { transform: rotate(180deg); }
.text-button { text-decoration: none; }
.secondary-button, .primary-button { text-decoration: none; }
.secondary-button.danger { color: var(--red); border-color: #f6d9dd; }
.secondary-button.danger:hover { background: var(--red-soft); }
.status.offline::before { background: #8c96a7; }
.empty-row td { height: 90px; color: var(--muted); text-align: center; }
.empty-block { padding: 40px 20px; color: var(--muted); text-align: center; font-size: 12px; }
.key-cell code { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.date-cell small.muted-text { color: var(--muted); }

/* licence detail */
.key-box { position: relative; margin: 0 20px 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #091628; color: #d5e7ff; direction: ltr; }
.key-box code { display: block; font: 12px/1.7 Consolas, monospace; word-break: break-all; white-space: pre-wrap; }
.key-box.compact code { font-size: 11px; }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr); gap: 15px; margin-top: 15px; }
.detail-grid .panel { min-width: 0; overflow: hidden; }
.kv-list { display: grid; gap: 10px; padding: 16px 20px; }
.kv-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.kv-list div:last-child { border: 0; padding-bottom: 0; }
.kv-list span { color: var(--muted); }
.kv-list strong { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issued-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; padding: 14px 18px; border: 1px solid #bfe6d3; border-radius: 14px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 700; }
.issued-banner svg { width: 20px; height: 20px; }

/* login */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(20,118,242,.16), transparent 32%), var(--bg); }
.login-card { width: min(440px, 100%); padding: 30px 28px 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 25px 80px rgba(0,0,0,.14); }
.login-card .brand { border: 0; padding: 0 0 18px; }
.login-card .brand-copy strong { color: var(--text); }
.login-card .brand-copy small { color: var(--muted); }
.login-card h1 { margin: 6px 0 4px; font-size: 20px; }
.login-card > p { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-card .form-grid { grid-template-columns: 1fr; }
.login-card .primary-button { width: 100%; margin-top: 18px; }
.login-card .foot { margin-top: 16px; color: var(--muted); font-size: 11px; text-align: center; }

/* audit feed rows as links / activation payloads */
.audit-feed article .audit-copy p code { color: var(--primary); font-size: 11px; }
.audit-feed article a { color: var(--primary); text-decoration: none; }

/* customer detail rendered inline (page, not overlay) */
.customer-detail-inline .customer-detail-modal { width: 100%; max-height: none; transform: none; }
.customer-detail-inline .customer-detail-body { height: auto; }
.customer-detail-inline .customer-profile-card, .customer-detail-inline .customer-main-detail { overflow: visible; }
.customer-detail-inline .detail-card table { min-width: 0; }
.customer-detail-inline .detail-empty-state { min-height: 200px; }

/* settings extras */
.settings-section form[data-primary] .modal-actions, .settings-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 4px 20px 0; }
.key-preview { margin: 14px 20px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); direction: ltr; font: 11px/1.6 Consolas, monospace; word-break: break-all; }
.key-preview small { display: block; direction: rtl; margin-bottom: 6px; color: var(--muted); font: inherit; font-family: inherit; }
.warn-box { display: flex; gap: 10px; margin: 14px 20px 0; padding: 12px 14px; border: 1px solid #f3dfb8; border-radius: 11px; color: #8a5a06; background: var(--amber-soft); font-size: 11px; line-height: 1.7; }
.warn-box svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--amber); }
[data-theme="dark"] .warn-box { color: #f2c98a; }
.product-key-block { margin: 0 20px 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.product-key-block h4 { margin: 0 0 8px; font-size: 12px; }
.product-key-block .form-grid { margin-top: 10px; }
.product-key-block .modal-actions { margin-top: 12px; }
.team-list form { display: contents; }
.otp-secret { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font: 13px/1.5 Consolas, monospace; letter-spacing: 1px; direction: ltr; }

/* api page */
.endpoint-list code { overflow: hidden; text-overflow: ellipsis; }
.api-key-list code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-key-list form { display: contents; }
.code-block pre { flex: 1; }
.new-key-banner { margin: 0 0 15px; padding: 14px 18px; border: 1px solid #bfe6d3; border-radius: 14px; background: var(--green-soft); font-size: 12px; }
.new-key-banner code { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface); color: var(--primary); direction: ltr; text-align: left; word-break: break-all; }

/* logs page */
.audit-feed article[data-type] { grid-template-columns: 62px 36px 1fr; }
.log-payload { color: var(--muted); font-size: 10px; direction: ltr; text-align: right; }

@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } .new-customer { grid-template-columns: 1fr; } }

/* v1 — fixes after visual review */
.licenses-panel table { min-width: 700px; }
.chart-legend { padding-top: 8px; }
.detail-grid.stack { grid-template-columns: 1fr; }
.detail-grid table { min-width: 640px; }
.compact-stats strong.sm { font-size: 15px; }
.version-line a { margin-right: auto; color: var(--primary); font-size: 11px; font-weight: 700; text-decoration: none; }
.connector-footer form { display: contents; }
.connector-footer form > button:not(.copy-btn) { margin-right: auto; padding: 6px 9px; border: 0; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 700; }
.connector-footer .copy-btn { color: var(--primary); background: var(--primary-soft); }
.product-key-block p { margin: 6px 0; font-size: 12px; }
.product-key-block .hint { color: var(--muted); font-size: 11px; }
.product-key-block .form-grid { grid-template-columns: 1fr 1fr; }
.product-key-block .form-grid input, .product-key-block .form-grid textarea { background: var(--surface); }
