/* License Management Portal */
:root {
  --lm-bg: #f4f3ee;
  --lm-surface: #ffffff;
  --lm-surface-soft: #fafaf8;
  --lm-ink: #171a17;
  --lm-body: #303530;
  --lm-muted: #667066;
  --lm-border: #dedad0;
  --lm-border-soft: #ebe8df;
  --lm-green: #2f5e14;
  --lm-green-hover: #264c10;
  --lm-gold: #b89a4f;
  --lm-shadow: 0 6px 18px rgba(23, 26, 23, 0.045);
  --lm-radius: 12px;
  --lm-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lm-max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
.lm-page { font-family: var(--lm-font); color: var(--lm-body); background: var(--lm-bg); -webkit-font-smoothing: antialiased; }
.lm-hero { background: #23490f; color: #fff; padding: 28px 24px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
.lm-hero-inner, .lm-dash-hero-inner, .lm-auth-wrap, .lm-dash-wrap { max-width: var(--lm-max); margin: 0 auto; }
.lm-hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lm-hero-copy { min-width: 0; flex: 1 1 520px; }
.lm-eyebrow { margin: 0 0 8px; font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.lm-hero h1, .lm-dash-hero h1 { margin: 0 0 6px; font-size: clamp(28px, 3vw, 36px); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; color: #fff; }
.lm-hero p, .lm-dash-hero p { margin: 0; font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.82); max-width: 64ch; }
.lm-hero-aside { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: 0 1 360px; }
.lm-hero-cap { display: inline-flex; align-items: center; padding: 7px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.04); font-size: 12px; line-height: 1.2; font-weight: 600; color: rgba(255,255,255,.92); white-space: nowrap; }

.lm-auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 24px 24px 48px; align-items: start; }
.lm-auth-card, .lm-side-card, .lm-side-note, .lm-panel, .lm-stat { background: var(--lm-surface); border: 1px solid var(--lm-border); border-radius: var(--lm-radius); box-shadow: var(--lm-shadow); }
.lm-auth-card { padding: 24px; }
.lm-side-card { padding: 20px; }
.lm-side-note { padding: 16px 20px; margin-top: 12px; background: var(--lm-surface-soft); box-shadow: none; }
.lm-card-kicker { margin: 0 0 6px; font-size: 10px; line-height: 1.3; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lm-green); }
.lm-auth-head { margin-bottom: 18px; }
.lm-auth-head h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--lm-ink); }
.lm-side-card h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; color: var(--lm-ink); }
.lm-auth-subcopy { margin: 0; font-size: 14px; line-height: 1.55; color: var(--lm-muted); }

.lm-alert { display: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; border: 1px solid var(--lm-border); background: var(--lm-surface-soft); color: var(--lm-body); }
.lm-alert.show { display: block; }
.lm-alert-error { background: #fdf6f6; color: #7a2424; border-color: #ead2d2; }
.lm-alert-success { background: #f4f8f2; color: #234a12; border-color: #d6e2cf; }
.lm-alert-info { background: #f7f8fa; color: #334055; border-color: #d9dee7; }
.lm-form.is-hidden { display: none; }
.lm-label { display: block; margin: 0 0 6px; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--lm-ink); }
.lm-input-wrap { display: flex; align-items: center; gap: 10px; border: 1px solid var(--lm-border); background: #fff; border-radius: 10px; padding: 0 14px; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
.lm-input-wrap:focus-within { border-color: #7f9b6c; box-shadow: 0 0 0 3px rgba(47,94,20,.08); }
.lm-input-wrap i { color: #7a8478; font-size: 17px; }
.lm-input-wrap input, .lm-field input, .lm-field select, .lm-field textarea { width: 100%; border: 0; background: transparent; outline: 0; font: inherit; font-size: 15px; line-height: 1.4; color: var(--lm-ink); padding: 11px 0; }
.lm-input-code input { font-size: 22px; letter-spacing: .22em; font-weight: 600; }
.lm-hint { margin: 8px 0 0; color: var(--lm-muted); font-size: 12px; line-height: 1.5; }
.lm-btn { appearance: none; border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 0 16px; font: 600 14px/1.2 var(--lm-font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .15s, border-color .15s; text-decoration: none; }
.lm-btn-primary { background: var(--lm-green); color: #fff; width: 100%; margin-top: 14px; }
.lm-btn-primary:hover { background: var(--lm-green-hover); color: #fff; }
.lm-btn-secondary { background: #fff; color: var(--lm-body); border-color: var(--lm-border); width: 100%; margin-top: 8px; }
.lm-btn-secondary:hover { border-color: #c8c2b5; color: var(--lm-ink); }
.lm-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.22); min-height: 38px; padding: 0 14px; font-size: 13px; }
.lm-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.04); }
.lm-code-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--lm-surface-soft); border: 1px solid var(--lm-border-soft); color: var(--lm-muted); font-size: 13px; line-height: 1.45; }
.lm-code-meta strong { color: var(--lm-ink); font-weight: 600; }
.lm-link-btn { background: none; border: 0; color: var(--lm-green); font: 600 13px/1.3 var(--lm-font); cursor: pointer; padding: 0; }

.lm-trust { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--lm-border-soft); }
.lm-trust-item strong { display: block; margin-bottom: 2px; font-size: 12px; line-height: 1.35; font-weight: 600; color: var(--lm-ink); }
.lm-trust-item span { display: block; font-size: 12px; line-height: 1.45; color: var(--lm-muted); }

.lm-feature-list { list-style: none; margin: 0; padding: 0; }
.lm-feature-list li { padding: 11px 0; border-top: 1px solid var(--lm-border-soft); }
.lm-feature-list li:first-child { padding-top: 0; border-top: 0; }
.lm-feature-list li:last-child { padding-bottom: 0; }
.lm-feature-list strong { display: block; margin-bottom: 2px; font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--lm-ink); }
.lm-feature-list span { display: block; font-size: 13px; line-height: 1.5; color: var(--lm-muted); }
.lm-side-note .lm-card-kicker { margin-bottom: 4px; }
.lm-side-note p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--lm-muted); }
.lm-side-note a { color: var(--lm-green); font-weight: 600; text-decoration: none; }
.lm-side-note a:hover { text-decoration: underline; }

/* dashboard */
.lm-dashboard { background: var(--lm-bg); }
.lm-dash-hero { background: #23490f; color: #fff; padding: 26px 24px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.lm-dash-hero-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lm-user-chip { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); padding: 10px 12px; border-radius: 10px; }
.lm-user-avatar { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.lm-user-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: rgba(255,255,255,.62); margin-bottom: 2px; }
.lm-user-meta strong { font-size: 13px; line-height: 1.4; word-break: break-all; color: #fff; font-weight: 600; }
.lm-dash-wrap { padding: 20px 24px 48px; }
.lm-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.lm-stat { padding: 16px 18px; box-shadow: none; }
.lm-stat-k { display: block; color: var(--lm-muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
.lm-stat strong { display: block; font-size: 24px; margin: 6px 0 2px; letter-spacing: -.02em; color: var(--lm-ink); font-weight: 600; }
.lm-stat span:last-child { color: var(--lm-muted); font-size: 12px; line-height: 1.4; }
.lm-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.lm-panel { padding: 20px; box-shadow: none; }
.lm-panel-full { margin-bottom: 14px; }
.lm-panel-head { margin-bottom: 14px; }
.lm-panel-head h2 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; color: var(--lm-ink); }
.lm-panel-head h2 i { color: var(--lm-green); font-size: 17px; }
.lm-panel-head p { margin: 4px 0 0; color: var(--lm-muted); font-size: 13px; line-height: 1.5; }
.lm-dash-form .lm-btn-primary { width: auto; min-width: 180px; margin-top: 4px; }
.lm-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.lm-field { margin-bottom: 12px; }
.lm-field label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--lm-ink); }
.lm-field input, .lm-field select, .lm-field textarea { border: 1px solid var(--lm-border); background: #fff; border-radius: 10px; min-height: 44px; padding: 10px 12px; color: var(--lm-ink); }
.lm-field textarea { min-height: 84px; resize: vertical; }
.lm-field input:focus, .lm-field select:focus, .lm-field textarea:focus { border-color: #7f9b6c; box-shadow: 0 0 0 3px rgba(47,94,20,.08); }
.lm-status-list { display: grid; gap: 8px; }
.lm-status-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--lm-border-soft); border-radius: 10px; background: var(--lm-surface-soft); }
.lm-status-main strong { display: block; font-size: 14px; line-height: 1.35; color: var(--lm-ink); margin-bottom: 2px; }
.lm-status-main span { color: var(--lm-muted); font-size: 12px; line-height: 1.45; }
.lm-status-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.lm-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #edf3e8; color: #295111; }
.lm-tag-muted { background: #f1eee6; color: #625d50; }
.lm-integration-note { margin-top: 12px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--lm-surface-soft); border: 1px solid var(--lm-border-soft); }
.lm-integration-note i { color: #8a7420; font-size: 17px; margin-top: 1px; }
.lm-integration-note strong { display: block; margin-bottom: 2px; color: var(--lm-ink); font-size: 13px; }
.lm-integration-note p { margin: 0; color: var(--lm-muted); font-size: 13px; line-height: 1.5; }
.lm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.lm-table th, .lm-table td { padding: 10px 10px; border-bottom: 1px solid var(--lm-border-soft); text-align: left; vertical-align: top; line-height: 1.45; }
.lm-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--lm-muted); font-weight: 700; }
.lm-empty { padding: 18px; text-align: center; color: var(--lm-muted); border: 1px dashed var(--lm-border); border-radius: 10px; background: var(--lm-surface-soft); }
.lm-empty i { font-size: 24px; display: block; margin-bottom: 6px; color: #8a9783; }
.lm-empty p { margin: 0; line-height: 1.5; font-size: 13px; }
.lm-muted { color: var(--lm-muted); margin: 0; }

@media (max-width: 980px) {
  .lm-hero-inner { flex-direction: column; align-items: flex-start; }
  .lm-hero-aside { justify-content: flex-start; }
  .lm-auth-wrap, .lm-grid, .lm-stats, .lm-form-grid { grid-template-columns: 1fr; }
  .lm-dash-hero-inner { flex-direction: column; align-items: stretch; }
  .lm-user-chip { width: 100%; flex-wrap: wrap; }
  .lm-status-item { flex-direction: column; align-items: flex-start; }
  .lm-status-tags { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .lm-hero, .lm-dash-hero { padding: 22px 16px 18px; }
  .lm-auth-wrap, .lm-dash-wrap { padding: 16px 16px 40px; gap: 14px; }
  .lm-auth-card, .lm-side-card, .lm-panel, .lm-stat { padding: 18px; }
  .lm-side-note { padding: 14px 18px; }
  .lm-trust { grid-template-columns: 1fr; gap: 10px; }
  .lm-code-meta { flex-direction: column; align-items: flex-start; }
  .lm-dash-form .lm-btn-primary { width: 100%; }
}
