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

:root {
    /* =========================================================
       NEW THEME: Modern ERP (Navy + Cyan Accent) — Professional
       ========================================================= */

    /* Brand */
    --primary: #0f172a;                 /* Navy ink */
    --primary-foreground: #ffffff;
    --accent: #06b6d4;                  /* Cyan accent */
    --accent-foreground: #06242a;

    /* Canvas */
    --background: #f8fafc;              /* Soft slate canvas */
    --foreground: #0f172a;

    /* Surfaces */
    --surface: #ffffff;                 /* Cards, panels */
    --surface-soft: #f1f5f9;            /* Soft section bg */
    --surface-muted: #e2e8f0;           /* Muted rows */

    /* Neutral UI */
    --secondary: #eef2ff;               /* subtle indigo tint */
    --secondary-foreground: #0f172a;

    --muted: #f1f5f9;
    --muted-foreground: #64748b;

    /* Borders & Inputs */
    --border: #e2e8f0;
    --border-strong: #94a3b8;
    --input: #e2e8f0;
    --ring: rgba(6, 182, 212, 0.25);   /* focus ring based on accent */

    /* Status */
    --success: #16a34a;
    --success-foreground: #ffffff;

    --warning: #f59e0b;
    --warning-foreground: #111827;

    --destructive: #ef4444;
    --destructive-foreground: #ffffff;

    /* Tables */
    --table-header: #f1f5f9;
    --table-row-hover: rgba(15, 23, 42, 0.035);
    --table-stripe: #fbfdff;

    /* Typography */
    --heading: #0f172a;
    --text: #0f172a;
    --text-muted: #64748b;

    /* Radius & Motion */
    --radius: 14px;                     /* Modern soft */
    --radius-sm: 10px;
    --transition: 160ms ease;
    --shadow: 0 10px 30px rgba(2, 6, 23, .08);
    --shadow2: 0 8px 20px rgba(2, 6, 23, .10);
}

/* -----------------------------
   Base
----------------------------- */
html, body { height: 100%; }

body {
    font-family: 'Inter Tight', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    margin: 0;
    padding: 0;
}

.font-mono {
    font-family: 'Roboto Mono', monospace;
}

/* -----------------------------
   Utility overrides (Tailwind-friendly)
----------------------------- */
.border-border { border-color: var(--border) !important; }
.bg-background { background-color: var(--background) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.text-muted-foreground { color: var(--muted-foreground) !important; }

/* If you used sharp corners earlier, now make it modern */
.rounded-none { border-radius: 0 !important; }

/* Optional: global smooth corners for common elements */
.card, .panel, .box {
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Inputs */
input, select, textarea {
    border-radius: var(--radius-sm);
    border: 1px solid var(--input);
    transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
    background: #fff;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(6, 182, 212, .55);
    box-shadow: 0 0 0 4px var(--ring);
}

/* Buttons (optional helpers) */
.btn-primary {
    background: linear-gradient(180deg, var(--primary), #0b1220);
    color: var(--primary-foreground);
    border: 1px solid rgba(15, 23, 42, .8);
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.btn-primary:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: var(--shadow2);
}

.btn-accent {
    background: linear-gradient(180deg, var(--accent), #0891b2);
    color: var(--accent-foreground);
    border: 1px solid rgba(6, 182, 212, .5);
    border-radius: var(--radius-sm);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.btn-accent:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: var(--shadow2);
}

/* -----------------------------
   Mobile Sidebar (improved)
----------------------------- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 290px;
    height: 100vh;
    background: var(--surface);
    z-index: 1000;
    transition: left 0.28s ease-in-out;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow2);
}

.mobile-sidebar.active { left: 0; }

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.55);
    z-index: 999;
    display: none;
}

.mobile-overlay.active { display: block; }

/* Optional: nicer scrollbars */
.mobile-sidebar::-webkit-scrollbar { width: 10px; }
.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .6);
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.7);
}

/* -----------------------------
   Table styles (modern + professional)
----------------------------- */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-weight: 800;
    color: #334155;
    background: var(--table-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
}

tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border);
    color: #0f172a;
    background: #fff;
}

/* Zebra */
tbody tr:nth-child(even) td {
    background: var(--table-stripe);
}

tbody tr:hover td {
    background-color: var(--table-row-hover);
}

/* Optional: first/last cell rounding inside wrapper */
thead th:first-child { border-top-left-radius: var(--radius); }
thead th:last-child { border-top-right-radius: var(--radius); }

/* -----------------------------
   Small UX touches
----------------------------- */
a {
    color: #0ea5e9;
    text-decoration: none;
    transition: opacity var(--transition);
}
a:hover { opacity: .9; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
}

/* -----------------------------
   Print styles
----------------------------- */
@media print {
    .no-print { display: none !important; }
    body { background: white !important; }
    .print-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* reduce shadows on print */
    .card, .panel, .box, .table-wrapper {
        box-shadow: none !important;
    }
}
