:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --muted: #888;
    --accent: #c084fc;
    --accent-hover: #a855f7;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

header nav { display: flex; gap: 1rem; align-items: center; }
header nav a, header nav button {
    color: var(--muted);
    text-decoration: none;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
}
header nav a:hover, header nav button:hover { color: var(--text); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

h2 { font-size: 1.5rem; margin-bottom: 1rem; }

label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 0.25rem; }

input[type="email"], input[type="password"], input[type="number"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

input:focus { outline: none; border-color: var(--accent); }

button.primary {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}
button.primary:hover { background: var(--accent-hover); }

button.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge.pending { background: var(--warning); color: #000; }
.badge.active { background: var(--accent); color: #000; }
.badge.quoted { background: #818cf8; color: #000; }
.badge.accepted { background: #06b6d4; color: #000; }
.badge.claimed { background: var(--accent); color: #000; }
.badge.resolved { background: var(--success); color: #000; }
.badge.declined { background: var(--danger); color: #fff; }

.ticket-id {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Consolas', monospace;
    color: var(--accent);
    margin-right: 0.5rem;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.request-item:last-child { border-bottom: none; }
.request-item:hover { background: rgba(255,255,255,0.02); }

.request-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    flex: 1;
    text-align: center;
}
.stat .value { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat .label { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

.response-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.conversation-msg {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.conversation-msg:last-child { border-bottom: none; }
.conversation-msg .role {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.hidden { display: none; }

.error { color: var(--danger); font-size: 0.875rem; margin-top: 0.5rem; }
.success { color: var(--success); font-size: 0.875rem; margin-top: 0.5rem; }

.token-display {
    font-family: monospace;
    background: var(--bg);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    word-break: break-all;
    font-size: 0.8rem;
    user-select: all;
}
