@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --agro-primary: #059669;
    --agro-primary-dark: #047857;
    --agro-deep: #064e3b;
    --agro-amber: #f59e0b;
    --agro-canvas: #f6f8fa;
    --agro-border: rgba(15, 23, 42, 0.08);
    --agro-shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 20px -6px rgba(15, 23, 42, 0.07);
    --agro-shadow-hover: 0 12px 28px -8px rgba(5, 150, 105, 0.16), 0 4px 10px -4px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--agro-canvas);
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    background-color: var(--agro-canvas);
    color: #0f172a;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

#homeMenuCard, #workspaceAnchor {
    width: 100%;
    max-width: 80rem;
    min-width: 0;
}

.font-mono, code, pre {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[id*="kpi" i], [id*="res" i], [id*="total" i], [id*="price" i], [id*="bal" i], [id*="cnt" i],
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   ORIGINAL FRESH AGROSMART EMERALD HERO
   ========================================== */
.hero-gradient {
    background:
        radial-gradient(650px circle at 90% -20%, rgba(52, 211, 153, 0.28), transparent 55%),
        radial-gradient(500px circle at 10% 110%, rgba(251, 191, 36, 0.14), transparent 50%),
        linear-gradient(135deg, #064e3b 0%, #047857 52%, #059669 100%);
}

.hero-pattern {
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ==========================================
   TAB PANELS & SMOOTH REVEAL
   ========================================== */
.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: agroPanelIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agroPanelIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   CLEAN LAPAK & DASHBOARD CARDS
   ========================================== */
.lapak-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    box-shadow: var(--agro-shadow-card);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (hover: hover) {
    .lapak-card:hover {
        transform: translateY(-3px);
        border-color: rgba(5, 150, 105, 0.32);
        box-shadow: var(--agro-shadow-hover);
    }
}

.agro-surface-card {
    background: #ffffff;
    border: 1px solid var(--agro-border);
    box-shadow: 0 8px 26px -8px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bg-white.rounded-2xl.border,
.bg-white.rounded-3xl.border {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: var(--agro-shadow-card);
}

/* ==========================================
   FRIENDLY COLORFUL SUPERAPP SERVICE TILES
   ========================================== */
.agro-tile, .gojek-tile {
    position: relative;
    transition: transform 0.16s ease;
    cursor: pointer;
}

.agro-tile:active, .gojek-tile:active {
    transform: scale(0.94);
}

.agro-tile .agro-icon-box,
.gojek-tile .gojek-icon-box {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

@media (hover: hover) {
    .agro-tile:hover .agro-icon-box,
    .gojek-tile:hover .gojek-icon-box {
        transform: translateY(-3px);
        box-shadow: 0 8px 18px -6px rgba(5, 150, 105, 0.24);
    }
}

.agro-tile.active .agro-icon-box,
.gojek-tile.active .gojek-icon-box {
    box-shadow: 0 0 0 2.5px #059669, 0 8px 18px -6px rgba(5, 150, 105, 0.32);
    transform: translateY(-2px);
}

.agro-tile.active .tile-label,
.gojek-tile.active .tile-label {
    color: #047857 !important;
    font-weight: 800 !important;
}

/* ==========================================
   CRISP FORM INPUTS, SELECT ARROWS & BUTTONS
   ========================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="url"],
select,
textarea {
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.2rem !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16) !important;
}

button, a.rounded-xl, a.rounded-2xl, a.rounded-full {
    transition: transform 0.14s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

button:active:not(:disabled) { transform: scale(0.985); }

/* ==========================================
   USER-FRIENDLY BOTTOM-SHEET & CLEAN MODALS
   ========================================== */
div.fixed.inset-0[class*="bg-slate-900"],
.agro-modal-backdrop {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

div.fixed.inset-0[class*="bg-slate-900"]:not(.hidden) > div {
    animation: agroModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.agro-sheet-modal:not(.hidden) > .agro-sheet-panel {
    animation: agroSheetSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agroModalPop {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes agroSheetSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION
   ========================================== */
.agro-bottom-nav {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
}

.mobile-nav-btn {
    position: relative;
    padding: 4px 2px;
    color: #64748b;
}

.mobile-nav-btn.active {
    color: #059669 !important;
    font-weight: 800;
}

.mobile-nav-btn.active::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 99px;
    background: #059669;
}

/* ==========================================
   UTILITIES (SCROLLBAR HIDE & TOAST)
   ========================================== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

#toast {
    box-shadow: 0 12px 30px -6px rgba(15, 23, 42, 0.3);
    animation: agroToastIn 0.22s ease;
}

@keyframes agroToastIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.28); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(5, 150, 105, 0.5); }

.secret-masked { -webkit-text-security: disc; }
