/* ERP Elitse — base.css
   Design tokens, reset, base typography and app layout.
   Montserrat is loaded via <link> in base.html. */

:root {
    /* Brand colors */
    --primary: #4e8072;
    --primary-dark: #3a6057;
    --primary-light: #6a9e8f;
    --primary-bg: #f0f5f4;

    /* Neutrals */
    --white: #ffffff;
    --text: #2c2c2c;
    --text-muted: #6b7280;
    --border: #e0e7e5;

    /* Status / accent colors */
    --danger: #dc2626;
    --warning: #d97706;
    --amber: #EF9F27;
    --amber-dark: #854F0B;
    --blue: #378ADD;
    --blue-dark: #185FA5;

    /* Soft (tinted) backgrounds for badges/alerts */
    --green-soft: rgba(78, 128, 114, 0.10);
    --amber-soft: rgba(239, 159, 39, 0.14);
    --blue-soft: rgba(55, 138, 221, 0.12);
    --red-soft: rgba(220, 38, 38, 0.10);
    --gray-soft: rgba(107, 114, 128, 0.12);

    /* Typography */
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-base: 13px;
    --fs-md: 14px;
    --fs-lg: 16px;
    --fs-xl: 20px;
    --fs-2xl: 26px;
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --lh-base: 1.5;

    /* Spacing scale */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;

    /* Border radius */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);

    /* Layout */
    --sidebar-width: 220px;
    --sidebar-collapsed: 52px;
    --topbar-height: 52px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);
    color: var(--text);
    background: var(--primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* ---------- Base typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-semibold);
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin-bottom: var(--sp-2); }

small { font-size: var(--fs-sm); }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }

strong, b { font-weight: var(--fw-semibold); }

/* ---------- App layout ---------- */
.app-layout {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.page-content {
    flex: 1 1 auto;
    overflow-y: auto;
}
