/**
 * AutoParts Pro CEO Dashboard
 * Base Styles & Reset
 * EDESSIS SRL - 2026
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: 1.5;
    background-color: var(--bg);
    color: var(--tx);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Alternative: Show thin scrollbar on desktop */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
        display: block;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: var(--radius-full);
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: 1.2;
    margin: 0;
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    margin: 0;
    color: var(--t2);
}

a {
    color: var(--pl);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--p);
}

small {
    font-size: var(--fs-sm);
}

strong, b {
    font-weight: var(--fw-bold);
}

/* ===== LISTS ===== */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===== FORMS ===== */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
    border: none;
    background: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--t3);
}

button {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== IMAGES & MEDIA ===== */
img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

canvas {
    display: block;
}

/* ===== TABLES ===== */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* ===== SELECTION ===== */
::selection {
    background-color: var(--p);
    color: #fff;
}

/* ===== FOCUS STATES ===== */
:focus-visible {
    outline: 2px solid var(--p);
    outline-offset: 2px;
}

/* ===== SCREEN READER ONLY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--sp-6);
}

/* ===== MAIN PAGE WRAPPER ===== */
.page-wrapper {
    padding-top: calc(var(--topbar-height) + var(--sp-3));
    padding-bottom: calc(var(--bottomnav-height) + var(--sp-10));
    min-height: 100vh;
}

.page {
    display: none;
    padding: 0 var(--sp-6);
    animation: slideUp var(--transition-slow);
}

.page.active {
    display: block;
}

/* ===== FLEXBOX UTILITIES ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ===== GAP UTILITIES ===== */
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }

/* ===== GRID UTILITIES ===== */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== SPACING UTILITIES ===== */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }

.p-0 { padding: 0; }
.p-3 { padding: var(--sp-3); }
.p-4 { padding: var(--sp-4); }
.p-5 { padding: var(--sp-5); }
.p-6 { padding: var(--sp-6); }

/* ===== TEXT UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }
.text-nowrap { white-space: nowrap; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-light { font-weight: var(--fw-light); }
.font-normal { font-weight: var(--fw-regular); }
.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }
.font-extrabold { font-weight: var(--fw-extrabold); }

/* ===== VISIBILITY ===== */
.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* ===== OVERFLOW ===== */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* ===== POSITION ===== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ===== BORDER RADIUS ===== */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ===== TRANSITIONS ===== */
.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* ===== CURSORS ===== */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* ===== RESPONSIVE CONTAINER ===== */
@media (min-width: 500px) {
    .page-wrapper {
        max-width: var(--max-content-width);
        margin: 0 auto;
    }
}