/* =========================================================
   OBSERVER — DASHBOARD CATALOG / PHASE 1
   ========================================================= */

.observer-dashboard-catalog,
.observer-dashboard-create,
.observer-dashboard-phase1-view,
.observer-dashboard-create-result {
    --dashboard-catalog-card: rgba(24, 29, 38, .94);
    --dashboard-catalog-card-soft: rgba(20, 25, 33, .82);
    --dashboard-catalog-border: rgba(255, 255, 255, .08);
    --dashboard-catalog-border-strong: rgba(255, 255, 255, .14);
    --dashboard-catalog-text: #f3f5f8;
    --dashboard-catalog-muted: #9299a6;
    --dashboard-catalog-subtle: #6f7785;
    --dashboard-catalog-accent: #8b4cff;
    --dashboard-catalog-accent-soft: rgba(139, 76, 255, .12);
    --dashboard-catalog-green: #33c77a;

    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 24px;
    color: var(--dashboard-catalog-text);
}

.observer-dashboard-catalog *,
.observer-dashboard-create *,
.observer-dashboard-phase1-view *,
.observer-dashboard-create-result * {
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| Create Dashboard - centered composition
|--------------------------------------------------------------------------
|
| Mantém o formulário com a largura atual, mas centraliza todo o conjunto
| (voltar + heading + formulário) dentro da Observer Window.
|
*/
.observer-dashboard-create {
    max-width: 768px;
    margin-right: auto;
    margin-left: auto;
}

.observer-dashboard-create .observer-dashboard-create-form {
    width: 100%;
    max-width: none;
}

.observer-dashboard-catalog-header,
.observer-dashboard-phase1-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.observer-dashboard-catalog-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: #a778ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.observer-dashboard-catalog h1,
.observer-dashboard-create h1,
.observer-dashboard-phase1-view h1 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 680;
}

.observer-dashboard-catalog-header p,
.observer-dashboard-phase1-view-header p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--dashboard-catalog-muted);
    font-size: 13px;
    line-height: 1.5;
}

.observer-dashboard-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
}

.observer-dashboard-catalog-search {
    position: relative;
    width: min(420px, 100%);
}

.observer-dashboard-catalog-search i {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--dashboard-catalog-subtle);
    pointer-events: none;
}

.observer-dashboard-catalog-search input,
.observer-dashboard-create-form input,
.observer-dashboard-create-form select,
.observer-dashboard-create-form textarea {
    width: 100%;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 9px;
    background: rgba(9, 13, 19, .45);
    color: var(--dashboard-catalog-text);
    outline: none;
    transition: border-color .15s ease, background .15s ease;
}

.observer-dashboard-catalog-search input {
    height: 40px;
    padding: 0 14px 0 38px;
}

.observer-dashboard-catalog-search input:focus,
.observer-dashboard-create-form input:focus,
.observer-dashboard-create-form select:focus,
.observer-dashboard-create-form textarea:focus {
    border-color: rgba(139, 76, 255, .62);
    background: rgba(12, 16, 23, .62);
}

.observer-dashboard-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.observer-dashboard-catalog-card {
    display: flex;
    min-width: 0;
    min-height: 260px;
    flex-direction: column;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 13px;
    background: var(--dashboard-catalog-card);
    overflow: hidden;
}

.observer-dashboard-catalog-card-system {
    border-color: rgba(139, 76, 255, .22);
    background:
        linear-gradient(145deg, rgba(139, 76, 255, .08), transparent 48%),
        var(--dashboard-catalog-card);
}

.observer-dashboard-catalog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0;
}

.observer-dashboard-catalog-card-icon,
.observer-dashboard-catalog-new-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 76, 255, .25);
    border-radius: 10px;
    background: var(--dashboard-catalog-accent-soft);
    color: #a778ff;
}

.observer-dashboard-catalog-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 999px;
    color: var(--dashboard-catalog-muted);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.observer-dashboard-catalog-badge-system {
    border-color: rgba(139, 76, 255, .22);
    color: #b99aff;
}

.observer-dashboard-catalog-card-body {
    flex: 1 1 auto;
    padding: 17px 18px 10px;
}

.observer-dashboard-catalog-card-body h2,
.observer-dashboard-catalog-new-content h2 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 650;
}

.observer-dashboard-catalog-card-body p,
.observer-dashboard-catalog-new-content p {
    margin: 8px 0 0;
    color: var(--dashboard-catalog-muted);
    font-size: 12px;
    line-height: 1.55;
}

.observer-dashboard-catalog-card-meta {
    display: grid;
    gap: 7px;
    padding: 0 18px 15px;
    color: var(--dashboard-catalog-subtle);
    font-size: 11px;
}

.observer-dashboard-catalog-card-meta span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.observer-dashboard-catalog-card-meta i {
    width: 14px;
    text-align: center;
}

.observer-dashboard-catalog-open,
.observer-dashboard-catalog-create {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-top: 1px solid var(--dashboard-catalog-border);
    background: rgba(255, 255, 255, .018);
    color: #e9ebef;
    padding: 0 18px;
    font: inherit;
    font-size: 12px;
    font-weight: 620;
    cursor: pointer;
}

.observer-dashboard-catalog-open:hover,
.observer-dashboard-catalog-create:hover {
    background: rgba(139, 76, 255, .09);
    color: #fff;
}

.observer-dashboard-catalog-card-new {
    border-style: dashed;
    border-color: rgba(139, 76, 255, .32);
    background: rgba(139, 76, 255, .035);
}

.observer-dashboard-catalog-new-content {
    display: flex;
    min-height: 258px;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 26px;
    text-align: center;
}

.observer-dashboard-catalog-new-content h2 {
    margin-top: 14px;
}

.observer-dashboard-catalog-new-content p {
    max-width: 260px;
}

.observer-dashboard-catalog-new-content .observer-dashboard-catalog-create {
    min-height: 38px;
    justify-content: center;
    margin-top: 18px;
    border: 1px solid rgba(139, 76, 255, .28);
    border-radius: 8px;
    background: rgba(139, 76, 255, .12);
    padding: 0 14px;
}

.observer-dashboard-catalog-empty {
    display: none;
}

.observer-dashboard-catalog-no-results {
    margin-top: 18px;
    padding: 16px;
    border: 1px dashed var(--dashboard-catalog-border);
    border-radius: 10px;
    color: var(--dashboard-catalog-muted);
    text-align: center;
    font-size: 12px;
}

.observer-dashboard-back {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
    color: var(--dashboard-catalog-muted);
    padding: 0 12px;
    cursor: pointer;
}

.observer-dashboard-phase1-view-header {
    flex-direction: column;
}

.observer-dashboard-phase1-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.observer-dashboard-phase1-meta span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 999px;
    padding: 0 10px;
    color: var(--dashboard-catalog-muted);
    font-size: 11px;
}

.observer-dashboard-phase1-placeholder {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(139, 76, 255, .26);
    border-radius: 13px;
    background: rgba(139, 76, 255, .035);
    padding: 30px;
    text-align: center;
}

.observer-dashboard-phase1-placeholder > i {
    margin-bottom: 14px;
    color: #a778ff;
    font-size: 31px;
}

.observer-dashboard-phase1-placeholder strong {
    color: #fff;
    font-size: 16px;
}

.observer-dashboard-phase1-placeholder span {
    max-width: 560px;
    margin-top: 8px;
    color: var(--dashboard-catalog-muted);
    font-size: 12px;
    line-height: 1.6;
}

.observer-dashboard-create-form {
    display: grid;
    max-width: 720px;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 12px;
    background: var(--dashboard-catalog-card);
}

.observer-dashboard-create-form label {
    display: grid;
    gap: 7px;
}

.observer-dashboard-create-form label > span {
    color: var(--dashboard-catalog-muted);
    font-size: 11px;
    font-weight: 600;
}

.observer-dashboard-create-form input,
.observer-dashboard-create-form select {
    min-height: 42px;
    padding: 0 12px;
}

.observer-dashboard-create-form textarea {
    resize: vertical;
    padding: 11px 12px;
    font: inherit;
}

.observer-dashboard-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.observer-dashboard-primary,
.observer-dashboard-secondary,
.observer-dashboard-create-result button {
    min-height: 40px;
    border-radius: 8px;
    padding: 0 14px;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.observer-dashboard-primary {
    border: 1px solid rgba(139, 76, 255, .35);
    background: rgba(139, 76, 255, .16);
    color: #fff;
}

.observer-dashboard-secondary {
    border: 1px solid var(--dashboard-catalog-border);
    background: rgba(255, 255, 255, .025);
    color: var(--dashboard-catalog-muted);
}

.observer-dashboard-create-result {
    display: flex;
    max-width: 660px;
    min-height: 260px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 28px auto;
    border: 1px solid var(--dashboard-catalog-border);
    border-radius: 12px;
    background: var(--dashboard-catalog-card);
    padding: 28px;
    text-align: center;
}

.observer-dashboard-create-result > i {
    color: var(--dashboard-catalog-green);
    font-size: 32px;
}

.observer-dashboard-create-result-error > i {
    color: #ff6874;
}

.observer-dashboard-create-result > strong {
    color: #fff;
    font-size: 17px;
}

.observer-dashboard-create-result > span {
    max-width: 520px;
    color: var(--dashboard-catalog-muted);
    font-size: 12px;
    line-height: 1.55;
}

.observer-dashboard-create-result > div {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .observer-dashboard-catalog,
    .observer-dashboard-create,
    .observer-dashboard-phase1-view,
    .observer-dashboard-create-result {
        padding: 16px;
    }

    .observer-dashboard-catalog-grid {
        grid-template-columns: 1fr;
    }

    .observer-dashboard-create-actions,
    .observer-dashboard-create-result > div {
        flex-direction: column-reverse;
    }

    .observer-dashboard-create-actions button,
    .observer-dashboard-create-result button {
        width: 100%;
    }
}


/* =========================================================
   PHASE 2 — custom dashboard actions
   ========================================================= */

.observer-dashboard-catalog-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    border-top: 1px solid var(--dashboard-catalog-border);
}

.observer-dashboard-catalog-actions .observer-dashboard-catalog-open {
    min-width: 0;
    border-top: 0;
}

.observer-dashboard-catalog-edit {
    display: inline-flex;
    width: 44px;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid var(--dashboard-catalog-border);
    background: rgba(255, 255, 255, .018);
    color: var(--dashboard-catalog-muted);
    cursor: pointer;
}

.observer-dashboard-catalog-edit:hover {
    background: rgba(139, 76, 255, .09);
    color: #fff;
}


/* =========================================================
   Dashboard JSON import — Phase 3.18
   ========================================================= */
.observer-dashboard-create-import-box {
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    border:1px dashed rgba(139,76,255,.28); border-radius:10px;
    background:rgba(139,76,255,.045); padding:13px 14px;
}
.observer-dashboard-create-import-box > div { display:grid; gap:3px; }
.observer-dashboard-create-import-box strong { color:#eef1f5; font-size:11px; }
.observer-dashboard-create-import-box span { color:var(--dashboard-catalog-muted); font-size:9px; }
.observer-dashboard-create-import-state {
    display:flex; align-items:center; gap:9px; border:1px solid rgba(51,199,122,.18);
    border-radius:9px; background:rgba(51,199,122,.055); padding:10px 12px; color:#72dca5;
}
.observer-dashboard-create-import-state span { display:grid; gap:2px; }
.observer-dashboard-create-import-state strong { font-size:10px; }
.observer-dashboard-create-import-state small { color:var(--dashboard-catalog-muted); font-size:8px; }
.observer-dashboard-create-import-modal-overlay {
    position:fixed; inset:0; z-index:1000000; display:flex; align-items:center; justify-content:center;
    padding:20px; background:rgba(4,7,12,.76); backdrop-filter:blur(5px);
}
.observer-dashboard-create-import-modal {
    width:min(470px,100%); border:1px solid rgba(139,76,255,.22); border-radius:13px;
    background:#11161f; padding:24px; box-shadow:0 24px 80px rgba(0,0,0,.45);
}
.observer-dashboard-create-import-modal > i { color:#a778ff; font-size:20px; }
.observer-dashboard-create-import-modal > span { display:block; margin-top:12px; color:#a778ff; font-size:8px; font-weight:750; letter-spacing:.12em; }
.observer-dashboard-create-import-modal h2 { margin:5px 0 0; color:#fff; font-size:20px; }
.observer-dashboard-create-import-modal p { margin:9px 0 0; color:#b3bbc7; font-size:11px; line-height:1.55; }
.observer-dashboard-create-import-modal p b { color:#ffb96a; }
.observer-dashboard-create-import-preview { display:grid; gap:2px; margin-top:15px; border:1px solid rgba(255,255,255,.07); border-radius:8px; padding:10px; }
.observer-dashboard-create-import-preview strong { color:#f2f4f7; font-size:10px; }
.observer-dashboard-create-import-preview small { color:#7f8996; font-size:8px; }
.observer-dashboard-create-import-error { min-height:16px; margin-top:10px; color:#ff8993; font-size:9px; }
.observer-dashboard-create-import-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.observer-dashboard-create-import-actions button { min-height:36px; border-radius:7px; padding:0 12px; font:inherit; font-size:9px; cursor:pointer; }
.observer-dashboard-create-import-actions button:first-child { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.025); color:#aeb6c2; }
.observer-dashboard-create-import-actions button:last-child { border:1px solid rgba(139,76,255,.34); background:rgba(139,76,255,.13); color:#c3a5ff; }

