/* Avra's shared calm palette. Loaded after page styles so every workspace agrees. */
:root {
    --avra-canvas: #f3f5f1;
    --avra-paper: #fffefb;
    --avra-soft: #eef3ee;
    --avra-border: #dce4dc;
    --avra-ink: #30433f;
    --avra-muted: #64756d;
    --avra-primary: #496b5e;
    --avra-primary-hover: #3b594e;
    --avra-sage: #dfebe1;
    --avra-blue: #557183;
    --avra-blue-soft: #eaf0f3;
    --avra-warning: #8a682f;
    --avra-danger: #a24949;
    --avra-shadow: 0 5px 18px rgba(48, 67, 63, .035);
    color-scheme: light;
    background: var(--avra-canvas);
    color: var(--avra-ink);
}
body { background: var(--avra-canvas); color: var(--avra-ink); }
body .top { background: #fff; border-color: var(--avra-border); }
body :is(h1,h2,h3,h4,strong) { color: inherit; }
body :is(h1,h2,h3) { color: var(--avra-ink); }
body :is(.muted,.review-note,.small-copy,.profile-preview-caption,.profile-last-sync,.preview-disclaimer) { color: var(--avra-muted); }
body :is(.eyebrow,.avra-eyebrow,.text-link,.text-button,.profile-preview-title,.preview-title span) { color: var(--avra-primary); }
body a:not(.btn):not(.avra-open-workspace):focus-visible,
body button:focus-visible { outline: 3px solid #9bb9a7; outline-offset: 3px; }
body :is(.card,.business-card,.avra-business-card,.wizard-main,.template-card,.template-item,.template-stat,.stat-card,.overview-metric,.account-chip,.traffic-card,.consent-stat,.template-builder-section,.template-builder-steps,.wizard-steps) {
    background-color: var(--avra-paper);
    border-color: var(--avra-border);
    box-shadow: var(--avra-shadow);
}
body .btn, body .avra-open-workspace {
    background: var(--avra-primary);
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(48,67,63,.06);
}
body .btn:hover, body .avra-open-workspace:hover { background: var(--avra-primary-hover); }
body .btn.secondary { background: #e7eee7; color: #3c5e50 !important; box-shadow: none; }
body .btn.secondary:hover { background: #dce7dd; }
body .btn.ghost { background: transparent; color: var(--avra-primary) !important; box-shadow: none; }
body :is(button,input,select,textarea) { accent-color: var(--avra-primary); }
body :is(.field input,.field textarea,.field select,.profile-form-grid .field input,.profile-form-grid .field textarea,.profile-form-grid .field select,.single-phone-entry input,.single-phone-entry select,.report-filters input,.report-filters select,.template-toolbar input,.template-toolbar select,.date-filter input,.date-filter select) {
    background: #fffffd;
    border-color: #d3ded5;
    color: var(--avra-ink);
}
body :is(input,textarea)::placeholder { color: #7c8981; opacity: 1; }
body :is(input,select,textarea):focus-visible,
body .profile-form-grid :is(input,textarea,select):focus {
    border-color: #7b9d89;
    outline: 2px solid #d3e3d7;
    outline-offset: 1px;
    box-shadow: none;
}
body :is(.status,.pill-green,.consent-status.opted-in) { background: #e4eee4; color: #3a614a; }
body :is(.pill,.pill-muted) { background: #edf0ea; color: #57695d; }
body .pill-green { background: #e4eee4; color: #3a614a; }
body :is(.pill-red,.error-box) { background: #f8eeeb; color: #954343; border-color: #e7cfca; }
body :is(.error,.danger-link,.revoke,.danger-link.text-button) { color: var(--avra-danger); }
body :is(.profile-notice,.media-note) { background: #f7f2e8; color: var(--avra-warning); border-color: #e5d9be; }
body :is(.status-dot.is-active,.avra-status-indicator.is-connected) { background: #688f74; }
body .avra-status-indicator.is-connected { box-shadow: 0 0 0 3px #e5eee6; }
body :is(.status-dot.is-paused,.avra-status-indicator.is-paused) { background: #b49762; }

/* Landing page: the brand stays prominent on a quiet sage canvas. */
body .avra-dashboard-hero {
    background: linear-gradient(115deg,#e5eee5,#eff3e9 68%,#e6eef0);
    color: var(--avra-ink);
    border-color: #d7e2d6;
    box-shadow: var(--avra-shadow);
}
body .avra-dashboard-hero::after { border-color: #cadbcd; box-shadow: 0 0 0 38px rgba(151,180,157,.045),0 0 0 78px rgba(151,180,157,.025); }
body .avra-dashboard-hero h1 { color: #304c3e; }
body .avra-dashboard-hero .avra-eyebrow { color: #506e59; }
body .avra-dashboard-hero .avra-hero-copy p:last-child { color: #5b7061; }
body .avra-hero-mark { background: linear-gradient(135deg,#d3e5d6,#d9e4e8); color: #3d6150; box-shadow: none; }
body .avra-add-business { background: rgba(255,255,255,.45); color: #526d5d; border-color: #c8d8ca; }
body .avra-add-business:hover { background: #f5f8f1; border-color: #a9c0ae; }
body .avra-add-business span { color: #526d5d; }
body :is(.avra-business-title h3,.avra-section-heading h2,.avra-channel-detail strong) { color: var(--avra-ink); }
body .avra-card-accent { background: linear-gradient(90deg,#91b19a,#a2b5bb 72%,#b6bdad); height: 3px; }
body .avra-business-card.needs-setup .avra-card-accent { background: #c8b489; }
body .avra-business-card:hover { box-shadow: 0 9px 20px rgba(48,67,63,.06); transform: translateY(-1px); }
body :is(.avra-business-monogram,.business-avatar,.empty-mark) { background: #e5eee2; color: #4d7057; border-color: #d5e3d5; }
body :is(.avra-channel-icon,.channel-symbol) { background: #e9efeb; color: #587a67; }
body :is(.avra-connection-status,.avra-channel-badge.is-connected) { color: #4a7055; }
body .avra-channel-badge.is-connected { background: #e7f0e6; }
body :is(.avra-channel-list,.avra-channel-row,.avra-setup-row) { border-color: #e5ebe3; }
body .avra-count-label { background: #fafbf6; border-color: var(--avra-border); color: var(--avra-muted); }
body .avra-empty-workspace { background: linear-gradient(115deg,#fffefb,#eef4ec); border-color: var(--avra-border); }
body .avra-empty-icon { background: #e2ede1; color: #4a7055; }
body .avra-empty-workspace .btn { background: var(--avra-primary); }

/* Shared navigation and the dedicated profile sidebar. */
body .product-nav { background: var(--avra-paper); border-color: var(--avra-border); }
body .product-nav a { color: #627468; }
body .product-nav a.active { color: #3d6651; }
body .profile-workspace-shell>.workspace-sidebar { background: var(--avra-paper); border-color: var(--avra-border); box-shadow: var(--avra-shadow); }
body .profile-workspace-shell .sidebar-product { background: #5b7b68; color: #fff; }
body .profile-workspace-shell .product-nav a { color: #607163; }
body .profile-workspace-shell .product-nav a.active { background: #e5eee2; color: #3b634b; }
body .profile-workspace-shell .product-nav a:hover { background: #eff4eb; }

/* Reporting, campaigns, contacts and message setup. */
body :is(.overview-panel,.notice-card,.dashboard-note,.overview-actions,.report-filters,.campaign-overview,.bulk-import-card,.contact-import-card,.template-readonly,.template-preview,.setup-callout) { background: #eef3ed; border-color: var(--avra-border); }
body :is(.metric-blue,.metric-cyan) { color: #597b8a; }
body .metric-green { color: #568060; }
body .metric-violet { color: #83778e; }
body .metric-amber { color: #a28650; }
body .metric-red { color: #ac7270; }
body :is(.bar-in,.legend-in) { background: #8caeb6; }
body :is(.bar-out,.legend-out) { background: #8eac91; }
body :is(.report-table th,.contacts-table th,.report-footnote,.report-table-head,.campaign-recipients thead) { background: #f4f6ef; color: #647563; }
body :is(.report-table th,.report-table td,.contacts-table th,.contacts-table td,.recipient-row,.campaign-row,.consent-card,.profile-card-heading) { border-color: #e4eae1; }
body .report-tabs a { color: #687a70; }
body .report-tabs a.active { color: var(--avra-primary); border-color: #6b8f78; }
body :is(.channel-quick-links a,.quick-actions a,.field-chip) { background: #eaf0e8; color: #4b6b55; }
body :is(.consent-stat.active,.consent-stat.selected) { border-color: #74967b; box-shadow: 0 0 0 1px #74967b; }
body .wizard-step.active { color: #456f5a; }
body .wizard-step.active>span, body .wizard-step.done>span { background: #62866e; border-color: #62866e; color: #fff; }
body .audience-type:has(input:checked) { background: #eef4ea; border-color: #8ca890; box-shadow: 0 0 0 1px #8ca890; }
body .audience-type-icon { background: #e5eeea; color: #557768; }
body .audience-type-icon.violet { background: #ede9f0; color: #83748e; }
body .audience-type-icon.orange { background: #f3ecdf; color: #a18a5e; }
body .wizard-tip { background: #eef3ed; color: #5c7262; border-left-color: #98b49c; }
body .wizard-tip strong { color: #415f4c; }
body :is(.wizard-tip a,.campaign-main a,.recipient-detail a) { color: #527c73; }
body :is(.review-grid>div,.audience-list,.audience-option,.wizard-controls,.wizard-step) { border-color: #e0e7dc; }

/* Templates: restrained status colours and soft selected states. */
body :is(.template-tab.active,.template-tab.active b,.template-actions a) { color: var(--avra-primary); border-color: #8ba58d; }
body .template-tab.active { background: #eaf1e5; }
body :is(.template-stat .stat-icon,.stat-blue .stat-icon) { background: #e8eef0; color: #5c7c89; }
body .stat-green .stat-icon { background: #e7efe4; color: #648464; }
body .stat-amber .stat-icon { background: #f6f0e4; color: #a08752; }
body .stat-red .stat-icon { background: #f5eae6; color: #aa7470; }
body :is(.template-category:has(input:checked),.template-category-card:has(input:checked),.format-choice:has(input:checked),.media-type-choice:has(input:checked),.template-subcategory:has(input:checked)) { background: #edf3e8; border-color: #8ca890; color: #456b52; box-shadow: none; }
body :is(.template-button-row,.template-builder-step,.template-edit-card,.template-form-card,.template-list-card) { border-color: var(--avra-border); }
body .template-button-row { background: #f2f6ed; }
body :is(.template-button-row-title,.builder-label,.template-preview-button) { color: #527660; }
body .message-tools :is(button,select) { color: #4e6958; border-color: #d8e2d4; background: #fffffc; }
body .message-tools button:hover { background: #edf3e8; }

/* Profile management and all phone previews share the same muted palette. */
body .profile-status-grid article { background: var(--avra-paper); border-color: var(--avra-border); }
body :is(.profile-stat-icon,.profile-section-icon,.profile-stat-icon.teal,.profile-section-icon.teal) { background: #e6eee4; color: #617f64; }
body .profile-stat-icon.violet { background: #ede9ed; color: #82758a; }
body .profile-stat-icon.amber { background: #f3eedf; color: #9b8455; }
body .profile-status-grid strong, body :is(.profile-card-heading h2,.profile-account-grid strong,.profile-form-grid .field label) { color: var(--avra-ink); }
body :is(.profile-account-grid div,.profile-display-note) { background: #f4f6ef; border-color: #e1e7db; }
body :is(.profile-photo-thumb,.profile-preview-photo) { background: linear-gradient(135deg,#e2ebdc,#e4ecea); color: #52765e; }
body .profile-photo-controls input::file-selector-button { background: #eaf1e5; color: #46684f; border-color: #d2dfcd; }
body .profile-photo-controls #profile-photo-name { color: #557a60; }
body .profile-save-row .btn { background: var(--avra-primary); }
body :is(.preview-column,.template-live-preview) { background: #f0f4ed; border-color: #dce5d7; }
body :is(.profile-phone,.template-phone,.phone-preview) { border-color: #414d48; background: #f2f4ed; box-shadow: 0 0 0 1px #8e9b91,0 0 0 3px #e2e8de,0 12px 25px rgba(48,67,63,.09); }
body :is(.phone-top,.template-phone-top,.profile-phone-top,.phone-contact,.template-phone-contact,.profile-phone-toolbar) { background: #526e63; color: #fff; }
body .profile-phone-cover { background: linear-gradient(115deg,#96b19b,#8da8a3 65%,#a3b6bd); }
body .profile-phone-body { background: #fffefb; }
body :is(.phone-chat,.template-phone-chat) { background-color: #f1f3ec; background-image: radial-gradient(circle,#dce3d5 .7px,transparent .9px),linear-gradient(145deg,#eef3e8,#f7f6ef 65%,#edf2ed); color: var(--avra-ink); }
body :is(.chat-bubble,.template-phone-chat>div,.phone-compose,.template-phone-compose) { background: #fffefb; color: #41564a; border-color: #dfe6d9; }
body :is(.preview-avatar,.template-preview-avatar) { background: #dce9da; color: #4a6a52; }
body :is(.profile-preview-category,.profile-preview-section h4,.profile-preview-contact>span,.profile-preview-contact p,.profile-preview-actions) { color: #547760; }
@media(prefers-reduced-motion:reduce) { body .avra-business-card:hover { transform: none; } }
