/**
 * JAKTRON MODERN TECH CORPORATE DESIGN TOKENS
 * Standardized Typography & Icon System
 * Aesthetic: Minimalist, Sharp, Clean Corporate
 */

:root {
    /* ── Typography Families ── */
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

    /* ── Font Weights ── */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    /* ── Modular Font Sizes ── */
    --fs-xs: 0.75rem;     /* 12px - minimum allowed */
    --fs-sm: 0.813rem;    /* 13px - table headers, meta, picker detail */
    --fs-base: 0.875rem;  /* 14px - table cells, menu, form inputs, buttons */
    --fs-md: 0.938rem;    /* 15px - table footer, body copy, card labels */
    --fs-lg: 1rem;        /* 16px - body regular, card headers */
    --fs-xl: 1.125rem;    /* 18px - dashboard section headers */
    --fs-2xl: 1.25rem;    /* 20px - subheadings */
    --fs-3xl: 1.5rem;     /* 24px - page titles */
    --fs-4xl: 1.75rem;    /* 28px - KPI numbers */
    --fs-5xl: 2rem;       /* 32px - large KPI stats */

    /* ── Responsive Fluid Scales (clamp) ── */
    --fs-hero-h1: clamp(2.5rem, 5vw, 4rem);
    --fs-hero-h2: clamp(1.75rem, 3vw, 2.5rem);
    --fs-hero-h3: clamp(1.25rem, 2vw, 1.5rem);
    --fs-stat-number: clamp(2rem, 4vw, 3rem);

    /* ── Line Heights ── */
    --lh-tight: 1.2;
    --lh-snug: 1.35;
    --lh-normal: 1.5;
    --lh-relaxed: 1.65;
    --lh-loose: 1.75;

    /* ── Letter Spacing ── */
    --ls-tight: -0.025em;
    --ls-snug: -0.015em;
    --ls-normal: 0em;
    --ls-wide: 0.02em;
    --ls-wider: 0.05em;

    /* ── Standard Icon Sizes ── */
    --icon-sm: 16px;
    --icon-md: 20px;
    --icon-lg: 24px;
    --icon-xl: 32px;
}

/* ── Global Font Smoothing & Base Rendering ── */
html, body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Headings use Display Font */
h1, h2, h3, h4, h5, h6,
.font-display,
.heading-display {
    font-family: var(--font-display);
    letter-spacing: var(--ls-tight);
}

.font-body {
    font-family: var(--font-body);
}

/* ── Tabular Numbers (Currency, Tables, Numeric Data) ── */
.tabular-nums,
.num,
.currency,
td.col-number,
input[type="number"],
.table-numeric {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ── Standardized Icon System (SVG) ── */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -0.15em;
    flex-shrink: 0;
    width: var(--icon-md);
    height: var(--icon-md);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm { width: var(--icon-sm); height: var(--icon-sm); }
.icon-md { width: var(--icon-md); height: var(--icon-md); }
.icon-lg { width: var(--icon-lg); height: var(--icon-lg); }
.icon-xl { width: var(--icon-xl); height: var(--icon-xl); }

/* Spacing between icon and adjacent text */
.btn-with-icon,
.menu-item-with-icon,
.icon-gap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-with-icon-sm,
.icon-gap-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Layout Fixes for Typography Migration ── */
/* Table Quantity wrapping */
.col-qty,
td[data-col="quantity"],
th[data-col="quantity"],
.table-quotation td:nth-child(6),
.table-quotation th:nth-child(6) {
    white-space: normal !important;
    word-break: break-word;
    max-width: 170px;
    line-height: var(--lh-snug);
}

/* Table Location wrapping & line height */
.col-lokasi,
td[data-col="lokasi"],
th[data-col="lokasi"],
.table-quotation td:nth-child(4),
.table-quotation th:nth-child(4) {
    white-space: normal !important;
    line-height: var(--lh-snug);
    font-size: var(--fs-base);
}

/* Project Tab Bar Heights and Spacing */
.tab-project-btn {
    min-height: 38px;
    height: 38px;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
}

.tab-project-btn.active {
    font-weight: var(--fw-semibold);
}

/* Table Headers */
.quotation-table th,
.table thead th {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
}

/* Table Footers */
.quotation-table tfoot td,
.table-total-row {
    font-family: var(--font-body);
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
}

/* Export PDF/PNG Typography */
.export-company-name {
    font-family: var(--font-display) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
}

.export-company-sub {
    font-family: var(--font-body) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.export-company-address {
    font-family: var(--font-body) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #475569 !important;
}
