/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.logo p {
    color: #64748b;
    font-size: 0.95rem;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #dcfce7;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #166534;
}

.dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Hero */
.hero {
    text-align: center;
    padding: 2.5rem 1rem;
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

.hero h2 span {
    color: #3b82f6;
}

.hero p {
    margin-top: 0.75rem;
    color: #475569;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card {
    background: white;
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e2e8f0;
}

.card small {
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card h2 {
    font-size: 1.5rem;
    margin-top: 0.3rem;
}

/* Value Panel */
.value-panel {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid #22c55e;
}

.value-card h3 {
    font-size: 1rem;
    color: #0f172a;
}

.value-card p {
    font-size: 0.95rem;
    color: #334155;
    margin-top: 0.25rem;
}

.value-card strong {
    color: #0f172a;
}

/* Workspace */
.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 700px) {
    .workspace {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.panel h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.panel label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    margin: 0.75rem 0 0.25rem;
}

.panel input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
}

.panel button {
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.panel button:hover {
    background: #2563eb;
}

/* Agent Log */
#agentLog {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.log-entry {
    padding: 0.4rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry .emoji {
    margin-right: 0.4rem;
}

/* Proposal */
.proposal {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid #e2e8f0;
    min-height: 120px;
    transition: border-color 0.3s;
}

.proposal.has-proposal {
    border-color: #3b82f6;
}

.proposal h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.empty-state {
    color: #94a3b8;
}

.proposal-details h3 {
    font-size: 1.3rem;
    color: #0f172a;
}

.proposal-details .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0;
}

.proposal-details .status-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.status-badge.awaiting {
    background: #fef9c3;
    color: #854d0e;
}

.status-badge.approved {
    background: #dcfce7;
    color: #166534;
}

.status-badge.blocked {
    background: #fee2e2;
    color: #991b1b;
}

.proposal-details .actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.actions .approve {
    background: #22c55e;
    color: white;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.actions .approve:hover {
    background: #16a34a;
}

.actions .reject {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.actions .reject:hover {
    background: #dc2626;
}

/* Test Controls */
.test-controls {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.test-controls h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.button-group button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    background: #e2e8f0;
    color: #0f172a;
    transition: background 0.2s;
}

.button-group button:hover {
    background: #cbd5e1;
}

.hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.75rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1.5rem;
}
