/* TrustMyAgent Trust Center Dashboard Styles - Original Design */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --border: #2a2a3a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --cyan: #00DCE8;
    --green: #10b981;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --orange: #FFA84F;
}

/* Trust Center Container */
.trust-center {
    padding: 32px 24px 120px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Agent Search Section */
.agent-search {
    max-width: 600px;
    margin: 0 auto 48px;
    text-align: center;
}

.agent-search h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.agent-search p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.search-form {
    display: flex;
    gap: 0;
    justify-content: center;
}

.search-input {
    width: 300px;
    padding: 14px 20px;
    background: #ffffff;
    border: none;
    border-radius: 6px 0 0 6px;
    color: #0a0a0f;
    font-size: 14px;
}

.search-input::placeholder {
    color: #64748b;
}

.search-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    border: none;
    border-radius: 0 6px 6px 0;
    color: var(--bg-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 220, 232, 0.3);
}

/* Agents List */
.agents-list {
    max-width: 800px;
    margin: 0 auto;
}

.agents-list h3 {
    color: var(--text);
    font-size: 18px;
    margin-bottom: 16px;
}

.agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.agent-card:hover {
    border-color: var(--cyan);
    transform: translateX(4px);
}

.agent-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-card-name {
    font-weight: 600;
    color: var(--text);
}

.agent-card-id {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.agent-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agent-card-score {
    font-size: 24px;
    font-weight: 700;
}

/* Dashboard Container */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard Header - 3 column layout */
.dashboard-header {
    display: grid;
    grid-template-columns: 260px 1fr 220px;
    align-items: stretch;
    margin-bottom: 32px;
    gap: 24px;
}

/* Agent Info Card (Left) */
.agent-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
}

.agent-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.agent-info-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.agent-info-status {
    font-size: 13px;
    color: var(--cyan);
    margin-bottom: 12px;
}

.agent-info-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
    line-height: 1.6;
}

/* Center Brand */
.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shield-logo {
    font-size: 64px;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--cyan);
    font-weight: 500;
}

/* Trust Score Card (Right) */
.trust-score-card {
    border-radius: 16px;
    padding: 20px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.trust-score-card.HIGH {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--success);
}

.trust-score-card.MEDIUM {
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid var(--warning);
}

.trust-score-card.LOW {
    background: rgba(255, 168, 79, 0.15);
    border: 2px solid var(--orange);
}

.trust-score-card.UNTRUSTED {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid var(--danger);
}

.trust-score-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.trust-score-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.trust-score-card.HIGH .trust-score-title { color: var(--success); }
.trust-score-card.MEDIUM .trust-score-title { color: var(--warning); }
.trust-score-card.LOW .trust-score-title { color: var(--orange); }
.trust-score-card.UNTRUSTED .trust-score-title { color: var(--danger); }

.trust-score-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    max-width: 180px;
    line-height: 1.4;
}

.trust-score-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-top: 8px;
}

.trust-score-card.HIGH .trust-score-value { color: var(--success); }
.trust-score-card.MEDIUM .trust-score-value { color: var(--warning); }
.trust-score-card.LOW .trust-score-value { color: var(--orange); }
.trust-score-card.UNTRUSTED .trust-score-value { color: var(--danger); }

/* Stats Row - 4 cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: #1a1a24;
    border-color: var(--cyan);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-value.cyan { color: var(--cyan); }
.stat-value.danger { color: var(--danger); }
.stat-value.orange { color: var(--orange); }
.stat-value.muted { color: var(--cyan); }

.stat-detail {
    font-size: 11px;
    color: var(--text-muted);
}

/* Trend Chart Section */
.trend-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trend-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend-period {
    font-size: 11px;
    color: var(--text-muted);
}

.trend-chart {
    width: 100%;
    height: 140px;
    position: relative;
}

.trend-chart svg {
    width: 100%;
    height: 100%;
}

/* Security Domains Section */
.domains-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.toggle-btn.active {
    background: var(--cyan);
    color: var(--bg-dark);
}

.toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Spider Chart */
.spider-chart-container {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.spider-chart {
    flex: 0 0 400px;
    max-width: 400px;
    height: auto;
}

.spider-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: background 0.2s;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.legend-value {
    font-size: 16px;
    font-weight: 700;
    min-width: 45px;
    text-align: right;
}

.legend-detail {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 50px;
}

/* Responsive spider chart */
@media (max-width: 900px) {
    .spider-chart-container {
        flex-direction: column;
        align-items: center;
    }

    .spider-chart {
        flex: none;
        max-width: 100%;
        width: 300px;
    }

    .spider-legend {
        width: 100%;
        padding-top: 0;
    }
}

.domain-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.domain-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.domain-name {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}

.domain-score {
    font-weight: 700;
    font-size: 16px;
}

.domain-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.domain-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.domain-detail {
    font-size: 11px;
    color: var(--text-muted);
}

/* Check Results */
.check-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.check-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--cyan);
    color: var(--text);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    border-color: transparent;
    color: var(--bg-dark);
}

.check-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.check-row:last-child {
    border-bottom: none;
}

.check-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-id {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.check-name {
    color: var(--text);
    font-size: 14px;
}

.check-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.severity-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pass {
    color: var(--success);
    font-weight: 600;
    font-size: 12px;
}

.status-fail {
    color: var(--danger);
    font-weight: 600;
    font-size: 12px;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cyan);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error State */
.error {
    text-align: center;
    padding: 48px;
    color: var(--danger);
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .header-center {
        order: -1;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .domain-cards {
        grid-template-columns: 1fr;
    }

    .check-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
        border-radius: 6px;
    }

    .search-btn {
        border-radius: 6px;
    }

    .identity-cards {
        flex-direction: column;
    }
}

/* Identity & Social Section */
.identity-section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.identity-cards {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.identity-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.identity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.identity-card.moltbook::before {
    background: linear-gradient(90deg, #00DCE8, #10b981);
}

.identity-card.owner::before {
    background: linear-gradient(90deg, #1DA1F2, #00DCE8);
}

.identity-card.environment::before {
    background: linear-gradient(90deg, #FFA84F, #f59e0b);
}

.identity-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.identity-card-icon {
    font-size: 24px;
}

.identity-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.identity-card-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.identity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}

.identity-row:last-child {
    border-bottom: none;
}

.identity-label {
    font-size: 12px;
    color: var(--text-muted);
}

.identity-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.identity-value a {
    color: var(--cyan);
    text-decoration: none;
}

.identity-value a:hover {
    text-decoration: underline;
}

.reputation-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.reputation-badge.high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.reputation-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.reputation-badge.low {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.karma-value {
    color: var(--cyan);
    font-weight: 700;
    font-size: 18px;
}

.env-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(0, 220, 232, 0.1);
    color: var(--cyan);
    font-family: monospace;
}

.verified-badge {
    color: #1DA1F2;
    font-size: 14px;
}

/* Agent card identity badges (lobby) */
.agent-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    white-space: nowrap;
}

.agent-badge.moltbook {
    color: #10b981;
}

.agent-badge.owner {
    color: #1DA1F2;
}

.agent-badge.env {
    color: #FFA84F;
    font-family: monospace;
}
