
/* ── Tool iframe (fullscreen) ────────────────────────────────────────── */
/* calc() macht den Frame unabhängig vom Parent-Container zuverlässig fullscreen. */
.tool-frame-wrap {
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
}

    .tool-frame-wrap iframe {
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

/* ── Dashboard wrapper ───────────────────────────────────────────────── */
.dashboard {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px;
    min-height: 100%;
}

.dash-inner {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Top row: System + Roadmap ───────────────────────────────────────── */
.top-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .top-row {
        grid-template-columns: 1fr;
    }
}

/* ── Shared dashboard surfaces ───────────────────────────────────────── */
.portal-card,
.tool-tile,
.info-tile {
    background: var(--tile-bg);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
}

.portal-card {
    padding: 20px 22px;
}

/* ── Card header (icon + title row) ─────────────────────────────────── */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1em;
}

.card-icon-blue {
    background: #eef3ff;
    border: 1px solid #c7d9ff;
    color: var(--accent);
}

.card-icon-amber {
    background: #fff8ec;
    border: 1px solid #fde5a8;
    color: #c77c00;
}

.card-title {
    font-size: .97em;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* ── System tile ─────────────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75em;
    color: #2a7f4f;
    margin-top: 3px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2a7f4f;
    flex-shrink: 0;
}

.sys-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #f0f0f0;
}

.sys-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: .84em;
}

    .sys-row:last-child {
        border-bottom: none;
    }

.sys-label {
    font-size: .72em;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    font-weight: 500;
}

.sys-val {
    font-size: .84em;
    font-weight: 500;
    color: var(--text-mid);
    text-align: right;
}

    .sys-val.mono {
        font-family: monospace;
    }

.env-badge {
    display: inline-block;
    font-size: .72em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.env-badge-green {
    background: #e6f4ee;
    color: #1a6e40;
}

.env-badge-amber {
    background: #fff8ec;
    color: #b06800;
}

.env-badge-blue {
    background: #eef3ff;
    color: var(--accent);
}

.env-badge-gray {
    background: #f1f3f5;
    color: #666;
}

/* ── Roadmap ────────────────────────────────────────────────────── */
.roadmap-description {
    font-size: .82em;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.roadmap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px 6px;
    font-size: .78em;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 6px;
    border: 1px solid #c7d9ff;
    background: #eef3ff;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, opacity .15s;
}

    .roadmap-btn i {
        line-height: 1;
        font-size: 1em;
    }

    .roadmap-btn:hover {
        background: #dde9ff;
        border-color: #a3c0ff;
        color: var(--accent);
        text-decoration: none;
    }

.roadmap-btn-disabled,
.roadmap-btn-disabled:hover {
    opacity: .65;
    cursor: not-allowed;
    background: #eef3ff;
    border-color: #c7d9ff;
    color: var(--accent);
    text-decoration: none;
}


.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.metric-card {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 12px 10px;
}

.metric-value {
    font-size: 1.6em;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 5px;
}

    .metric-value.green {
        color: #1a7f4a;
    }

    .metric-value.amber {
        color: #b06800;
    }

    .metric-value.blue {
        color: var(--accent);
    }

.metric-label {
    font-size: .72em;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ── Tool grid ───────────────────────────────────────────────────────── */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.tool-tile {
    min-height: 86px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: box-shadow .18s, transform .18s, opacity .18s;
}

button.tool-tile {
    width: 100%;
    border: none;
    font: inherit;
    text-align: left;
}

.tool-tile:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.tool-tile--disabled,
.tool-tile--disabled:hover {
    opacity: .58;
    cursor: not-allowed;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
    transform: none;
}

    .tool-tile--disabled .tool-tile-icon {
        background: #f1f3f5;
        border-color: #dee2e6;
        color: #999;
    }

    .tool-tile--disabled .tool-tile-name,
    .tool-tile--disabled .tool-tile-desc,
    .tool-tile--disabled .tool-tile-chevron {
        color: #999;
    }

.tool-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1em;
    background: #eef3ff;
    border: 1px solid #c7d9ff;
    color: var(--accent);
}

.tool-tile-body {
    flex: 1;
    min-width: 0;
}

.tool-tile-name {
    font-weight: 600;
    font-size: .92em;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.tool-tile-desc {
    font-size: .78em;
    color: var(--text-muted);
    line-height: 1.35;
    min-height: calc(1em * 1.35 * 2);
    max-height: calc(1em * 1.35 * 2);
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tool-tile-chevron {
    color: #c0c0c0;
    font-size: .85em;
    flex-shrink: 0;
}

/* ── Info tiles (no-access / unauthenticated) ─────────────────────────── */
.info-tile {
    padding: 28px 24px;
    text-align: center;
}

    .info-tile h2 {
        font-size: 1em;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .info-tile p {
        color: var(--text-muted);
        font-size: .88em;
        line-height: 1.5;
        margin: 0;
    }

.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 26px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .9em;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    margin-top: 14px;
    cursor: pointer;
    transition: background .15s;
}

    .btn-signin:hover {
        background: #0b5ed7;
        color: #fff;
        text-decoration: none;
    }

@media (max-width: 480px) {
    .metric-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}
