/* Editor space: screens 5a to 5g (templates/editor), after docs/wireframes. */

.editor-brand { align-items: center; }
.editor-brand-text { display: flex; flex-direction: column; font-size: 17px; font-weight: 700; line-height: 1.2; }
.editor-brand-text--large { font-size: 22px; letter-spacing: -0.01em; }
.editor-brand-space { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.editor-brand-text--large .editor-brand-space { font-size: 13px; }

/* 5a: login */
.editor-login { flex-direction: column; gap: 24px; padding: 48px 16px; }
.editor-login-brand { display: flex; align-items: center; gap: 12px; }
.editor-login-brand img { border-radius: 10px; box-shadow: 0 0 0 1px var(--logo-ring); }
.editor-login-card {
    width: 100%; max-width: 420px; padding: 40px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; gap: 24px;
}
.editor-login-card h1 { margin: 0; font-size: 26px; font-weight: 700; }
.editor-login-text { margin: -16px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-muted); }
.editor-login-button {
    min-height: 48px; border-radius: 10px; border: 1px solid var(--text); background: var(--surface); color: var(--text);
    font-size: 15px; font-weight: 600; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.editor-login-button:hover { background: var(--bg); color: var(--text); }
.editor-login-help { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.editor-login-refused {
    width: 100%; max-width: 420px; padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start;
    background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 12px; font-size: 14px; line-height: 1.5;
}
@media (max-width: 480px) {
    .editor-login-card { padding: 24px; }
}

/* Pages */
.editor-page { width: 100%; max-width: 1100px; padding: 24px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.editor-head .page-intro { flex: 1 1 420px; }
.editor-head-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.editor-head-action .button { gap: 8px; border: none; font: inherit; font-weight: 600; }
/* A screen still to come: dashed, as the wireframes mark what is pending. */
.editor-button-disabled:disabled {
    background: var(--surface); color: var(--text-muted); border: 1px dashed var(--border-strong); cursor: not-allowed;
}
.editor-muted { color: var(--text-muted); }
.editor-nowrap { white-space: nowrap; }

.editor-search { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.editor-search label { font-size: 14px; font-weight: 500; }
.editor-search-box {
    display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
    border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-muted);
}
.editor-search-box input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font: inherit; font-size: 15px; color: var(--text);
}
.editor-search-box:focus-within { outline: 2px solid var(--text); outline-offset: 1px; }

/* Cards */
.editor-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; }
.editor-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.editor-card--table { padding: 16px 24px 12px; }
.editor-card--dashed { border-style: dashed; border-color: var(--border-strong); }
.editor-card-note { margin: 0; padding-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.editor-rows { margin: 0; }
.editor-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--divider); font-size: 14px; }
.editor-row dt { color: var(--text-muted); }
.editor-row dd { margin: 0; font-weight: 500; text-align: right; }
.editor-support-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-soft); }

/* Tables */
.editor-scroll { overflow-x: auto; }
.editor-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.editor-table th {
    padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
}
.editor-table td { padding: 14px 12px; vertical-align: top; }
.editor-table th:first-child, .editor-table td:first-child { padding-left: 0; }
.editor-table th:last-child, .editor-table td:last-child { padding-right: 0; }
.editor-table tbody tr { border-top: 1px solid var(--divider); }
.editor-table-end { text-align: right !important; }
.editor-company-link { font-weight: 600; }
.editor-empty { color: var(--text-soft); }
.editor-cell-title { display: block; font-weight: 600; }
.editor-cell-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.editor-table code, .editor-routing code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* Status badges: plain when fine, bold border for an alert, dashed when not known. */
.editor-status {
    display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px;
    border: 1px solid var(--border-strong); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text);
}
.editor-status--alert { border: 2px solid var(--text); }
.editor-status--unknown { border-style: dashed; color: var(--text-soft); }

/* 5d */
.editor-breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.editor-breadcrumb [aria-current="page"] { color: var(--text); }
.editor-title { display: flex; flex-direction: column; gap: 6px; }
.editor-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.editor-title h2 { margin: 0; font-size: 26px; font-weight: 700; }
.editor-title-meta { margin: 0; font-size: 14px; color: var(--text-muted); }
.editor-people { margin: 0; padding: 0; list-style: none; }
.editor-person { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--divider); }
.editor-avatar { width: 32px; height: 32px; font-size: 12px; }
.editor-person-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.editor-person-name { font-size: 14px; font-weight: 600; }
.editor-person-email { font-size: 13px; color: var(--text-muted); overflow-wrap: anywhere; }

/* 5g */
.editor-routing { display: flex; flex-direction: column; gap: 12px; }
.editor-routing h3 { margin: 0; font-size: 17px; font-weight: 700; }
.editor-routing .notice { font-size: 14px; line-height: 1.5; }
.editor-routing-intro { margin: 0; font-size: 14px; color: var(--text-soft); }
.editor-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.editor-rule {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px;
    border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 14px;
}
.editor-rule--fixed { border: 2px solid var(--text); }
.editor-rule-when { flex: 1 1 240px; }
.editor-rule-arrow { color: var(--text-muted); }
.editor-rule-model { flex: 1 1 200px; font-weight: 600; }
.editor-rule-fixed { font-size: 12px; font-weight: 600; color: var(--text-soft); }
.editor-rule-state { padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--border-strong); font-size: 12px; color: var(--text-soft); white-space: nowrap; }

@media (max-width: 820px) {
    .editor-page { padding: 20px 16px 32px; }
    .editor-head-action { align-items: flex-start; }
}
