/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.new-session-button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.new-session-button:hover {
    background: var(--accent-hover);
}

.new-session-button.active {
    background: var(--text-secondary);
}

/* Header buttons (Admin, Settings, Logout) */
.header-button {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.header-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.header-button.logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 600px;
    width: 90%;
    animation: scaleIn 0.2s ease-out;
}

.modal-content .proxy-setup {
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Vertical list layout for sessions */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Legacy grid - keeping for reference but not used */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.session-portal {
    position: relative;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.session-portal:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.terminal-preview-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background: var(--success);
}

.status-indicator.inactive {
    background: var(--text-secondary);
}

.status-indicator.disconnected {
    background: var(--error);
}

.portal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.session-portal:hover .portal-overlay {
    opacity: 1;
}

.portal-hint {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

/* Onboarding Container */
.onboarding-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.onboarding-content {
    max-width: 400px;
    text-align: center;
}

.onboarding-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.onboarding-step {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--bg-darker);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.step-content strong {
    color: var(--text-primary);
}

.code-block {
    background: var(--bg-darker);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    text-align: left;
    display: inline-block;
}

/* Terminal Page */
.terminal-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.terminal-page .terminal-header {
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status.connected {
    color: var(--success);
}

.status.disconnected {
    color: var(--error);
}

.terminal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-darker);
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.message.user {
    border-left-color: var(--accent);
}

.message.assistant {
    border-left-color: var(--success);
}

.message.system {
    border-left-color: var(--error);
}

.message-role {
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.message-content pre {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.input-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
}

.message-input {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
}

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

.send-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading, .spinner {
    text-align: center;
    padding: 2rem;
}

/* Session Sections */
.session-section {
    margin-bottom: 2rem;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.section-title.muted {
    color: var(--text-secondary);
}

.inactive-section .session-portal {
    opacity: 0.7;
}

.session-portal.inactive {
    border-style: dashed;
}

.session-portal.inactive:hover {
    opacity: 1;
}

/* Delete Button */
.delete-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--error);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.session-portal:hover .delete-button {
    opacity: 1;
}

.delete-button:hover {
    background: #ff6b8a;
}

.muted {
    color: var(--text-secondary);
}

.path {
    color: var(--accent);
    word-break: break-all;
}

