/**
 * Sanamahi Graphix ERP — Base Reset & Typography
 * Architecture: Enterprise SaaS Typography & Foundations
 */

/* Enable Cross-Document View Transitions (smooth page loads) */
@view-transition {
  navigation: auto;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: clip;
    font-variant-numeric: tabular-nums; /* Makes numbers perfectly aligned and clean */
}

/* ── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

::selection {
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
}

/* ── Typography Scale & Weights ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

h1, .page-title {
    font-size: 1.375rem; /* 22px */
    font-weight: 700;
}

h2, .section-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
}

h3, .card-title {
    font-size: 0.9375rem; /* 15px */
    font-weight: 600;
}

h4 {
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
}

p, .body-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.text-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.text-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

code, kbd, samp, pre {
    font-family: var(--font-code, monospace);
    font-size: 0.8125rem;
}

.text-mono {
    font-family: var(--font-sans);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "cv05" 1;
    letter-spacing: -0.01em;
}

/* Utility text color classes */
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-dim       { color: var(--text-muted) !important; }
.text-disabled  { color: var(--text-disabled) !important; }
.text-success   { color: var(--color-success) !important; }
.text-warning   { color: var(--color-warning) !important; }
.text-danger    { color: var(--color-danger) !important; }
.text-info      { color: var(--color-info) !important; }
.text-purple    { color: var(--color-purple, #c084fc) !important; }
.text-emerald   { color: var(--color-success, #22c55e) !important; }
.text-sky       { color: #38bdf8 !important; }
.text-amber     { color: var(--color-warning, #f59e0b) !important; }
.text-rose      { color: var(--color-danger, #f43f5e) !important; }


/* ── SVG Feather Line Icon Primitives ───────────────────────── */
.icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 16px; height: 16px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* ── Utility Classes ────────────────────────────────────────────── */
.hidden { display: none !important; }

/* Text Alignment */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Flex Utilities */
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }

/* Brand Typography */
.font-brand, .brand-title, .company-brand-title {
    font-family: var(--font-brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
