/* Agroculus shared page chrome — tokens + layout primitives */

:root {
    --agro-primary: #2e7d32;
    --agro-primary-dark: #1b5e20;
    --agro-primary-mid: #388e3c;
    --agro-primary-soft: #e8f5e9;
    --agro-primary-soft-border: #c8e6c9;
    --agro-teal: #00695c;
    --agro-teal-soft: #e0f2f1;
    --agro-teal-border: #b2dfdb;
    --agro-ink: #1a1a1a;
    --agro-ink-strong: #14281a;
    --agro-muted: #5c6b61;
    --agro-muted-strong: #64748b;
    --agro-slate: #334155;
    --agro-surface: #ffffff;
    --agro-surface-tint: #f4faf6;
    --agro-surface-soft: #f4f7f5;
    --agro-surface-panel: #fafcfa;
    --agro-border: #e3ebe4;
    --agro-border-soft: #edf2ee;
    --agro-border-strong: #dce8df;
    --agro-shadow-hero: 0 12px 40px rgba(46, 125, 50, 0.07);
    --agro-shadow-shell: 0 4px 24px rgba(0, 0, 0, 0.03);
    --agro-radius-sm: 12px;
    --agro-radius-md: 16px;
    --agro-radius-lg: 20px;
    --agro-radius-xl: 22px;
    --agro-font-display: 'Poppins', sans-serif;
    --agro-font-body: 'Inter', sans-serif;
}

/* —— Page hero —— */
.page-hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: linear-gradient(135deg, var(--agro-surface) 0%, var(--agro-surface-tint) 100%);
    padding: 1.75rem 2rem;
    border-radius: var(--agro-radius-xl);
    border: 1px solid var(--agro-border);
    box-shadow: var(--agro-shadow-hero);
}

.page-hero--compact {
    padding: 1.35rem 1.75rem;
    border-radius: var(--agro-radius-md);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.05);
}

@media (min-width: 768px) {
    .page-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .page-hero--compact {
        align-items: flex-end;
    }
}

.page-hero__text {
    min-width: 0;
}

.page-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--agro-primary-soft);
    color: var(--agro-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.page-title {
    font-family: var(--agro-font-display);
    font-weight: 800 !important;
    color: var(--agro-ink);
    margin: 0 !important;
    font-size: 1.75rem;
}

.page-hero--compact .page-title {
    font-size: 1.5rem;
    color: var(--agro-ink-strong);
}

.page-subtitle {
    color: var(--agro-muted);
    font-size: 1rem;
    margin-top: 0.35rem;
    max-width: 560px;
}

.page-hero__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hero-icon-btn,
.refresh-btn {
    border-radius: var(--agro-radius-sm) !important;
    background: var(--agro-surface-soft) !important;
    border: 1px solid var(--agro-border-soft);
    flex-shrink: 0;
}

.refresh-btn {
    background: rgba(46, 125, 50, 0.12) !important;
}

/* —— Summary chips —— */
.summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--agro-surface-soft);
    border: 1px solid var(--agro-border);
    color: var(--agro-slate);
    font-size: 0.82rem;
    font-weight: 700;
}

.summary-chip--primary {
    background: var(--agro-primary-soft);
    border-color: var(--agro-primary-soft-border);
    color: var(--agro-primary);
}

.summary-chip--success {
    background: var(--agro-primary-soft);
    border-color: #a5d6a7;
    color: var(--agro-primary-dark);
}

.summary-chip--info {
    background: var(--agro-teal-soft);
    border-color: var(--agro-teal-border);
    color: var(--agro-teal);
}

.summary-chip--warning {
    background: #fff8e1;
    border-color: #ffe082;
    color: #ef6c00;
}

.summary-chip--month {
    background: var(--agro-teal-soft);
    border-color: var(--agro-teal-border);
    color: var(--agro-teal);
}

.summary-chip--balance {
    background: #fff8e1;
    border-color: #ffe082;
    color: #ef6c00;
}

.summary-chip--total {
    background: var(--agro-primary-soft);
    border-color: var(--agro-primary-soft-border);
    color: var(--agro-primary-dark);
}

.summary-chip--muted {
    color: var(--agro-muted-strong);
}

.page-hero__badge--warning {
    background: #fff3e0;
    color: #ef6c00;
}

/* —— Shells —— */
.premium-shell,
.control-shell,
.content-shell {
    border-radius: var(--agro-radius-lg);
    border: 1px solid var(--agro-border-soft);
    background: var(--agro-surface);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: var(--agro-shadow-shell);
}

.premium-shell--compact {
    border-radius: var(--agro-radius-md);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.04);
}

.control-label {
    display: block;
    font-weight: 800;
    color: var(--agro-muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
    margin-bottom: 0.65rem;
}

/* —— Soft controls —— */
.soft-btn {
    border-radius: var(--agro-radius-sm) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
}

.soft-field .mud-input-outlined .mud-input-outlined-border {
    border-radius: var(--agro-radius-sm) !important;
}

.soft-field .mud-input.mud-input-outlined.mud-input-focused fieldset,
.soft-field.mud-input-control .mud-input.mud-input-focused fieldset {
    border-color: var(--agro-primary) !important;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12), 0 4px 14px rgba(46, 125, 50, 0.08) !important;
}

/* —— Shared states —— */
.state-panel {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

.state-panel--compact {
    padding: 2rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--agro-muted-strong);
    text-align: center;
    padding: 2rem 1rem;
}

.rounded-alert {
    border-radius: var(--agro-radius-sm) !important;
}

/* —— Greenhouse filter pills (shared) —— */
.greenhouse-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.greenhouse-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--agro-border-strong);
    background: #f8fbf9;
    color: var(--agro-slate);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.greenhouse-pill:hover {
    border-color: #a5d6a7;
    background: #f1f8f2;
}

.greenhouse-pill.is-active {
    background: linear-gradient(135deg, var(--agro-primary) 0%, var(--agro-primary-mid) 100%);
    border-color: var(--agro-primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.25);
}
