@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --public-bg: #f4f6f5;
    --public-surface: #ffffff;
    --public-surface-soft: #f8faf9;
    --public-border: #d8e2df;
    --public-border-strong: #c8d5d2;
    --public-text: #073b35;
    --public-heading: #062f2a;
    --public-muted: #66756f;
    --public-green: #009f45;
    --public-green-strong: #008a3c;
    --public-green-soft: #d8f5e4;
    --public-green-pale: #ecfbf1;
    --public-red: #ef4444;
    --public-amber: #f59e0b;
    --public-radius: 8px;
    --public-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    --public-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body.public-theme {
    min-height: 100vh;
    background: var(--public-bg) !important;
    color: var(--public-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.public-theme *,
body.public-theme input,
body.public-theme select,
body.public-theme textarea,
body.public-theme button {
    font-family: inherit;
    letter-spacing: 0 !important;
}

body.public-theme::before,
body.public-theme::after {
    display: none !important;
}

body.public-theme ::selection {
    background: rgba(0, 159, 69, 0.18);
}

body.public-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.public-theme ::-webkit-scrollbar-track {
    background: #edf1ef;
}

body.public-theme ::-webkit-scrollbar-thumb {
    background: #bdccc7;
    border: 2px solid #edf1ef;
    border-radius: 999px;
}

body.public-theme .bg-white { background-color: var(--public-surface) !important; }
body.public-theme .bg-neutral-50 { background-color: var(--public-surface-soft) !important; }
body.public-theme .bg-neutral-100 { background-color: #eff4f2 !important; }

body.public-theme .text-neutral-400 { color: #8a9994 !important; }
body.public-theme .text-neutral-500 { color: var(--public-muted) !important; }
body.public-theme .text-neutral-600 { color: #4f625c !important; }
body.public-theme .text-neutral-700 { color: #2e4640 !important; }
body.public-theme .text-neutral-800,
body.public-theme .text-neutral-900 { color: var(--public-heading) !important; }

body.public-theme .border,
body.public-theme .border-neutral-100,
body.public-theme .border-neutral-200,
body.public-theme .border-neutral-300 {
    border-color: var(--public-border) !important;
}

body.public-theme .rounded-lg,
body.public-theme .rounded-xl,
body.public-theme .rounded-2xl,
body.public-theme .rounded-3xl {
    border-radius: var(--public-radius) !important;
}

body.public-theme .shadow-sm,
body.public-theme .shadow-md,
body.public-theme .shadow-lg,
body.public-theme .shadow-xl,
body.public-theme .shadow-2xl,
body.public-theme .shadow-soft {
    box-shadow: var(--public-shadow-soft) !important;
}

body.public-theme .sticky-header,
body.public-theme header.bg-white {
    background: rgba(255, 255, 255, 0.97) !important;
    border-color: var(--public-border) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    backdrop-filter: blur(16px);
}

body.public-theme .sticky-header:first-of-type {
    background: var(--public-green) !important;
    color: #ffffff !important;
}

body.public-theme .sticky-header:first-of-type a,
body.public-theme .sticky-header:first-of-type button,
body.public-theme .sticky-header:first-of-type h1,
body.public-theme .sticky-header:first-of-type p,
body.public-theme .sticky-header:first-of-type span,
body.public-theme .sticky-header:first-of-type i {
    color: #ffffff !important;
}

body.public-theme .card,
body.public-theme .panel,
body.public-theme .user-menu,
body.public-theme .dropdown,
body.public-theme .mobile-search,
body.public-theme .cart-bar,
body.public-theme .summary-card,
body.public-theme .toast,
body.public-theme .glass,
body.public-theme section.bg-white,
body.public-theme div.bg-white.rounded-lg,
body.public-theme div.bg-white.rounded-xl,
body.public-theme div.bg-white.rounded-2xl,
body.public-theme div.bg-white.rounded-3xl,
body.public-theme a.bg-white.rounded-2xl {
    background: var(--public-surface) !important;
    border: 1px solid var(--public-border) !important;
    border-radius: var(--public-radius) !important;
    box-shadow: var(--public-shadow-soft) !important;
}

body.public-theme .glass {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(18px) !important;
}

body.public-theme .card-hover {
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

body.public-theme .card-hover:hover {
    border-color: var(--public-border-strong) !important;
    box-shadow: var(--public-shadow) !important;
    transform: translateY(-1px) !important;
}

body.public-theme .bg-gradient-to-r,
body.public-theme .bg-gradient-to-br {
    background-image: none !important;
}

body.public-theme .from-orange-400,
body.public-theme .from-orange-500,
body.public-theme .from-neutral-900,
body.public-theme .to-red-500,
body.public-theme .to-red-600,
body.public-theme .to-neutral-700,
body.public-theme .to-neutral-800 {
    --tw-gradient-from: var(--public-green) !important;
    --tw-gradient-to: var(--public-green-strong) !important;
}

body.public-theme .bg-neutral-900,
body.public-theme .bg-neutral-800,
body.public-theme .bg-orange-500,
body.public-theme .bg-green-500,
body.public-theme .bg-emerald-500 {
    background-color: var(--public-green) !important;
    color: #ffffff !important;
}

body.public-theme .hover\:bg-neutral-800:hover,
body.public-theme .hover\:bg-neutral-900:hover,
body.public-theme .hover\:bg-orange-600:hover,
body.public-theme .hover\:bg-green-600:hover,
body.public-theme .hover\:bg-emerald-600:hover {
    background-color: var(--public-green-strong) !important;
}

body.public-theme .bg-orange-50,
body.public-theme .bg-green-50,
body.public-theme .bg-emerald-50 {
    background-color: var(--public-green-pale) !important;
}

body.public-theme .bg-orange-100,
body.public-theme .bg-green-100,
body.public-theme .bg-emerald-100 {
    background-color: var(--public-green-soft) !important;
}

body.public-theme .text-orange-500,
body.public-theme .text-orange-600,
body.public-theme .text-orange-700,
body.public-theme .text-green-500,
body.public-theme .text-green-600,
body.public-theme .text-emerald-500,
body.public-theme .text-emerald-600 {
    color: var(--public-green) !important;
}

body.public-theme .border-orange-100,
body.public-theme .border-orange-200,
body.public-theme .border-green-100,
body.public-theme .border-green-200,
body.public-theme .border-emerald-100,
body.public-theme .border-emerald-200 {
    border-color: #a9dec0 !important;
}

body.public-theme button,
body.public-theme a[class*="px-"][class*="py-"],
body.public-theme input[type="submit"],
body.public-theme input[type="button"] {
    border-radius: 7px !important;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

body.public-theme button:hover,
body.public-theme a[class*="px-"][class*="py-"]:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

body.public-theme input,
body.public-theme select,
body.public-theme textarea {
    min-height: 40px;
    background: #fff !important;
    border: 1px solid var(--public-border-strong) !important;
    border-radius: 7px !important;
    color: var(--public-heading) !important;
    outline: none !important;
}

body.public-theme input::placeholder,
body.public-theme textarea::placeholder {
    color: #7b8d87 !important;
}

body.public-theme input:focus,
body.public-theme select:focus,
body.public-theme textarea:focus,
body.public-theme .focus\:border-neutral-900:focus,
body.public-theme .focus\:border-orange-500:focus,
body.public-theme .focus\:ring-neutral-900\/10:focus,
body.public-theme .focus\:ring-orange-500\/10:focus {
    border-color: var(--public-green) !important;
    box-shadow: 0 0 0 3px rgba(0, 159, 69, 0.13) !important;
}

body.public-theme label {
    color: #294941 !important;
    font-weight: 700 !important;
}

body.public-theme table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    color: var(--public-text);
}

body.public-theme table thead th {
    background: #f7faf9 !important;
    color: #52655f !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    border-bottom: 1px solid var(--public-border) !important;
    padding: 13px 16px !important;
    white-space: nowrap;
}

body.public-theme table tbody td {
    border-bottom: 1px solid var(--public-border) !important;
    padding: 14px 16px !important;
    vertical-align: middle;
}

body.public-theme table tbody tr:last-child td {
    border-bottom: 0 !important;
}

body.public-theme table tbody tr:hover td {
    background: #f8fbfa !important;
}

body.public-theme .category-pill,
body.public-theme .filter-pill,
body.public-theme .tab,
body.public-theme [class*="pill"] {
    border-radius: 999px !important;
}

body.public-theme .category-pill:not(.active) {
    background: #fff !important;
    border-color: var(--public-border) !important;
    color: #2e4640 !important;
}

body.public-theme .category-pill:not(.active):hover {
    border-color: var(--public-green) !important;
    color: var(--public-green) !important;
}

body.public-theme .category-pill.active,
body.public-theme .filter-pill.active,
body.public-theme .tab.active,
body.public-theme .qty-btn.add,
body.public-theme .price-tag,
body.public-theme .toast {
    background: var(--public-green) !important;
    border-color: var(--public-green) !important;
    color: #ffffff !important;
}

body.public-theme .item-badge,
body.public-theme .status-badge,
body.public-theme .badge,
body.public-theme .available {
    border-radius: 999px !important;
}

body.public-theme .item-badge,
body.public-theme .price-tag:not(.bg-neutral-900) {
    background: var(--public-green-soft) !important;
    color: var(--public-green) !important;
}

body.public-theme .qty-btn {
    border: 1px solid var(--public-border) !important;
    background: #fff !important;
    color: var(--public-text) !important;
}

body.public-theme .qty-btn.add {
    background: var(--public-green) !important;
    color: #fff !important;
}

body.public-theme .cart-item,
body.public-theme .menu-item {
    border-radius: var(--public-radius) !important;
}

body.public-theme .sidebar {
    background: #fff !important;
    border-right: 1px solid var(--public-border) !important;
    box-shadow: none !important;
}

body.public-theme .sidebar a {
    border-radius: 7px !important;
    color: #415166 !important;
}

body.public-theme .sidebar a:hover,
body.public-theme .sidebar a.bg-neutral-100,
body.public-theme .sidebar a.bg-orange-50 {
    background: var(--public-green-soft) !important;
    color: var(--public-green) !important;
}

body.public-theme .mobile-menu,
body.public-theme .overlay {
    background: rgba(7, 21, 42, 0.42) !important;
    backdrop-filter: blur(4px);
}

body.public-theme .text-red-600,
body.public-theme .text-red-500 { color: var(--public-red) !important; }
body.public-theme .bg-red-50 { background-color: #fff1f2 !important; }
body.public-theme .bg-red-500 { background-color: var(--public-red) !important; color: #fff !important; }
body.public-theme .border-red-200 { border-color: #fecdd3 !important; }

@media (max-width: 768px) {
    body.public-theme main {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.public-theme table thead th,
    body.public-theme table tbody td {
        padding: 11px 12px !important;
    }

    body.public-theme header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* Reference dashboard revamp: compact store UI aligned with New-Dashboard-UI.php */
body.public-theme {
    --public-bg: #f3f4f6;
    --public-surface: #ffffff;
    --public-surface-soft: #f9fafb;
    --public-border: #e5e7eb;
    --public-border-strong: #d1d5db;
    --public-text: #111827;
    --public-heading: #111827;
    --public-muted: #6b7280;
    --public-green: #16a34a;
    --public-green-strong: #15803d;
    --public-green-soft: #dcfce7;
    --public-green-pale: #f0fdf4;
    --public-radius: 8px;
    --public-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
    --public-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05);
    background: var(--public-bg) !important;
}

/* Main Header - Green background with white text */
body.public-theme .main-header {
    background: #16a34a !important;
    border-bottom: 1px solid #15803d !important;
    color: #ffffff !important;
}

body.public-theme .main-header a,
body.public-theme .main-header button,
body.public-theme .main-header h1,
body.public-theme .main-header h2,
body.public-theme .main-header p,
body.public-theme .main-header span,
body.public-theme .main-header i,
body.public-theme .main-header div {
    color: #ffffff !important;
}

/* Sub Header - White background with dark text */
body.public-theme .sub-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #111827 !important;
}

body.public-theme .sub-header h2,
body.public-theme .sub-header h3,
body.public-theme .sub-header h4 {
    color: #111827 !important;
}

body.public-theme > header,
body.public-theme header.bg-white {
    background: #ffffff !important;
    border-bottom: 1px solid var(--public-border) !important;
    color: var(--public-text) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03) !important;
}

/* Remove old conflicting sticky-header styles */
body.public-theme .sticky-header:first-of-type {
    background: #16a34a !important;
    border-color: #15803d !important;
}

body.public-theme .sticky-header:first-of-type a,
body.public-theme .sticky-header:first-of-type button,
body.public-theme .sticky-header:first-of-type h1,
body.public-theme .sticky-header:first-of-type p,
body.public-theme .sticky-header:first-of-type span,
body.public-theme .sticky-header:first-of-type i {
    color: #ffffff !important;
}

body.public-theme main {
    background: transparent !important;
}

body.public-theme .card,
body.public-theme .panel,
body.public-theme .user-menu,
body.public-theme .dropdown,
body.public-theme .mobile-search,
body.public-theme .cart-bar,
body.public-theme .summary-card,
body.public-theme .toast,
body.public-theme .glass,
body.public-theme section.bg-white,
body.public-theme div.bg-white.rounded-lg,
body.public-theme div.bg-white.rounded-xl,
body.public-theme div.bg-white.rounded-2xl,
body.public-theme div.bg-white.rounded-3xl,
body.public-theme a.bg-white.rounded-2xl,
body.public-theme .menu-item,
body.public-theme .cart-item {
    border: 1px solid var(--public-border) !important;
    border-radius: 8px !important;
    box-shadow: var(--public-shadow-soft) !important;
}

body.public-theme .card-hover:hover,
body.public-theme .menu-item:hover,
body.public-theme .cart-item:hover {
    border-color: var(--public-border-strong) !important;
    box-shadow: var(--public-shadow) !important;
    transform: translateY(-1px) !important;
}

body.public-theme .bg-gradient-to-r,
body.public-theme .bg-gradient-to-br {
    background: var(--public-green) !important;
    color: #ffffff !important;
}

body.public-theme .bg-gradient-to-r *,
body.public-theme .bg-gradient-to-br * {
    color: inherit;
}

body.public-theme .bg-neutral-900,
body.public-theme .bg-neutral-800,
body.public-theme .bg-orange-500,
body.public-theme .bg-green-500,
body.public-theme .bg-emerald-500,
body.public-theme button[type="submit"],
body.public-theme input[type="submit"],
body.public-theme .qty-btn.add {
    background: var(--public-green) !important;
    border-color: var(--public-green) !important;
    color: #ffffff !important;
}

body.public-theme .bg-neutral-900:hover,
body.public-theme .bg-neutral-800:hover,
body.public-theme .bg-orange-500:hover,
body.public-theme .bg-green-500:hover,
body.public-theme .bg-emerald-500:hover,
body.public-theme button[type="submit"]:hover,
body.public-theme input[type="submit"]:hover,
body.public-theme .qty-btn.add:hover {
    background: var(--public-green-strong) !important;
}

body.public-theme button,
body.public-theme a[class*="px-"][class*="py-"],
body.public-theme input[type="submit"],
body.public-theme input[type="button"] {
    min-height: 36px;
}

body.public-theme input,
body.public-theme select,
body.public-theme textarea {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.public-theme .category-pill,
body.public-theme .filter-pill,
body.public-theme .tab,
body.public-theme [class*="pill"] {
    min-height: 34px;
    border-radius: 999px !important;
}

body.public-theme .price-tag,
body.public-theme .item-badge,
body.public-theme .status-badge,
body.public-theme .badge,
body.public-theme .available {
    border-radius: 999px !important;
    font-weight: 700 !important;
}

body.public-theme table thead th {
    background: #f9fafb !important;
    color: var(--public-muted) !important;
    padding: 12px 16px !important;
}

body.public-theme table tbody td {
    color: var(--public-text);
    padding: 12px 16px !important;
}

body.public-theme .text-xs.uppercase,
body.public-theme [class*="tracking-"] {
    letter-spacing: 0.04em !important;
}

body.public-theme .rounded-full {
    border-radius: 999px !important;
}

body.public-theme .w-10.h-10.rounded-xl,
body.public-theme .w-12.h-12.rounded-2xl,
body.public-theme .w-16.h-16.rounded-xl,
body.public-theme .w-20.h-20.rounded-2xl,
body.public-theme .w-24.h-24.rounded-full {
    border-radius: 8px !important;
}

body.public-theme .glass {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
}

body.public-theme .summary-card {
    top: 5rem;
}

@media (max-width: 768px) {
    body.public-theme main {
        padding-top: 18px !important;
    }
}
