/*
|--------------------------------------------------------------------------
| ACNOVA GLOBAL VISUAL FOUNDATION V4
|--------------------------------------------------------------------------
|
| System-wide readability and visual consistency layer.
| Public website + auth + marketplaces + all workspace families.
|
| This file intentionally loads after legacy production/readability CSS.
| Legacy CSS is preserved temporarily for compatibility.
|
*/

:root{
    --acv-page:#f5f8f5;
    --acv-surface:#ffffff;
    --acv-surface-soft:#f0f5f1;

    --acv-heading:#14271c;
    --acv-text:#263b30;
    --acv-muted:#5d7065;
    --acv-subtle:#74867b;

    --acv-border:#d6e2da;
    --acv-border-strong:#b8ccbf;

    --acv-primary:#17934d;
    --acv-primary-dark:#0d6e39;
    --acv-primary-soft:#e7f6ec;

    --acv-dark:#0b2418;
    --acv-dark-2:#103421;

    --acv-on-dark:#ffffff;
    --acv-on-dark-text:#e5f0e9;
    --acv-on-dark-muted:#bfd0c5;

    --acv-warning:#8a6200;
    --acv-danger:#a62929;
    --acv-success:#116d3b;

    --acv-radius:18px;
}


/* =========================================================
   BASE TYPOGRAPHY
   ========================================================= */

html{
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

body{
    color:var(--acv-text);
}

body,
input,
select,
textarea,
button{
    text-rendering:optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6{
    line-height:1.18;
}

p,
li,
td,
th,
label,
small{
    line-height:1.55;
}


/* =========================================================
   LIGHT SURFACES
   ========================================================= */

.card,
.panel-card,
.dashboard-card,
.metric-card,
.stat-card,
.workspace-card,
.content-card,
.form-card{
    color:var(--acv-text);
}

.card h1,
.card h2,
.card h3,
.card h4,
.panel-card h1,
.panel-card h2,
.panel-card h3,
.dashboard-card h1,
.dashboard-card h2,
.dashboard-card h3,
.metric-card h1,
.metric-card h2,
.metric-card h3,
.workspace-card h1,
.workspace-card h2,
.workspace-card h3{
    color:var(--acv-heading);
}

.card p,
.panel-card p,
.dashboard-card p,
.metric-card p,
.workspace-card p,
.content-card p{
    color:var(--acv-muted);
}


/* =========================================================
   DARK SURFACE CONTRACT
   ========================================================= */

.dark-panel,
.command-hero,
.afc-hero,
.site-footer,
.about-hero,
.module-app-side,
.module-app-top,
.acn-dark-panel,
[data-acnova-surface="dark"]{
    color:var(--acv-on-dark) !important;
}

.dark-panel h1,
.dark-panel h2,
.dark-panel h3,
.dark-panel h4,
.command-hero h1,
.command-hero h2,
.command-hero h3,
.afc-hero h1,
.afc-hero h2,
.afc-hero h3,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.about-hero h1,
.about-hero h2,
.about-hero h3,
.module-app-side h1,
.module-app-side h2,
.module-app-side h3,
.module-app-top h1,
.module-app-top h2,
.module-app-top h3,
[data-acnova-surface="dark"] h1,
[data-acnova-surface="dark"] h2,
[data-acnova-surface="dark"] h3{
    color:#ffffff !important;
    opacity:1 !important;
}

.dark-panel p,
.dark-panel li,
.command-hero p,
.command-hero li,
.afc-hero p,
.afc-hero li,
.site-footer p,
.site-footer li,
.site-footer small,
.about-hero p,
.about-hero li,
.module-app-side p,
.module-app-top p,
[data-acnova-surface="dark"] p,
[data-acnova-surface="dark"] li{
    color:var(--acv-on-dark-text) !important;
    opacity:1 !important;
}


/* =========================================================
   FARMER COMMAND CENTER
   ========================================================= */

.afc-hero{
    color:#ffffff !important;
}

.afc-hero .afc-eyebrow{
    color:#7cf0a8 !important;
    opacity:1 !important;
}

.afc-hero h1{
    color:#ffffff !important;
    opacity:1 !important;
}

.afc-hero-main p{
    color:#dcebe2 !important;
    opacity:1 !important;
}

.afc-hero span{
    opacity:1;
}

.afc-enterprise-label strong{
    color:#ffffff !important;
}

.afc-enterprise-label span{
    color:#c8dbcf !important;
}


/* =========================================================
   FORMS
   ========================================================= */

label{
    opacity:1;
}

input,
select,
textarea{
    color:var(--acv-heading);
}

input::placeholder,
textarea::placeholder{
    color:#718078;
    opacity:1;
}

input:disabled,
select:disabled,
textarea:disabled{
    opacity:.72;
}


/* =========================================================
   TABLES
   ========================================================= */

table{
    color:inherit;
}

th{
    font-weight:800;
}

td{
    opacity:1;
}


/* =========================================================
   LINKS / BUTTON TEXT
   ========================================================= */

button,
.btn,
.button,
a.btn{
    opacity:1;
}

button:disabled,
.btn:disabled,
.button:disabled{
    opacity:.58;
}


/* =========================================================
   STATUS / SECONDARY TEXT
   ========================================================= */

.text-muted,
.muted,
.subtitle,
.description,
.helper,
.help-text{
    opacity:1;
}


/* =========================================================
   DARK MODE FOUNDATION
   ========================================================= */

body.dark,
html[data-theme="dark"] body{
    --acv-page:#08140e;
    --acv-surface:#102219;
    --acv-surface-soft:#142a20;

    --acv-heading:#ffffff;
    --acv-text:#e7f0ea;
    --acv-muted:#b7cabd;
    --acv-subtle:#9eb2a5;

    --acv-border:#294338;
    --acv-border-strong:#385948;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

:focus-visible{
    outline:3px solid rgba(34,197,94,.55);
    outline-offset:2px;
}

@media (prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
        scroll-behavior:auto !important;
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
    }
}
