/* A quieter shared surface for the four product workspaces. */
:root {
    --background-color: #f7f9fb;
    --text-primary: #172637;
    --text-secondary: #607286;
    --border-color: #dce5eb;
    --shadow-sm: 0 1px 2px rgba(20, 37, 52, .035);
}

.main-content { background: var(--background-color); }

:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual {
    min-height: 0;
    display: block;
    padding: 3px 48px 0 0;
    margin-bottom: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual::before,
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual::after,
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual .section-header-logo { display: none; }
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual .section-header-copy { gap: 6px; }
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual .section-header-copy h2 {
    font-size: clamp(27px, 2.6vw, 34px);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -.025em;
}
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual .section-header-copy p {
    max-width: 700px;
    font-size: 14px;
    line-height: 1.5;
    color: #65768a;
}
:is(#meshlistSection, #meshfeedSection, #meshadsSection, #productsSection, #imagesSection) > .section-header--visual .section-help-btn {
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #dce5eb;
    border-radius: 9px;
}

/* The home is an app launcher, so use the product names and one visual system. */
.home-hero {
    min-height: 198px;
    padding: 32px 36px;
    border-radius: 16px;
    background: radial-gradient(circle at 92% 15%, rgba(88, 181, 170, .14), transparent 35%), #142536;
}
.home-hero::after { display: none; }
.home-hero h1 { max-width: 750px; font-size: clamp(29px, 3.1vw, 41px); }
.home-hero p { margin-top: 11px; }
.home-hero-actions { margin-top: 22px; }
.home-content-grid { gap: 16px; margin-top: 16px; }
.home-workflows,
.home-utilities { border-radius: 14px; box-shadow: none; }
.home-workflows { padding: 23px 25px 8px; }
.home-panel-heading { padding-bottom: 15px; }
.home-workflow { min-height: 71px; gap: 15px; padding: 12px 3px; }
.home-workflow-symbol {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid #dce8e6;
    border-radius: 10px;
    background: #f1f8f6;
    color: #206b65;
    font-size: 14px;
}
.home-workflow-copy strong { font-size: 14px; }
.home-workflow-copy small { font-size: 12px; }
.home-workflow-icon { border: 0; background: transparent; color: #6f8693; }
.home-workflow:hover .home-workflow-icon { border: 0; background: transparent; color: #126b64; }
.home-utilities { padding: 21px; }
.home-project-panel {
    min-height: 135px;
    padding: 18px;
    border-radius: 11px;
    background: #f3f8f7;
}
.home-utility-links { margin-top: 11px; }
.home-utility-links button { min-height: 58px; }

/* Plain tabs make the current location clear without implying a locked wizard. */
.meshlist-tabs,
.meshstore-tabs,
.meshfeed-tabs,
.ac-tabs {
    gap: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #dce5eb;
    border-radius: 0;
    background: transparent;
}
.meshlist-tab,
.meshstore-tab,
.meshfeed-tab,
.ac-tab { min-height: 45px; border-radius: 0; border-bottom: 2px solid transparent; }
.meshlist-tab .tab-step-number,
.meshstore-tab .tab-step-number,
.meshfeed-tab .tab-step-number { display: none; }
.meshlist-tab.active,
.meshstore-tab.active,
#meshfeedTabs .meshfeed-tab.active,
.ac-tab.active {
    border-bottom-color: #197a7b;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #165d62;
}

/* Compact settings stay legible while the product task remains primary. */
#meshfeedSection .meshfeed-top-controls { gap: 12px !important; margin-bottom: 17px !important; }
#meshadsSection .meshads-rules-preferences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
#metaAdsRulesInterface > .feature-toggle-card { margin-bottom: 18px !important; }
:is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-card {
    margin-bottom: 0 !important;
    padding: 14px 16px;
    border: 1px solid #dce5eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
:is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-card::after { display: none; }
:is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-card:hover { border-color: #b9cbd4; box-shadow: none; }
:is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-title { margin-bottom: 4px; }
:is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-description { color: #607286; }

.status-alert { padding: 14px 17px; border-radius: 11px; box-shadow: none; }
.status-alert.warning { border-color: #cfdfeb; background: #f0f6fa; box-shadow: none; }
.status-alert.warning .status-alert-icon { color: #35728e; }
.status-alert.warning .status-alert-btn { color: #125d79; border-color: #b8d1dd; }
.status-alert.credits-needed { border-color: #edd9b3; background: #fff9ee; box-shadow: none; }
.status-alert.credits-needed .status-alert-icon { color: #a86b1f; }
.status-alert-title { font-size: 14px; margin-bottom: 4px; }
.status-alert-message { color: #53697b; }
.status-alert-btn { border-width: 1px; min-height: 36px; padding: 7px 12px; }

.modern-settings-card { border-color: #dce5eb; border-radius: 12px; box-shadow: none; }
.modern-settings-card:hover { box-shadow: none; }
.modern-card-header { padding: 17px 20px; background: #fff; border-bottom-color: #e8edf1; }
.modern-card-content { padding: 20px; }

/* Give setup, billing, and template pages the same hierarchy as the workspace. */
:is(#billingSection, #connectionsSection, #projectsSection, #templatesSection) > .section-header {
    margin-bottom: 22px;
}
:is(#billingSection, #connectionsSection, #projectsSection, #templatesSection) > .section-header h1 {
    font-size: clamp(27px, 2.6vw, 34px);
    line-height: 1.12;
    letter-spacing: -.025em;
    color: #172637;
}
:is(#billingSection, #connectionsSection, #projectsSection, #templatesSection) > .section-header p {
    margin-top: 6px;
    color: #65768a;
}

#billingSection > .segmented-tabs,
#templatesSection > .segmented-tabs {
    display: grid;
    margin: 0 0 25px !important;
    max-width: none !important;
    padding: 0;
    gap: 0;
    border: 0;
    border-bottom: 1px solid #dce5eb;
    border-radius: 0;
    background: transparent;
}
#billingSection > .segmented-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#templatesSection > .segmented-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(#billingSection, #templatesSection) > .segmented-tabs .segmented-tab {
    min-height: 47px;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
}
:is(#billingSection, #templatesSection) > .segmented-tabs .segmented-tab.active {
    border-bottom-color: #197a7b;
    background: transparent;
    color: #165d62;
    box-shadow: none;
}
:is(#billingSection, #templatesSection) > .segmented-tabs .segmented-tab-icon { background: transparent !important; }

#billingSection .billing-quick-info { padding: 12px 18px; background: #fff; box-shadow: none; }
#billingSection .feature-selector { max-width: none; margin: 0 0 21px; padding: 0; }
#billingSection .feature-selector h3 { margin: 0 0 15px; text-align: left; font-size: 17px; }
#billingSection .feature-cards { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#billingSection .feature-card {
    min-height: 104px;
    padding: 18px 14px;
    border: 1px solid #dce5eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
#billingSection .feature-card::before { display: none !important; }
#billingSection .feature-card:hover { transform: none; border-color: #91b9bd; box-shadow: none; }
#billingSection .feature-card.active { border: 1px solid #32847f; background: #f6fbf9 !important; box-shadow: none; }
#billingSection .feature-card-logo { height: 26px; margin-bottom: 8px; }
#billingSection .feature-card p { font-size: 12px; line-height: 1.35; }
#billingSection .billing-content { gap: 15px; margin-top: 18px; }
#billingSection .billing-card { padding: 24px; border: 1px solid #dce5eb; background: #fff; box-shadow: none; }
#billingSection .billing-card:hover { transform: none; box-shadow: none; }
#meshlistPromoBar { max-width: none !important; background: #f3faf6 !important; border-color: #c9e4d3 !important; }
#meshlistPromoBar > div:first-child { background: #2b816a !important; font-size: 14px !important; }

#connectionsSection .connections-grid { gap: 15px; margin-top: 15px; }
#connectionsSection .connection-card { padding: 22px; border-radius: 12px; box-shadow: none; }
#connectionsSection .connection-card:hover { transform: none; border-color: #b8cbd3; box-shadow: none; }
#projectsSection .projects-header { margin-bottom: 20px; }
#projectsSection .projects-list { border-radius: 12px; }
#templatesSection .modern-settings-card { margin-bottom: 16px; }
#templatesSection .info-card { border-radius: 9px; }

#imagesSection .feature-toggle-card {
    padding: 14px 16px;
    border: 1px solid #dce5eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
#imagesSection .feature-toggle-card::after { display: none; }

.platform-card,
.bg-option-card {
    border: 1px solid #dce5eb;
    border-radius: 12px;
    box-shadow: none;
}
.platform-card:hover,
.bg-option-card:hover {
    transform: none;
    border-color: #84b7b5;
    background: #f7fbfa;
    box-shadow: none;
}
.platform-icon,
.bg-option-icon { color: #2b7778; }
.bg-option-icon { font-size: 34px; }

.login-screen {
    padding: 24px;
    background: radial-gradient(circle at 20% 12%, rgba(43, 111, 124, .3), transparent 34%), #0e1927;
}
.login-card {
    width: min(100%, 410px);
    max-width: none;
    padding: 36px;
    border: 1px solid #dde6eb;
    border-radius: 18px;
    box-shadow: 0 20px 52px rgba(0, 0, 0, .2);
    animation: none;
}
.login-header { margin-bottom: 27px; }
.login-logo { width: 158px; margin-bottom: 14px; }
.login-card p { font-size: 14px; line-height: 1.55; }
.login-options { gap: 12px; }
.login-button {
    min-height: 48px;
    padding: 11px 16px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .18s ease, background .18s ease;
}
.login-button::before { display: none; }
.login-button:hover { transform: none; box-shadow: none; }
.login-button.google,
.login-button.secondary { border-color: #cddae3; background: #fff; color: #203246; }
.login-button.google:hover,
.login-button.secondary:hover { border-color: #8eacb9; background: #f5f9fa; color: #203246; }
.login-divider { margin: 2px 0; }

:is(button, a, input, select, textarea, [role="button"]):focus-visible {
    outline: 2px solid #2c8794;
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .home-hero { padding: 27px 25px; }
    .home-workflows { padding: 21px 20px 6px; }
    #meshadsSection .meshads-rules-preferences { grid-template-columns: 1fr; }
    :is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-card-content { flex-direction: row; align-items: center; }
    :is(#meshfeedSection, #meshadsSection, #productsSection) .feature-toggle-switch { align-self: center; }
    #billingSection .billing-header-with-info { gap: 15px; }
    #billingSection .feature-cards { grid-template-columns: 1fr; }
    #billingSection .feature-card { min-height: 80px; }
    #templatesSection > .segmented-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #connectionsSection .connection-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .status-alert { animation: none; }
}
