/* Agritech Theme Variables */
:root {
    --anc-primary: #238c59;
    --anc-primary-dark: #1a6b43;
    --anc-primary-light: #e6f4ed;
    --anc-bg: #f8faf9;
    --anc-card-bg: #ffffff;
    --anc-text: #112820;
    --anc-text-muted: #5f786e;
    --anc-border: #dce5e1;
    --anc-radius: 8px;
    
    --anc-chart-n: #238c59;
    --anc-chart-p: #2b9eb3;
    --anc-chart-k: #d99a26;
}

.anc-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--anc-bg);
    padding: 2rem;
    border-radius: 12px;
    color: var(--anc-text);
    box-sizing: border-box;
}

.anc-wrapper * {
    box-sizing: border-box;
}

/* Header */
.anc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.anc-title-group {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.anc-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--anc-text);
    line-height: 1.2;
}

.anc-header p {
    margin: 0.25rem 0 0;
    color: var(--anc-text-muted);
    font-size: 0.95rem;
}

.anc-icon-lg {
    color: var(--anc-primary);
    flex-shrink: 0;
}

.anc-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.anc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--anc-radius);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: var(--anc-primary);
    color: white;
}

.anc-btn:hover {
    background: var(--anc-primary-dark);
}

.anc-btn-outline {
    background: transparent;
    border-color: var(--anc-border);
    color: var(--anc-text);
}

.anc-btn-outline:hover {
    background: rgba(0,0,0,0.03);
    border-color: var(--anc-text-muted);
}

.anc-btn-secondary {
    background: var(--anc-primary-light);
    color: var(--anc-primary-dark);
}

.anc-btn-secondary:hover {
    background: #d1e9dd;
}

.anc-btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.anc-btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--anc-text-muted);
}

.anc-btn-icon:hover {
    color: #d32f2f;
    background: rgba(211, 47, 47, 0.1);
}

.anc-full-width {
    width: 100%;
}

/* Tabs */
.anc-tabs {
    display: flex;
    background: #eef2f0;
    padding: 0.25rem;
    border-radius: var(--anc-radius);
    margin-bottom: 2rem;
    width: fit-content;
}

.anc-tab-trigger {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--anc-text-muted);
    border-radius: calc(var(--anc-radius) - 2px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.anc-tab-trigger.active {
    background: white;
    color: var(--anc-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Grid Layout */
.anc-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .anc-grid {
        grid-template-columns: 1fr;
    }
    .anc-header {
        flex-direction: column;
    }
}

/* Cards */
.anc-card {
    background: var(--anc-card-bg);
    border: 1px solid var(--anc-border);
    border-radius: var(--anc-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.anc-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--anc-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.anc-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.anc-card-content {
    padding: 1.25rem;
}

.anc-p-lg {
    padding: 0;
}

.anc-p-lg .anc-card-content {
    padding: 1.5rem;
}

/* Inputs */
.anc-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

input[type="number"], input[type="text"], select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--anc-border);
    border-radius: var(--anc-radius);
    font-size: 0.95rem;
    font-family: inherit;
}

input[type="number"]:focus, input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--anc-primary);
    box-shadow: 0 0 0 2px var(--anc-primary-light);
}

.anc-unit {
    color: var(--anc-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar Results */
.anc-results-card {
    background: var(--anc-primary-light);
    border-color: rgba(35, 140, 89, 0.2);
}

.anc-nutrient-row {
    margin-bottom: 1rem;
}

.anc-nutrient-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.anc-mono {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}

.anc-bar-bg {
    height: 10px;
    background: rgba(255,255,255,0.6);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.anc-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.anc-bar-n { background: var(--anc-chart-n); }
.anc-bar-p { background: var(--anc-chart-p); }
.anc-bar-k { background: var(--anc-chart-k); }

.anc-divider {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 1.25rem 0;
}

/* List Items */
.anc-list-item {
    position: relative;
    margin-bottom: 1rem;
    border-left: 4px solid rgba(35, 140, 89, 0.3);
    transition: all 0.2s;
}

.anc-list-item:hover {
    border-left-color: var(--anc-primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.anc-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 640px) {
    .anc-item-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.anc-label-sm {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--anc-text-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.anc-npk-inputs {
    display: flex;
    gap: 0.25rem;
}

.anc-input-center {
    text-align: center;
    padding-left: 2px;
    padding-right: 2px;
}

/* Dose Tab */
.anc-step {
    padding: 1.5rem;
}

.anc-step-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--anc-primary);
    margin: 0 0 1.25rem 0;
}

.anc-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--anc-primary);
    border-radius: 50%;
    font-size: 0.8rem;
}

.anc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.anc-dose-source-grid {
    display: grid;
    grid-template-columns: 3fr 1.5fr 2.5fr;
    gap: 1rem;
    align-items: end;
}

@media (max-width: 640px) {
    .anc-dose-source-grid {
        grid-template-columns: 1fr;
    }
}

.anc-dose-display {
    text-align: center;
    padding: 1rem 0;
}

.anc-dose-value-group {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.anc-dose-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--anc-primary);
    font-family: 'Courier New', monospace;
}

.anc-dose-unit {
    font-size: 1rem;
    color: var(--anc-text-muted);
}

.anc-dose-desc {
    font-size: 0.8rem;
    color: var(--anc-text-muted);
}

.anc-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    text-align: center;
    margin-top: 0.5rem;
}

.anc-mini-stat {
    background: white;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.anc-mini-stat span {
    font-weight: 700;
    color: var(--anc-primary);
}

.anc-mini-stat small {
    font-size: 0.65rem;
    color: var(--anc-text-muted);
}

.hidden {
    display: none !important;
}
