/* =========================================================================
   MurliGanj Local Store — Base Stylesheet (base.css)
   Self-contained design foundation for the Vendor / Rider / Provider /
   Auth / Admin auxiliary panels. Works alongside the self-hosted Tailwind
   Play CDN. Provides resets + the structural primitives those panels use
   (sidebar shell, cards, tables, buttons, forms) so the layout never
   collapses even before Tailwind utilities apply.
   ========================================================================= */

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-soft: #f0fdf4;
    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --sidebar-w: 16rem;
    --header-h: 4rem;
    --radius: 1rem;
    --radius-sm: 0.625rem;
    --shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.06);
    --shadow-lg: 0 10px 30px -12px rgba(16,24,40,.18);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; max-width: 100vw; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; object-fit: contain; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }

/* ---------- Layout shell (used by vendor / rider / provider panels) ---------- */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
}
.main-content,
[class*="lg:ml-64"] { /* fallback wrapper */ }

@media (min-width: 1024px) {
    body:has(.sidebar) { padding-left: var(--sidebar-w); }
    .sidebar { transform: none !important; }
}

/* ---------- Cards ---------- */
.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    position: relative;
}
.section { background: #fff; border:1px solid var(--gray-200); border-radius: var(--radius); padding: 1.25rem; }

/* ---------- Tables ---------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
th { color: var(--gray-500); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: .04em; }
tbody tr:hover { background: var(--gray-50); }

/* ---------- Forms ---------- */
input, select, textarea {
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    background: #fff;
    color: var(--gray-800);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font-weight: 600; font-size: .9rem;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: .6rem 1.1rem; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.btn-primary, .bg-primary-600 {
    background: var(--primary) !important; color: #fff !important;
}
.btn-primary:hover { background: var(--primary-dark) !important; }

/* ---------- Utility helpers (fallback for panels not fully on Tailwind) ---------- */
.text-truncate, .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.hidden { display: none !important; }

/* ---------- Mobile ---------- */
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s ease; }
    .sidebar.open { transform: translateX(0); }
    body { padding-left: 0; }
}
@media (max-width: 640px) {
    input, select, textarea { font-size: 16px; }
    button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
}
