/* ═══ Theme variables ═══ */
:root {
    color-scheme: light;
    /* Surfaces */
    --bg-page: #eef2f7;
    --bg-surface: #ffffff;
    --bg-subtle: #f8f9fa;
    --bg-input: #ffffff;
    --bg-code: #1e1e1e;
    --bg-code-text: #d4d4d4;
    /* Text */
    --text-primary: #2c3e50;
    --text-body: #333333;
    --text-muted: #666666;
    --text-faint: #999999;
    --text-on-brand: #ffffff;
    /* Borders */
    --border: #e0e6ed;
    --border-strong: #d0d7de;
    --border-soft: #eeeeee;
    /* Brand */
    --brand: #1a73e8;
    --brand-hover: #1557b8;
    --accent-cyan: #4dd0e1;
    /* Semantic */
    --success: #27ae60;
    --success-bg: #d4edda;
    --success-text: #155724;
    --danger: #e74c3c;
    --danger-bg: #f8d7da;
    --danger-text: #721c24;
    --warn: #f39c12;
    --warn-bg: #fff3e0;
    --info: #1565c0;
    --info-bg: #e3f2fd;
    /* Header gradient */
    --header-grad-1: #0f2027;
    --header-grad-2: #203a43;
    --header-grad-3: #2c5364;
    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-pop:  0 4px 20px rgba(0,0,0,0.18);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-page: #0e1116;
    --bg-surface: #161b22;
    --bg-subtle: #1c222b;
    --bg-input: #0d1117;
    --bg-code: #0a0d12;
    --bg-code-text: #c9d1d9;
    --text-primary: #e6edf3;
    --text-body: #c9d1d9;
    --text-muted: #8b949e;
    --text-faint: #6e7681;
    --text-on-brand: #ffffff;
    --border: #30363d;
    --border-strong: #3c444d;
    --border-soft: #21262d;
    --brand: #4c8dff;
    --brand-hover: #74a4ff;
    --accent-cyan: #4dd0e1;
    --success: #3fb950;
    --success-bg: #1f3a23;
    --success-text: #aff5b4;
    --danger: #f85149;
    --danger-bg: #4a1d1d;
    --danger-text: #ffb4ae;
    --warn: #d29922;
    --warn-bg: #3a2a0e;
    --info: #58a6ff;
    --info-bg: #112844;
    --header-grad-1: #05080c;
    --header-grad-2: #0e1620;
    --header-grad-3: #18222e;
    --shadow-card: 0 4px 20px rgba(0,0,0,0.55);
    --shadow-pop:  0 4px 24px rgba(0,0,0,0.7);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
}

/* ═══ Header Bar ═══ */
.app-header-bar {
    background: linear-gradient(135deg, var(--header-grad-1), var(--header-grad-2), var(--header-grad-3));
    padding: 10px 0;
    margin-bottom: 0;
}

.app-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.app-logo {
    height: 80px;
    width: auto;
    padding: 8px 14px;
    background: rgba(214, 222, 232, 0.95);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.agent-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.25);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: default;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 20px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.user-menu-trigger:hover {
    background: rgba(255,255,255,0.18);
}

.user-icon {
    opacity: 0.85;
    font-size: 14px;
}

.user-name {
    color: rgba(255,255,255,0.95);
    font-weight: 500;
}

.user-menu-arrow {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    margin-left: 2px;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-pop);
    min-width: 220px;
    padding: 6px 0;
    z-index: 1000;
    display: none;
}

.user-dropdown.open {
    display: block;
}

.user-dropdown-section {
    padding: 4px 0;
}

.user-dropdown-section + .user-dropdown-section {
    border-top: 1px solid var(--border-soft);
}

.user-dropdown-label {
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 4px 14px 6px;
    font-weight: 600;
}

/* Theme toggle (segmented control inside the user dropdown) */
.theme-toggle-group {
    display: flex;
    gap: 4px;
    padding: 2px 14px 8px;
}
.theme-opt {
    flex: 1;
    font-size: 11px;
    padding: 6px 0;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.theme-opt:hover { background: var(--bg-subtle); }
.theme-opt.active {
    background: var(--brand);
    color: var(--text-on-brand);
    border-color: var(--brand);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text-body);
    cursor: pointer;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: var(--bg-subtle);
}

.user-dropdown-item span:first-child {
    width: 18px;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

.user-dropdown-debug {
    color: var(--text-muted);
}

.user-dropdown-signout {
    color: var(--danger);
}

.user-dropdown-signout:hover {
    background: #fce4e4;
}

.agent-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.agent-dot-running {
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
    animation: agent-pulse 2s infinite;
}

.agent-dot-stopped {
    background: #ef5350;
}

.agent-dot-unknown {
    background: #999;
}

.agent-label {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

@keyframes agent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.app-tagline {
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.app-tagline span {
    color: #4dd0e1;
    font-weight: 600;
    font-style: italic;
}

/* ═══ Main Container ═══ */
.container {
    max-width: 1300px;
    margin: 0 auto;
    background: var(--bg-surface);
    color: var(--text-body);
    padding: 0 30px 30px;
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow-card);
}

.tab-debug {
    margin-left: auto;
    opacity: 0.5;
    font-style: italic;
}

.tab-debug:hover {
    opacity: 1;
}

h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 4px;
    color: #1565c0;
}

.info-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

h2 {
    margin-bottom: 20px;
    color: #34495e;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.section {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-input);
    color: var(--text-body);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.18);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.refresh-btn {
    margin-bottom: 15px;
}

.status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

#recipientsList {
    margin-top: 20px;
}

.recipient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.recipient-info {
    flex: 1;
}

.recipient-name {
    font-weight: 500;
    color: #2c3e50;
}

.recipient-handle {
    color: #666;
    font-size: 14px;
}

.delete-btn {
    background-color: #e74c3c;
    padding: 5px 15px;
    font-size: 12px;
}

.delete-btn:hover {
    background-color: #c0392b;
}

#historyList {
    margin-top: 20px;
}

.history-item {
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.history-item.failed {
    border-left-color: #e74c3c;
}

.history-item.sent {
    border-left-color: #27ae60;
}

.history-item.sending {
    border-left-color: #f39c12;
}

.history-item.queued {
    border-left-color: #95a5a6;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-recipient {
    font-weight: 500;
    color: #2c3e50;
}

.history-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.history-status.queued {
    background-color: #95a5a6;
    color: white;
}

.history-status.sending {
    background-color: #f39c12;
    color: white;
}

.history-status.sent {
    background-color: #27ae60;
    color: white;
}

.history-status.failed {
    background-color: #e74c3c;
    color: white;
}

.history-body {
    margin: 10px 0;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.history-meta {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.history-error {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 12px;
}

.history-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e6ed;
}

.history-summary-stat {
    font-size: 13px;
    color: #666;
}

.history-summary-stat.stat-sent strong { color: #27ae60; }
.history-summary-stat.stat-failed strong { color: #e74c3c; }
.history-summary-stat.stat-queued strong { color: #f39c12; }

.history-error-badge {
    background: #f8d7da;
    color: #c62828;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
}

/* Log Viewer Styles */
.log-status-indicator {
    font-size: 12px;
    font-weight: normal;
    margin-left: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.log-status-connected {
    color: #27ae60;
}

.log-status-disconnected {
    color: #95a5a6;
}

.log-status-error {
    color: #e74c3c;
}

.log-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.log-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.logs-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #1e1e1e;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 12px;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.log-entry {
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid;
    background-color: #2d2d2d;
    color: #d4d4d4;
}

.log-entry.log-info {
    border-left-color: #3498db;
}

.log-entry.log-success {
    border-left-color: #27ae60;
    background-color: #1e3a1e;
}

.log-entry.log-warning {
    border-left-color: #f39c12;
    background-color: #3a2e1e;
}

.log-entry.log-error {
    border-left-color: #e74c3c;
    background-color: #3a1e1e;
}

.log-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11px;
}

.log-time {
    color: #858585;
    font-weight: 500;
}

.log-source {
    background-color: #007acc;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.log-level {
    margin-left: auto;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

.log-entry.log-info .log-level {
    color: #3498db;
}

.log-entry.log-success .log-level {
    color: #27ae60;
}

.log-entry.log-warning .log-level {
    color: #f39c12;
}

.log-entry.log-error .log-level {
    color: #e74c3c;
}

.log-message {
    color: #d4d4d4;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.log-metadata {
    margin-top: 8px;
    padding: 8px;
    background-color: #1a1a1a;
    border-radius: 3px;
    color: #858585;
    font-size: 11px;
    white-space: pre;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

.log-buttons {
    display: flex;
    gap: 10px;
}

.copy-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.copy-status.copy-status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.copy-status.copy-status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Status Tracker Styles */
.status-tracker {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-tracker h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.status-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background-color: white;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.status-step.status-pending {
    opacity: 0.6;
    border-color: #e0e0e0;
}

.status-step.status-active {
    border-color: #3498db;
    background-color: #e3f2fd;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    animation: pulse 2s infinite;
}

.status-step.status-completed {
    border-color: #27ae60;
    background-color: #d4edda;
}

.status-step.status-failed {
    border-color: #e74c3c;
    background-color: #f8d7da;
}

.step-indicator {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f0f0f0;
    font-size: 18px;
    font-weight: bold;
}

.status-step.status-pending .step-indicator {
    background-color: #f0f0f0;
    color: #999;
}

.status-step.status-active .step-indicator {
    background-color: #3498db;
    color: white;
    animation: spin 1s linear infinite;
}

.status-step.status-completed .step-indicator {
    background-color: #27ae60;
    color: white;
}

.status-step.status-failed .step-indicator {
    background-color: #e74c3c;
    color: white;
}

.step-content {
    flex: 1;
}

.step-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}

.status-step.status-pending .step-label {
    color: #999;
}

.step-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.status-step.status-pending .step-description {
    color: #bbb;
}

.step-time {
    color: #999;
    font-size: 11px;
    font-style: italic;
    margin-top: 4px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    }
    50% {
        box-shadow: 0 2px 12px rgba(52, 152, 219, 0.4);
    }
}

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

/* Diagnostics Styles */
.diagnostics {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
}

.diagnostics h4 {
    margin-bottom: 15px;
    color: #856404;
    font-size: 16px;
}

.diagnostic-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diagnostic-item {
    padding: 8px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.diagnostic-item strong {
    color: #856404;
    display: inline-block;
    min-width: 180px;
}

.diagnostic-item .status-good {
    color: #27ae60;
    font-weight: 600;
}

.diagnostic-item .status-bad {
    color: #e74c3c;
    font-weight: 600;
}

.diagnostic-logs {
    margin-top: 8px;
    margin-left: 20px;
    list-style-type: none;
    padding: 0;
}

.diagnostic-logs li {
    padding: 4px 8px;
    margin: 4px 0;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}

.diagnostic-logs .log-info {
    background-color: #e3f2fd;
    color: #1565c0;
}

.diagnostic-logs .log-success {
    background-color: #d4edda;
    color: #155724;
}

.diagnostic-logs .log-error {
    background-color: #f8d7da;
    color: #721c24;
}

.diagnostic-logs .log-error-detail {
    background-color: #fff;
    color: #721c24;
    margin-left: 20px;
    font-size: 11px;
    border-left: 2px solid #e74c3c;
    padding-left: 12px;
}

.diagnostic-tips {
    background-color: #e7f3ff;
    border-left-color: #2196f3;
}

.diagnostic-tips strong {
    color: #1565c0;
}

.diagnostic-tips ul {
    margin-top: 8px;
    margin-left: 20px;
    list-style-type: disc;
}

.diagnostic-tips li {
    margin: 4px 0;
    color: #333;
    font-size: 13px;
}

.diagnostic-error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* ═══ Tab Bar ═══ */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 28px;
    overflow-x: auto;
    padding-top: 5px;
    background: var(--bg-subtle);
}

.tab-btn {
    background: none;
    color: var(--text-faint);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border-radius: 0;
    margin-bottom: -2px;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(52, 152, 219, 0.05);
}

.tab-btn.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    background: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ═══ Shared CRM Styles ═══ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    color: #1a2b3c;
    font-size: 20px;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-primary {
    background-color: #1a73e8;
    color: white;
    box-shadow: 0 1px 3px rgba(26,115,232,0.3);
}
.btn-primary:hover {
    background-color: #1557b0;
    box-shadow: 0 2px 6px rgba(26,115,232,0.35);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}
.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}
.btn-success:hover {
    background-color: #219a52;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}
.btn-danger:hover {
    background-color: #c0392b;
}

.btn-ghost {
    background: none;
    color: #3498db;
    padding: 4px 8px;
}
.btn-ghost:hover {
    background-color: #edf2f7;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* Forms */
.inline-form {
    background-color: #f8fafc;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.inline-form h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.form-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    flex: 1;
    min-width: 150px;
}

.form-input-full {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.form-help {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.list-card {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.list-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 14px rgba(26,115,232,0.12);
    transform: translateY(-1px);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.list-card-header h4 {
    margin: 0;
    color: #2c3e50;
}

.list-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.list-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: #3498db;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-danger {
    background-color: #e74c3c;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin-top: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background-color: #f1f4f8;
    color: #4a5568;
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e6ed;
    white-space: nowrap;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.data-table tr:hover {
    background-color: #f7f9fc;
}

.data-table tr.opted-out {
    opacity: 0.5;
}

.data-table tr.overdue {
    background-color: #fff5f5;
}

.table-footer {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

/* Stage Badges */
.stage-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.stage-badge.stage-lead { background-color: #e3f2fd; color: #1565c0; }
.stage-badge.stage-contacted { background-color: #fff3e0; color: #e65100; }
.stage-badge.stage-engaged { background-color: #e8f5e9; color: #2e7d32; }
.stage-badge.stage-meeting_set { background-color: #f3e5f5; color: #7b1fa2; }
.stage-badge.stage-closed_won { background-color: #e8f5e9; color: #1b5e20; }
.stage-badge.stage-closed_lost { background-color: #fce4ec; color: #c62828; }

/* Stage Select */
.stage-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    width: auto;
}

.stage-select.stage-lead { border-color: #90caf9; background-color: #e3f2fd; }
.stage-select.stage-contacted { border-color: #ffcc80; background-color: #fff3e0; }
.stage-select.stage-engaged { border-color: #a5d6a7; background-color: #e8f5e9; }
.stage-select.stage-meeting_set { border-color: #ce93d8; background-color: #f3e5f5; }
.stage-select.stage-closed_won { border-color: #81c784; background-color: #e8f5e9; }
.stage-select.stage-closed_lost { border-color: #ef9a9a; background-color: #fce4ec; }

/* ═══ Campaign Styles ═══ */
.campaign-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.campaign-status.status-draft { background-color: #e3f2fd; color: #1565c0; }
.campaign-status.status-sending { background-color: #fff3e0; color: #e65100; }
.campaign-status.status-paused { background-color: #fce4ec; color: #c62828; }
.campaign-status.status-completed { background-color: #e8f5e9; color: #1b5e20; }

.campaign-stats {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 16px 28px;
    text-align: center;
    min-width: 100px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-card.stat-success { border-color: #a5d6a7; background: #e8f5e9; }
.stat-card.stat-danger { border-color: #ef9a9a; background: #fce4ec; }
.stat-card.stat-info { border-color: #90caf9; background: #e3f2fd; }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-lg {
    height: 14px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #27ae60);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-label {
    display: block;
    text-align: center;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Campaign Form */
.campaign-form {
    max-width: 700px;
}

.campaign-form .form-group {
    margin-bottom: 20px;
}

.campaign-form label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.campaign-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.template-vars {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.template-vars small {
    color: #666;
    margin: 0;
}

.var-btn {
    background-color: #edf2f7;
    color: #3498db;
    border: 1px solid #bee3f8;
    padding: 3px 8px;
    font-size: 11px;
    font-family: 'Monaco', 'Menlo', monospace;
    border-radius: 3px;
}

.var-btn:hover {
    background-color: #bee3f8;
}

.campaign-template-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
}

.campaign-template-display h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.template-text {
    white-space: pre-wrap;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* Preview */
.preview-panel {
    background: #f0f8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.preview-panel h4 {
    color: #2c3e50;
    margin-bottom: 12px;
}

.preview-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.preview-header {
    margin-bottom: 6px;
    font-size: 13px;
}

.preview-body {
    white-space: pre-wrap;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Response select */
.response-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    width: auto;
}

.response-select.response-pending { border-color: #ddd; }
.response-select.response-sent { border-color: #90caf9; background-color: #e3f2fd; }
.response-select.response-responded { border-color: #81c784; background-color: #e8f5e9; }
.response-select.response-no_response { border-color: #ffcc80; background-color: #fff3e0; }
.response-select.response-opted_out { border-color: #ef9a9a; background-color: #fce4ec; }

/* Send status badges */
.send-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.send-status.status-queued { background-color: #e0e0e0; color: #616161; }
.send-status.status-sending { background-color: #fff3e0; color: #e65100; }
.send-status.status-sent { background-color: #e8f5e9; color: #1b5e20; }
.send-status.status-failed { background-color: #fce4ec; color: #c62828; }
.send-status.status-pending { background-color: #f5f5f5; color: #999; }

/* ═══ Pipeline Styles ═══ */
.pipeline-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pipeline-filters .form-input {
    max-width: 250px;
}

.pipeline-summary {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pipeline-stage-card {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 12px 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.pipeline-stage-card.stage-lead { background: #e3f2fd; border-color: #90caf9; }
.pipeline-stage-card.stage-contacted { background: #fff3e0; border-color: #ffcc80; }
.pipeline-stage-card.stage-engaged { background: #e8f5e9; border-color: #a5d6a7; }
.pipeline-stage-card.stage-meeting_set { background: #f3e5f5; border-color: #ce93d8; }
.pipeline-stage-card.stage-closed_won { background: #e8f5e9; border-color: #81c784; }
.pipeline-stage-card.stage-closed_lost { background: #fce4ec; border-color: #ef9a9a; }

.stage-count {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.stage-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

.notes-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-text {
    font-size: 12px;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-muted {
    color: #999;
}

/* ═══ Pipeline Campaign Cards ═══ */
.pipeline-section {
    margin-bottom: 24px;
}

.pipeline-section h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pipeline-count {
    font-size: 12px;
    background: #e0e6ed;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.pipeline-section-active h4 { color: #e65100; }
.pipeline-section-active .pipeline-count { background: #fff3e0; color: #e65100; }
.pipeline-section-completed h4 { color: #1b5e20; }
.pipeline-section-completed .pipeline-count { background: #e8f5e9; color: #1b5e20; }

.pipeline-campaign-card {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.pipeline-campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.pipeline-campaign-header:hover {
    background: #f8f9fa;
}

.pipeline-campaign-info {
    flex: 1;
}

.pipeline-campaign-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.expand-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
    display: inline-block;
}

.expand-arrow.expanded {
    transform: rotate(90deg);
}

.pipeline-campaign-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

.pipeline-campaign-stats {
    display: flex;
    gap: 12px;
}

.pipeline-mini-stat {
    text-align: center;
    min-width: 50px;
}

.mini-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

.mini-stat-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
}

.pipeline-mini-stat.stat-success .mini-stat-value { color: #27ae60; }
.pipeline-mini-stat.stat-danger .mini-stat-value { color: #e74c3c; }
.pipeline-mini-stat.stat-info .mini-stat-value { color: #1a73e8; }

.pipeline-contacts-container {
    border-top: 1px solid #e8edf2;
    padding: 12px 16px;
    background: #fafbfc;
}

.pipeline-contacts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pipeline-contacts-loading,
.pipeline-contacts-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.pipeline-contact-table {
    font-size: 13px;
}

.stage-select.stage-sm {
    font-size: 12px;
    padding: 4px 6px;
}

.skipped-row {
    background: #fff8e1 !important;
    opacity: 0.7;
}

.message-preview {
    max-width: 250px;
    font-size: 12px;
    color: #555;
}

/* Import results */
.import-results {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 4px;
    padding: 12px;
    margin-top: 10px;
    font-size: 13px;
}

.import-results details {
    margin-top: 8px;
}

.import-results summary {
    cursor: pointer;
    color: #c62828;
    font-weight: 500;
}

.import-results ul {
    margin-top: 5px;
    padding-left: 20px;
    font-size: 12px;
    color: #666;
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 15px;
}

/* Error message */
.error {
    color: #c62828;
    padding: 15px;
    background: #fce4ec;
    border-radius: 4px;
}

/* ═══ Contact Summary Bar ═══ */
.contact-summary {
    background: linear-gradient(135deg, #f0f4f8, #e3edf7);
    border: 1px solid #d0dbe8;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.summary-main {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.summary-total {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

.summary-total small {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    display: inline;
    margin: 0;
}

.summary-opted-out {
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
}

.summary-stages {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.summary-stat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: white;
    border: 1px solid #ddd;
}

.summary-stat.stage-lead { border-color: #90caf9; color: #1565c0; }
.summary-stat.stage-contacted { border-color: #ffcc80; color: #e65100; }
.summary-stat.stage-engaged { border-color: #a5d6a7; color: #2e7d32; }
.summary-stat.stage-meeting_set { border-color: #ce93d8; color: #7b1fa2; }
.summary-stat.stage-closed_won { border-color: #81c784; color: #1b5e20; }
.summary-stat.stage-closed_lost { border-color: #ef9a9a; color: #c62828; }

.summary-groups {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.summary-group-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s;
}

.summary-group-badge:hover {
    opacity: 0.8;
}

.summary-group-all {
    background-color: #95a5a6 !important;
}

/* Group badges (small, in tables) */
.group-badge-sm {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    margin-right: 3px;
}

/* ═══ Modal ═══ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 14px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Checkbox in tables */
.contact-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ═══ Campaign Dashboard Tiles ═══ */
.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.dash-tile {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dash-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.dash-tile-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.dash-tile-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.dash-tile-active {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
}
.dash-tile-active .dash-tile-value { color: #e65100; }

.dash-tile-draft {
    border-color: #90caf9;
    background: linear-gradient(135deg, #e8f4fd, #e3f2fd);
}
.dash-tile-draft .dash-tile-value { color: #1565c0; }

.dash-tile-sent {
    border-color: #81c784;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e9);
}
.dash-tile-sent .dash-tile-value { color: #2e7d32; }

.dash-tile-queued {
    border-color: #ce93d8;
    background: linear-gradient(135deg, #f3e5f5, #ede7f6);
}
.dash-tile-queued .dash-tile-value { color: #7b1fa2; }

.dash-tile-responded {
    border-color: #4dd0e1;
    background: linear-gradient(135deg, #e0f7fa, #e0f2f1);
}
.dash-tile-responded .dash-tile-value { color: #00838f; }

.dash-tile-rate {
    border-color: #ffb74d;
    background: linear-gradient(135deg, #fff8e1, #fff3e0);
}
.dash-tile-rate .dash-tile-value { color: #ef6c00; }

.dash-tile-failed {
    border-color: #ef9a9a;
    background: linear-gradient(135deg, #fce4ec, #ffebee);
}
.dash-tile-failed .dash-tile-value { color: #c62828; }

/* ═══ Send Limits Bar ═══ */
.send-limits-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f0f8ff;
    border: 1px solid #c4d7f2;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 13px;
}

.send-limits-bar.send-limits-warning {
    background: #fff8e1;
    border-color: #ffcc80;
}

.send-limits-info {
    display: flex;
    gap: 24px;
    flex: 1;
    flex-wrap: wrap;
}

.send-limit-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.send-limit-label {
    color: #666;
    font-weight: 500;
}

.send-limit-value {
    font-weight: 700;
    color: #2c3e50;
}

.send-limit-remaining {
    color: #888;
    font-size: 12px;
}

.send-limit-progress {
    width: 120px;
    flex-shrink: 0;
}

.progress-fill-warn {
    background: linear-gradient(90deg, #ff9800, #ffc107) !important;
}

.progress-fill-danger {
    background: linear-gradient(90deg, #e74c3c, #ff5722) !important;
}

/* ═══ Send Settings Panel ═══ */
.send-settings-card {
    background: #f8fafc;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.send-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.send-settings-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.send-settings-description {
    margin-bottom: 16px;
}

.send-settings-description p {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.send-settings-fields {
    margin-bottom: 16px;
}

.send-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.send-setting-row:last-child {
    border-bottom: none;
}

.send-setting-info {
    flex: 1;
}

.send-setting-info label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.send-setting-info small {
    color: #777;
    font-size: 12px;
    line-height: 1.4;
}

.send-settings-usage {
    display: flex;
    gap: 24px;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    margin-bottom: 14px;
}

.send-settings-tips {
    background: #e7f3ff;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 12px;
    line-height: 1.5;
}

.send-settings-tips strong {
    color: #1565c0;
}

.send-settings-tips ul {
    margin: 8px 0 0 0;
    padding-left: 18px;
}

.send-settings-tips li {
    margin-bottom: 4px;
    color: #333;
}

/* ═══ Campaign Create Info Banner ═══ */
.send-limits-info-banner {
    background: #e7f3ff;
    border: 1px solid #90caf9;
    border-left: 4px solid #1a73e8;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.send-limits-info-banner strong {
    color: #1565c0;
}

.send-limits-info-banner a {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: underline;
}

/* ═══ Search & Filter Bar ═══ */
.search-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="text"].search-input {
    flex: 1;
    min-width: 220px;
    padding: 9px 14px 9px 38px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 13px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"].search-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.filter-select {
    padding: 9px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 13px;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

/* ═══ Opt-Out Toggle Checkboxes ═══ */
.opt-out-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opt-out-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    margin: 0;
}

.opt-out-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #e74c3c;
}

.opt-out-toggle input[type="checkbox"]:checked + .opt-out-label {
    color: #e74c3c;
    font-weight: 600;
}

.opt-out-label {
    color: #888;
    font-weight: 400;
}

/* ═══ Zohn AI Assistant Chat ═══ */
.ai-chat-container {
    display: flex;
    gap: 0;
    height: calc(100vh - 220px);
    min-height: 500px;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    overflow: hidden;
}

.ai-chat-sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #0f2027, #203a43);
    color: white;
    padding: 22px 18px;
    overflow-y: auto;
}

.ai-chat-sidebar h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #4dd0e1;
}

.ai-description {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    line-height: 1.5;
}

.ai-description strong {
    color: #4dd0e1;
}

.ai-sidebar-section {
    margin-bottom: 12px;
}

.ai-topics {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
}

.ai-topics li {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    padding: 4px 0 4px 14px;
    position: relative;
}

.ai-topics li::before {
    content: "\2022";
    color: #4dd0e1;
    position: absolute;
    left: 0;
}

.ai-quick-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ai-quick-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.ai-quick-btn:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.ai-quick-btn-support {
    border-color: rgba(77, 208, 225, 0.3);
    background: rgba(77, 208, 225, 0.08);
}

.ai-quick-btn-support:hover {
    background: rgba(77, 208, 225, 0.18);
}

.ai-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

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

.ai-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.ai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message-assistant {
    align-self: flex-start;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.ai-message-assistant .ai-message-avatar {
    background: linear-gradient(135deg, #1a73e8, #4dd0e1);
    color: white;
}

.ai-message-user .ai-message-avatar {
    background: #2c3e50;
    color: white;
}

.ai-message-content {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ai-message-user .ai-message-content {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.ai-message-content p {
    margin: 0 0 8px 0;
}

.ai-message-content p:last-child {
    margin-bottom: 0;
}

.ai-message-content ul, .ai-message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.ai-message-content li {
    margin-bottom: 4px;
}

.ai-message-content code {
    background: rgba(0,0,0,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.ai-message-content strong {
    font-weight: 600;
}

.ai-error {
    color: #e74c3c;
    font-style: italic;
}

.ai-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 14px 16px;
}

.typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a73e8;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.ai-chat-input-area {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e0e6ed;
}

.ai-chat-input-area textarea {
    flex: 1;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.ai-chat-input-area textarea:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.ai-send-btn {
    align-self: flex-end;
    min-width: 70px;
}

/* AI response headers */
.ai-message-content h3,
.ai-message-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    margin: 12px 0 6px 0;
}

.ai-message-content h3:first-child,
.ai-message-content h4:first-child {
    margin-top: 0;
}

/* ═══ Template Picker ═══ */
.template-picker {
    margin-bottom: 10px;
}

.template-picker-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.template-picker-header label {
    font-weight: 500;
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
}

.template-picker-actions {
    display: flex;
    gap: 8px;
    flex: 1;
}

/* ═══ AI Template Assistance ═══ */
.campaign-ai-assist {
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    border: 1px solid #c4d7f2;
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
}

.ai-assist-header {
    margin-bottom: 8px;
}

.ai-assist-label {
    font-size: 13px;
    font-weight: 700;
    color: #1a73e8;
    letter-spacing: 0.3px;
}

.ai-assist-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-btn {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(26,115,232,0.3);
}

.ai-btn:hover {
    background: linear-gradient(135deg, #1557b0, #1a73e8);
    box-shadow: 0 2px 6px rgba(26,115,232,0.4);
}

.ai-template-btns {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ═══ AI Suggestion Panel ═══ */
.ai-suggestion-panel {
    margin-top: 12px;
}

.ai-suggestion {
    background: white;
    border: 2px solid #1a73e8;
    border-radius: 10px;
    padding: 16px;
}

.ai-suggestion-header h4 {
    margin: 0 0 10px 0;
    color: #1a73e8;
    font-size: 14px;
}

.ai-suggestion-body {
    margin-bottom: 10px;
}

.ai-suggested-text {
    background: #f8fafc;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    margin: 0;
}

.ai-suggestion-explanation {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    padding: 8px 10px;
    background: #f0f8ff;
    border-radius: 4px;
}

.ai-suggestion-actions {
    display: flex;
    gap: 8px;
}

.ai-loading {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px;
    font-size: 13px;
    color: #1a73e8;
    font-weight: 500;
}

.ai-error-panel {
    padding: 12px;
    background: #fce4ec;
    color: #c62828;
    border-radius: 6px;
    font-size: 13px;
}

/* ═══ Wider Modal for Template Manager ═══ */
.modal-content-lg {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

/* ═══ AI Tab Button Styling ═══ */
.tab-btn[data-tab="ai-assistant"].active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

/* ═══ Dashboard Tab ═══ */
.dashboard-title {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 8px;
}

.dashboard-section {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e8edf2;
}

.dashboard-section h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 14px;
    font-weight: 600;
}

.dashboard-tiles-sm .dash-tile {
    min-width: 100px;
    padding: 12px 14px;
}

.dashboard-tiles-sm .dash-tile-value {
    font-size: 22px;
}

.dash-tile-completed {
    border-left: 3px solid #27ae60;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.overdue-row {
    background-color: #fff5f5 !important;
}

.text-muted {
    color: #999;
    font-style: italic;
}

/* ═══ Templates Tab ═══ */
.template-form {
    max-width: 800px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.template-ai-section {
    margin-top: 15px;
    padding: 15px;
    background: #f0f4ff;
    border-radius: 8px;
    border: 1px solid #d6e0f5;
}

.template-detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 20px;
}

.template-detail-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e6ed;
}

.template-detail-card h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #555;
}

.template-body-display {
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.7;
    color: #333;
    font-size: 14px;
}

.template-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.meta-item {
    font-size: 13px;
    color: #666;
}

.meta-item strong {
    color: #444;
}

.template-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.template-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-usage-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e0e6ed;
}

.template-usage-summary h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #555;
}

.usage-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.usage-stat {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e6ed;
}

.usage-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a73e8;
}

.usage-stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.template-usage-history {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e0e6ed;
}

.template-usage-history h4 {
    margin-bottom: 12px;
    font-size: 15px;
    color: #555;
}

.usage-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.usage-item {
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e8edf2;
    border-left: 3px solid #1a73e8;
}

.usage-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.usage-action-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
}

.usage-item-date {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.badge-text {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-active {
    background: #fff3e0;
    color: #e65100;
    font-weight: 600;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
}

.action-cell {
    white-space: nowrap;
}

/* ═══ Campaign Form Compact ═══ */
.campaign-form-compact {
    max-width: 850px;
}

.campaign-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.campaign-schedule-compact {
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 12px;
}

.schedule-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.schedule-row .form-group {
    flex: 1;
    min-width: 110px;
    margin-bottom: 0;
}

.schedule-row label {
    font-size: 12px;
    margin-bottom: 3px;
}

.time-picker-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-picker-row select {
    width: auto;
    min-width: 55px;
    padding: 8px 6px;
    font-size: 13px;
}

.time-sep {
    font-weight: 700;
    font-size: 16px;
    color: #555;
}

.send-limits-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    background: #fff8f0;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #795548;
}

.limit-tag strong {
    color: #e65100;
}

.limit-settings-link {
    margin-left: auto;
    font-size: 12px;
    color: #1a73e8;
}

.schedule-badge {
    font-size: 12px;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.batch-info {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.status-scheduled {
    background-color: #e3f2fd;
    color: #1565c0;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .campaign-form-grid {
        grid-template-columns: 1fr;
    }
    .schedule-row {
        flex-direction: column;
    }
    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

/* ═══ Campaign Template Selector ═══ */
.template-select-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.template-select-row select {
    flex: 1;
}

.template-preview-box {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e6ed;
    border-left: 3px solid #1a73e8;
    border-radius: 6px;
}

.template-preview-body {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    color: #444;
}

.template-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.template-hint a {
    color: #1a73e8;
}

/* ═══ Trash Icon Button ═══ */
.btn-danger.btn-sm[title*="Delete"] {
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    background: none;
    border: none;
    color: #e74c3c;
    box-shadow: none;
}

.btn-danger.btn-sm[title*="Delete"]:hover {
    background: none;
    color: #c0392b;
}

/* ═══ Contacts Tab — Panel Layout ═══ */
.contacts-top-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.contacts-panel {
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 24px;
}

.contacts-panel-groups {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    border: 1px solid #c5d5f7;
}

.contacts-panel-lists {
    background: linear-gradient(135deg, #f5f9f5 0%, #eaf4ea 100%);
    border: 1px solid #c5dfc5;
}

.contacts-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.contacts-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px 0;
    border: none;
    padding: 0;
}

.contacts-panel-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
    max-width: 600px;
}

.contacts-panel .card-grid {
    margin-top: 4px;
}

.contacts-panel .group-card {
    background: white;
    border: 1px solid #d6e0f5;
}

.contacts-panel-lists .list-card {
    background: white;
    border: 1px solid #c5dfc5;
}

/* ═══ Add to Group Modal ═══ */
.modal-content-xl {
    max-width: 950px;
    width: 95vw;
}

.add-group-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.add-group-filters .search-input {
    flex: 2;
    min-width: 200px;
}

.add-group-filters .filter-select {
    flex: 1;
    min-width: 120px;
}

.add-group-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 6px 0;
    margin-bottom: 6px;
    font-size: 13px;
}

/* ═══ Group Detail ═══ */
.group-description {
    color: #666;
    font-size: 13px;
    margin: -8px 0 16px 0;
    padding-left: 2px;
}

/* ═══ Skipped Contacts (Opt-out) ═══ */
.skipped-contacts-banner {
    margin-top: 20px;
    padding: 16px 20px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffa000;
    border-radius: 6px;
}

.skipped-header {
    font-size: 15px;
    color: #e65100;
    margin-bottom: 6px;
}

.skipped-contacts-banner p {
    font-size: 13px;
    color: #795548;
    margin-bottom: 10px;
}

.skipped-table {
    background: white;
}

.badge-skipped {
    background: #fff3e0;
    color: #e65100;
    font-weight: 600;
    font-size: 11px;
}

.stat-skipped {
    border-left: 3px solid #ffa000;
    background: #fff8e1;
}

.stat-skipped .stat-number {
    color: #e65100;
}

/* ═══ Server Search Result Badge ═══ */
.badge-search {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 4px;
}

.server-result {
    background: #f8fbff !important;
}

/* ═══ Duplicate Resolution Modal ═══ */
.dup-description {
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
}

.dup-table td {
    vertical-align: middle;
}

.dup-field-label {
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.dup-diff {
    background: #fffde7 !important;
}

.dup-merge-input {
    font-size: 13px;
    padding: 6px 8px;
}

.dup-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.source-tag {
    background: #e8edf2;
    color: #555;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

/* ═══ Edit Contact Modal ═══ */
.edit-contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.edited-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 3px solid #ffa000;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #e65100;
    margin-bottom: 15px;
}

.badge-edited {
    background: #fff3e0;
    color: #e65100;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 4px;
}

@media (max-width: 900px) {
    .template-detail-grid {
        grid-template-columns: 1fr;
    }
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    .edit-contact-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* ═══ Dashboard greeting ═══ */
.dashboard-greeting {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}
.dashboard-greeting h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    border: none;
    padding: 0;
}
.greeting-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ═══ Recent activity widget ═══ */
.recent-activity {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
}
.recent-activity li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 13px;
}
.recent-activity li:last-child { border-bottom: none; }
.activity-time {
    flex-shrink: 0;
    width: 90px;
    color: var(--text-faint);
    font-size: 12px;
}
.activity-msg {
    color: var(--text-body);
}

/* ═══ Profile form ═══ */
.profile-form {
    max-width: 760px;
    margin-top: 16px;
}
.profile-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.profile-form .form-group {
    margin-bottom: 14px;
}
.profile-form label small {
    color: var(--text-faint);
    font-weight: 400;
    margin-left: 4px;
}
.profile-intro {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
    max-width: 760px;
}
.profile-intro code {
    background: var(--bg-subtle);
    color: var(--text-primary);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
}
.profile-vars-help {
    margin-top: 32px;
    padding: 16px 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 760px;
}
.profile-vars-help h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-primary);
}
.profile-vars-help ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-body);
}
.profile-vars-help li {
    margin: 4px 0;
}
.profile-vars-help code {
    background: var(--bg-surface);
    color: var(--brand);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
}

@media (max-width: 700px) {
    .profile-form .form-row-2 { grid-template-columns: 1fr; }
}
