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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
}

h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    color: #fff;
}

.subtitle {
    color: #666;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

/* Auth */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.auth-form input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 0.3em;
    outline: none;
}

.auth-form input:focus {
    border-color: #4a9eff;
}

.auth-form button, .logout-btn {
    background: #4a9eff;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-form button:hover, .logout-btn:hover {
    background: #3a8eef;
}

.error {
    color: #ff4444;
    margin-top: 12px;
    font-size: 0.85rem;
}

.hidden {
    display: none;
}

/* Workspace selector */
.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin-bottom: 24px;
}

.workspace-btn {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.workspace-btn:hover {
    border-color: #4a9eff;
    background: #1a2a3a;
}

.workspace-btn.offline {
    opacity: 0.4;
    cursor: not-allowed;
}

.workspace-btn .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.green { background: #44ff44; }
.dot.red { background: #ff4444; }
.dot.yellow { background: #ffaa00; }

.logout-btn {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* Voice UI */
.voice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    width: 100%;
    border-bottom: 1px solid #1a1a1a;
    position: fixed;
    top: 0;
    background: #0a0a0a;
    z-index: 10;
}

.back-btn {
    background: none;
    border: none;
    color: #4a9eff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
}

#workspace-name {
    font-weight: 500;
    flex: 1;
}

.transcript {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 72px 16px 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.msg.user {
    align-self: flex-end;
    background: #1a3a5a;
    color: #cce;
}

.msg.assistant {
    align-self: flex-start;
    background: #1a1a1a;
    color: #ddd;
}

.msg.error {
    align-self: center;
    background: #3a1a1a;
    color: #faa;
    font-size: 0.8rem;
}

.voice-controls {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(transparent, #0a0a0a 30%);
}

.mic-indicator {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #4a9eff;
    opacity: 0.5;
}

.mic-indicator.active .mic-ring {
    animation: pulse 1.5s ease-in-out infinite;
    border-color: #44ff44;
    opacity: 1;
}

.mic-indicator.processing .mic-ring {
    border-color: #ffaa00;
    animation: spin 1s linear infinite;
}

.mic-icon {
    font-size: 1.8rem;
}

#voice-status {
    margin-top: 8px;
    color: #666;
    font-size: 0.8rem;
}

.mute-btn {
    margin-top: 12px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 10px 28px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mute-btn:hover {
    border-color: #666;
    color: #aaa;
}

.mute-btn.muted {
    background: #3a1a1a;
    border-color: #ff4444;
    color: #ff6666;
}

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

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

/* Voice screen needs flex column */
#voice-screen {
    justify-content: flex-start;
    padding: 0;
}
