/* ==========================================================================
   CALAKAN Enterprise Portal - Base / Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    line-height: var(--lh-norm);
    color: var(--text);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    color: var(--text);
}

p { margin: 0; }

a {
    color: var(--brand-1);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--brand-2); }

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

input, select, textarea {
    font: inherit;
    color: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

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

:focus-visible {
    outline: 3px solid var(--brand-1);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection {
    background: rgba(91, 141, 239, 0.35);
    color: #fff;
}

/* Skip link for keyboard users */
.skip-link {
    position: fixed;
    top: -100px;
    left: 12px;
    z-index: var(--z-toast);
    padding: 10px 16px;
    background: var(--brand-1);
    color: #fff;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow);
    transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* Utility */
.text-ok   { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-err  { color: var(--err); }
.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;
}
[hidden] { display: none !important; }

/* Glass utility */
.glass {
    background: var(--surface);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* Gradient text */
.grad-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(100, 120, 180, 0.25);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(91, 141, 239, 0.45); background-clip: padding-box; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
