/* =============================================
   KRISHOKBONDHU — DESKTOP WEB APP STYLESHEET
   ============================================= */

/* Color Variables & Root Definitions */
:root {
    --primary-color: #1b5e20;
    --primary-light: #4c8c4a;
    --primary-dark: #003300;
    --accent-color: #ffb300;
    --accent-dark: #c68400;

    --sidebar-width: 256px;
    --header-height: 72px;

    --bg-page: #f0f4f0;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --text-dark: #1a2e1a;
    --text-muted: #607060;
    --border-color: rgba(27, 94, 32, 0.08);

    --success: #2e7d32;
    --warning: #ef6c00;
    --danger: #c62828;
    --info: #1565c0;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(27, 94, 32, 0.08);
    --shadow-lg: 0 8px 32px rgba(27, 94, 32, 0.12);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden; /* prevent body scroll — inner panes scroll */
}

body {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    -webkit-tap-highlight-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(27,94,32,0.18); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27,94,32,0.32); }

/* ============================================
   LAYOUT SHELL
   ============================================ */
.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(175deg, #1b5e20 0%, #003300 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    z-index: 200;
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent-color);
    flex-shrink: 0;
    animation: pulse-leaf 3s infinite ease-in-out;
}

.logo-text h1 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.logo-text span {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 12px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    padding: 8px 8px 4px;
    margin-top: 8px;
}

.nav-section-label:first-child { margin-top: 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    position: relative;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
    transform: translateX(3px);
}

.nav-item.active {
    background: var(--accent-color);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(255,179,0,0.3);
}

.nav-item.active i {
    color: var(--primary-dark);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    line-height: 1.7;
    text-align: center;
}

/* ============================================
   TOP HEADER
   ============================================ */
.app-header {
    grid-area: header;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    z-index: 100;
    position: sticky;
    top: 0;
}

.header-greeting h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.header-greeting p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Weather widget in header */
.hw-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: #fff;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--shadow-sm);
}

.hw-widget:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(21,101,192,0.3);
}

.hw-widget .hw-icon { font-size: 20px; color: var(--accent-color); }

.hw-widget .hw-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.hw-widget .hw-temp { font-size: 15px; font-weight: 700; }
.hw-widget .hw-cond { font-size: 10px; opacity: 0.85; }

.hw-widget .hw-loc {
    font-size: 10px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* Clock chip */
.header-clock {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--bg-page);
    padding: 7px 14px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    min-width: 70px;
    text-align: center;
}

/* Voice button */
.btn-voice-global {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-color);
    border: none;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: var(--shadow-sm);
    height: 38px;
}

.btn-voice-global:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-voice-global.playing {
    background: var(--danger);
    color: #fff;
    animation: pulsing 1.5s infinite;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.app-main {
    grid-area: main;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Screen sections */
.app-screen {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fade-in-up 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
    min-height: 100%;
}

.app-screen.active {
    display: flex;
}

/* Page title bar */
.page-title-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
}

.page-title-bar h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    line-height: 1.25;
}

.page-title-bar p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    padding-left: 14px;
}

/* ============================================
   HOME — DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

/* Card base */
.panel-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, rgba(27,94,32,0.03) 0%, transparent 100%);
}

.panel-card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-card-header p {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

.panel-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

/* ============================================
   DISEASE SCANNER WIDGET
   ============================================ */
.camera-wrapper {
    background: #f7faf7;
    border-radius: var(--radius-sm);
    border: 1.5px dashed rgba(27,94,32,0.18);
    padding: 10px;
}

.camera-preview {
    height: 220px;
    border-radius: 6px;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-preview video,
.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-placeholder {
    color: rgba(27,94,32,0.3);
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    transition: color 0.2s ease;
}

.camera-placeholder:hover { color: var(--primary-color); }

.camera-placeholder i {
    font-size: 40px;
}

.camera-placeholder p {
    font-size: 11px;
    font-weight: 600;
    max-width: 200px;
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #4caf50, transparent);
    box-shadow: 0 0 10px #4caf50;
    animation: scan 2s linear infinite;
    z-index: 5;
}

.camera-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Dev mock selector */
.dev-mock-box {
    background: #fffdf5;
    border: 1px dashed var(--accent-dark);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dev-mock-box label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent-dark);
}

.dev-mock-box select {
    background: #fff;
    border: 1px solid #e0d0a0;
    border-radius: 6px;
    padding: 7px 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    color: var(--text-dark);
}

/* Result card */
.result-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.06);
    border-top: 4px solid var(--success);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-crop-badge {
    background: #e8f5e9;
    color: var(--success);
    font-weight: 700;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
}

.result-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-dark);
}

.result-en {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: -6px;
}

.confidence-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.confidence-track {
    height: 7px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(to right, var(--accent-color), var(--success));
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Info blocks */
.info-block {
    background: #f6f8f6;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    padding: 9px 12px;
}

.info-block h4 {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-block p {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}

.success-block { border-left-color: var(--success); background: #f1f8e9; }
.warning-block { border-left-color: var(--warning); background: #fff3e0; }
.alert-block   { border-left-color: var(--danger);  background: #ffebee; }

.dosage-highlight {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--warning) !important;
}

.disclaimer-text {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 9px;
}

/* TTS button */
.btn-tts {
    background: var(--accent-color);
    color: var(--primary-dark);
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.18s ease;
}

.btn-tts:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-tts.playing {
    background: var(--danger);
    color: #fff;
    animation: pulsing 1.5s infinite;
}

/* ============================================
   MARKET PRICE WIDGET
   ============================================ */
.market-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    background: var(--bg-page);
    border: 1px solid #dde;
    border-radius: var(--radius-sm);
    height: 36px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.filter-group select:focus {
    border-color: var(--primary-light);
}

.price-display-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-md);
    padding: 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.price-badge {
    background: var(--accent-color);
    color: var(--primary-dark);
    font-size: 9.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.price-amount {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-amount .currency {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
}

.price-amount .value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
}

.price-amount .unit {
    font-size: 13px;
    opacity: 0.75;
}

.price-market-name {
    font-size: 11px;
    opacity: 0.85;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 7px;
    width: 100%;
}

.chart-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.chart-container h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.chart-wrap {
    height: 160px;
    position: relative;
}

/* ============================================
   TIPS ROW (HOME BOTTOM)
   ============================================ */
.section-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 2px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tip-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tip-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff8e1;
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.tip-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.tip-text p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   WEATHER SCREEN
   ============================================ */
.weather-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

.weather-left { display: flex; flex-direction: column; gap: 14px; }

.district-picker-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.district-picker-card label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.district-row {
    display: flex;
    align-items: center;
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    gap: 8px;
}

.district-row i { color: var(--primary-light); font-size: 14px; }

.district-row select {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    height: 36px;
}

.btn-gps {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.18s ease;
    white-space: nowrap;
}

.btn-gps:hover { background: var(--primary-light); }

/* Current weather big card */
.current-weather-card {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.current-weather-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.weather-main-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.weather-icon-lg { font-size: 44px; color: var(--accent-color); }
.weather-temp-lg { font-size: 44px; font-weight: 800; }

.weather-cond-text {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.weather-detail-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-top: 12px;
}

.w-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.w-detail .label { font-size: 10px; opacity: 0.75; }
.w-detail .value { font-size: 13px; font-weight: 700; }

/* Alert box */
.agri-alert {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-left: 5px solid var(--warning);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.agri-alert.danger {
    background: #ffebee;
    border-color: #ffcdd2;
    border-left-color: var(--danger);
}

.agri-alert .alert-icon { font-size: 18px; color: var(--warning); flex-shrink: 0; padding-top: 2px; }
.agri-alert.danger .alert-icon { color: var(--danger); }

.agri-alert h4 { font-size: 12.5px; font-weight: 700; color: #5d4037; margin-bottom: 3px; }
.agri-alert p  { font-size: 11.5px; color: #4e342e; line-height: 1.5; }

/* Forecast right panel */
.weather-right {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.weather-right h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.forecast-list { display: flex; flex-direction: column; gap: 6px; }

.forecast-row {
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: border-color 0.18s ease;
}

.forecast-row:hover { border-color: rgba(27,94,32,0.12); }

.forecast-day { font-weight: 600; font-size: 13.5px; width: 100px; }
.forecast-icon { font-size: 17px; width: 50px; text-align: center; }
.forecast-rain {
    font-size: 11.5px;
    color: var(--info);
    font-weight: 600;
    width: 80px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.forecast-temp { font-weight: 700; font-size: 13.5px; text-align: right; width: 90px; }

/* ============================================
   SEARCH / KNOWLEDGE BASE SCREEN
   ============================================ */
.search-box-outer {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.search-input-row {
    display: flex;
    align-items: center;
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    gap: 10px;
    border: 1.5px solid transparent;
    transition: all 0.18s ease;
}

.search-input-row:focus-within {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76,140,74,0.1);
}

.search-input-row .search-ico { color: var(--text-muted); font-size: 15px; }

.search-input-row input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    height: 46px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-voice-search {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.18s ease;
}

.btn-voice-search:hover { background: var(--primary-light); }

.search-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.search-chips span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.chip {
    background: var(--bg-card);
    border: 1px solid #dde;
    padding: 6px 18px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.18s ease;
}

.chip:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Crop result */
.crop-result-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    padding: 20px 22px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.crop-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tips-full-block {
    background: #e0f2f1;
    border-left: 4px solid #00796b !important;
}

.tips-full-block h4 { color: #004d40 !important; }

/* ============================================
   VOICE OVERLAY
   ============================================ */
.voice-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27,94,32,0.82);
    backdrop-filter: blur(5px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-card {
    background: #fff;
    width: 360px;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    animation: scale-up 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.voice-pulse-circle {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    position: relative;
}

.voice-pulse-circle::before,
.voice-pulse-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: voice-ripple 1.5s infinite linear;
}

.voice-pulse-circle::before { animation-delay: 0.75s; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary, .btn-secondary, .btn-success {
    border: none;
    outline: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
    height: 38px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    flex: 1;
}
.btn-primary:hover { background: var(--primary-light); }

.btn-secondary {
    background: #efefef;
    color: var(--text-dark);
}
.btn-secondary:hover { background: #e2e2e2; }

.btn-success {
    background: var(--success);
    color: #fff;
    flex: 1.4;
}
.btn-success:hover { background: #256628; }

/* ============================================
   UTILITY
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-up {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

@keyframes voice-ripple {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.65); opacity: 0; }
}

@keyframes pulse-leaf {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); box-shadow: 0 0 14px rgba(255,179,0,0.4); }
}

@keyframes scan {
    0%   { top: 0%; }
    50%  { top: 100%; }
    100% { top: 0%; }
}

@keyframes pulsing {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.04); }
}

/* ============================================
   RESPONSIVE — collapse grid at narrow widths
   ============================================ */
@media (max-width: 1200px) {
    .tips-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
    :root { --sidebar-width: 220px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .weather-layout  { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 60px; }
    .logo-text, .sidebar-footer, .nav-item span, .nav-section-label { display: none; }
    .nav-item { justify-content: center; padding: 12px 0; }
    .app-main { padding: 16px; }
    .dashboard-grid, .crop-info-grid, .tips-grid { grid-template-columns: 1fr; }
    .market-filter-row { grid-template-columns: 1fr; }
    .header-clock { display: none; }
}
