/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-hover: #22252f;
    --border: #2a2d3a;
    --text: #e4e4e7;
    --text-muted: #8b8d98;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-dim: rgba(99, 102, 241, 0.12);
    --danger: #ef4444;
    --danger-hover: #f87171;
    --success: #22c55e;
    --user-bubble: #2a2d3a;
    --assistant-bubble: #1e293b;
    --radius: 10px;
    --radius-sm: 6px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-dim);
    color: var(--primary-hover);
    font-weight: 500;
}

/* Main Layout */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 73px);
}

/* Panels */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 999px;
}

/* Buttons */
.btn {
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 6px 12px;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text);
    background: var(--bg);
}

.btn-danger {
    background: transparent;
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-danger:hover:not(:disabled) {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Inputs */
input[type="text"],
input[type="password"],
textarea {
    font-family: var(--font);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.15s ease;
    resize: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--primary);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Knowledge Panel */
.knowledge-panel {
    padding-bottom: 0;
}

/* Scrolling body (keeps panel-header pinned) */
.knowledge-panel-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.input-group {
    padding: 12px 20px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.input-row {
    display: flex;
    gap: 8px;
}

.input-row input {
    flex: 1;
}

.input-group textarea {
    margin-bottom: 8px;
}

/* File Upload Drop Zone */
.file-upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.file-upload-area.drag-over {
    border-color: var(--primary-hover);
    background: var(--primary-dim);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    pointer-events: none;
}

.drop-zone-content svg {
    color: var(--text-muted);
}

.file-upload-area:hover .drop-zone-content svg,
.file-upload-area.drag-over .drop-zone-content svg {
    color: var(--primary-hover);
}

.drop-zone-content p {
    font-size: 0.85rem;
    margin: 0;
}

.file-formats {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
    letter-spacing: 0.03em;
}

.knowledge-list-header {
    padding: 12px 20px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.knowledge-list-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
}

.knowledge-tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px 8px;
}
.knowledge-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.knowledge-tab:hover {
    color: var(--text-primary);
    background: var(--bg);
}
.knowledge-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.knowledge-list {
    flex: none;
    padding: 0 20px 16px;
}

.knowledge-item-image .knowledge-image {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 6px;
}
.knowledge-item-image .knowledge-image a {
    display: block;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    line-height: 0;
    background: var(--bg);
}
.knowledge-item-image .knowledge-image img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    cursor: zoom-in;
}
.knowledge-item-image .knowledge-image.broken {
    padding: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.knowledge-item-image .knowledge-image.broken::before {
    content: '⚠ Image failed to load';
}
.knowledge-image-url {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.knowledge-image-url code {
    font-size: 0.72rem;
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.35;
    padding: 4px 6px;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}
.knowledge-image-url button {
    align-self: flex-start;
}

.knowledge-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.knowledge-item:hover {
    border-color: var(--border);
}

.knowledge-item .knowledge-text {
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.knowledge-edit-input {
    font-family: var(--font);
    font-size: 0.85rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    width: 100%;
    min-height: 60px;
    resize: vertical;
    outline: none;
}

.knowledge-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.page-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 90px;
    text-align: center;
}

/* Chat Panel */
.conversation-id-bar {
    padding: 8px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.conversation-id-bar .label {
    color: var(--text-muted);
}

.conversation-id-bar code {
    font-family: var(--mono);
    color: var(--primary-hover);
    font-size: 0.72rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
}

.message.user {
    align-self: flex-end;
    background: var(--user-bubble);
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: var(--assistant-bubble);
    border-bottom-left-radius: 4px;
}

.message .role-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.message.user .role-label {
    color: var(--primary-hover);
}

.message.assistant .role-label {
    color: var(--success);
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.chat-input-area textarea {
    flex: 1;
}

.chat-input-area .btn {
    height: 42px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 1000;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1001;
    animation: slide-in 0.3s ease;
}

.toast.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-hover);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.auth-modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-modal-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.auth-error {
    font-size: 0.83rem;
    color: var(--danger-hover);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.auth-btn {
    width: 100%;
    padding: 10px 16px;
    margin-top: 4px;
}

.auth-nav-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.auth-nav-links .auth-btn {
    text-decoration: none;
    text-align: center;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-buttons .btn {
    flex: 1;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.85rem;
    color: var(--text);
}

/* API Keys */
.api-key-code {
    font-family: var(--mono);
    font-size: 0.8rem;
    background: var(--bg);
    color: var(--success);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex: 1;
    word-break: break-all;
    user-select: all;
}

.new-key-display {
    margin-bottom: 20px;
}

.new-key-display .input-row {
    margin-top: 6px;
}

.auth-field-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.api-keys-list {
    max-height: 300px;
    overflow-y: auto;
}

.api-key-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.api-key-item:hover {
    border-color: var(--border);
}

.api-key-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.api-key-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.api-key-prefix {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--primary-hover);
}

.api-key-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Sessions */
.sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.session-item:hover {
    border-color: var(--border);
}

.session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-id {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--primary-hover);
}

.session-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.panel-header-actions {
    display: flex;
    gap: 4px;
}

/* Email Followups */

/* Tabs */
.followup-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.followup-tab {
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s ease;
    flex: 1;
    text-align: center;
}

.followup-tab:hover {
    color: var(--text);
}

.followup-tab.active {
    background: var(--primary);
    color: #fff;
}

/* List */
.followups-list {
    max-height: 400px;
    overflow-y: auto;
}

.followup-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.followup-item:hover {
    border-color: var(--border);
}

.followup-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.followup-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.followup-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.followup-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.followup-status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.followup-status-followed_up {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.followup-status-closed {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.followup-question {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.followup-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.followup-conv-id {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--primary-hover);
}

.followup-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

/* Footer */
.followups-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.followups-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Compose view */
.compose-context {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.compose-context-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.compose-context-text {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

.compose-row {
    display: flex;
    gap: 12px;
}

.field-optional {
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.6;
}

.file-input-styled {
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    width: 100%;
    cursor: pointer;
}

.file-input-styled::file-selector-button {
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 12px;
    margin-right: 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-hover);
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease;
}

.file-input-styled::file-selector-button:hover {
    background: var(--border);
}

/* Tickets */
.ticket-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.ticket-item:hover {
    border-color: var(--border);
}

.ticket-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.ticket-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-number {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-hover);
}

.ticket-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ticket-status-open {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
}

.ticket-status-closed {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.ticket-subject {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.ticket-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.7;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

.ticket-send-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin: -4px 0 4px;
}

/* SMTP Configuration */
.smtp-configs-list {
    max-height: 380px;
    overflow-y: auto;
}

.smtp-config-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.smtp-config-item:hover {
    border-color: var(--border);
}

.smtp-config-item.smtp-active {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.04);
}

.smtp-config-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.smtp-config-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smtp-config-host {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    font-family: var(--mono);
}

.smtp-active-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.smtp-config-detail {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.smtp-config-sep {
    color: var(--border);
    font-size: 0.75rem;
}

.smtp-config-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.smtp-config-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
        height: auto;
        padding: 16px;
    }

    .panel {
        min-height: 500px;
    }

    header {
        padding: 12px 16px;
    }
}
