/* ================================================================
   UTILITIES.CSS  —  Helper Classes
   Project T.A.H.I.T.I. Account Portal — Refactored CSS System
   All rules use !important so they override component defaults.
   ================================================================ */

/* ================================================================
   MARGIN TOP
   ================================================================ */
.mt-0   { margin-top: 0 !important; }
.mt-1   { margin-top: var(--sp-1) !important; }
.mt-2   { margin-top: var(--sp-2) !important; }
.mt-3   { margin-top: var(--sp-3) !important; }
.mt-4   { margin-top: var(--sp-4) !important; }
.mt-5   { margin-top: var(--sp-5) !important; }
.mt-6   { margin-top: var(--sp-6) !important; }
.mt-8   { margin-top: var(--sp-8) !important; }
.mt-10  { margin-top: var(--sp-10) !important; }
.mt-12  { margin-top: var(--sp-12) !important; }

/* ================================================================
   MARGIN BOTTOM
   ================================================================ */
.mb-0   { margin-bottom: 0 !important; }
.mb-1   { margin-bottom: var(--sp-1) !important; }
.mb-2   { margin-bottom: var(--sp-2) !important; }
.mb-3   { margin-bottom: var(--sp-3) !important; }
.mb-4   { margin-bottom: var(--sp-4) !important; }
.mb-5   { margin-bottom: var(--sp-5) !important; }
.mb-6   { margin-bottom: var(--sp-6) !important; }
.mb-8   { margin-bottom: var(--sp-8) !important; }
.mb-10  { margin-bottom: var(--sp-10) !important; }
.mb-12  { margin-bottom: var(--sp-12) !important; }

/* ================================================================
   MARGIN LEFT / RIGHT / AUTO
   ================================================================ */
.ml-auto  { margin-left: auto !important; }
.mr-auto  { margin-right: auto !important; }
.mx-auto  { margin-left: auto !important; margin-right: auto !important; }

/* ================================================================
   PADDING
   ================================================================ */
.p-0   { padding: 0 !important; }
.p-1   { padding: var(--sp-1) !important; }
.p-2   { padding: var(--sp-2) !important; }
.p-3   { padding: var(--sp-3) !important; }
.p-4   { padding: var(--sp-4) !important; }
.p-5   { padding: var(--sp-5) !important; }
.p-6   { padding: var(--sp-6) !important; }
.p-8   { padding: var(--sp-8) !important; }

.pt-0  { padding-top: 0 !important; }
.pt-4  { padding-top: var(--sp-4) !important; }
.pt-6  { padding-top: var(--sp-6) !important; }
.pt-8  { padding-top: var(--sp-8) !important; }

.pb-0  { padding-bottom: 0 !important; }
.pb-4  { padding-bottom: var(--sp-4) !important; }

.px-4  { padding-left: var(--sp-4) !important; padding-right: var(--sp-4) !important; }
.px-5  { padding-left: var(--sp-5) !important; padding-right: var(--sp-5) !important; }
.py-3  { padding-top: var(--sp-3) !important; padding-bottom: var(--sp-3) !important; }
.py-4  { padding-top: var(--sp-4) !important; padding-bottom: var(--sp-4) !important; }

/* ================================================================
   TEXT ALIGNMENT
   ================================================================ */
.text-left      { text-align: left !important; }
.text-center    { text-align: center !important; }
.text-right     { text-align: right !important; }

/* ================================================================
   TEXT COLOR
   ================================================================ */
.text-accent    { color: var(--clr-accent) !important; }
.text-success   { color: var(--clr-success) !important; }
.text-danger    { color: var(--clr-danger) !important; }
.text-warning   { color: var(--clr-warning) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-primary   { color: var(--text-primary) !important; }
.text-inverse   { color: var(--text-inverse) !important; }

/* ================================================================
   FONT SIZE
   ================================================================ */
.text-xs   { font-size: var(--text-xs) !important; }
.text-sm   { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg   { font-size: var(--text-lg) !important; }
.text-xl   { font-size: var(--text-xl) !important; }
.text-2xl  { font-size: var(--text-2xl) !important; }
.text-3xl  { font-size: var(--text-3xl) !important; }
.text-4xl  { font-size: var(--text-4xl) !important; }

/* ================================================================
   FONT WEIGHT & STYLE
   ================================================================ */
.font-normal  { font-weight: 400 !important; }
.font-medium  { font-weight: 500 !important; }
.font-bold    { font-weight: 600 !important; }
.font-bolder  { font-weight: 700 !important; }
.font-italic  { font-style: italic !important; }
.font-mono    { font-family: var(--font-mono) !important; }
.font-brand   { font-family: var(--font-brand) !important; }

/* ================================================================
   DISPLAY
   ================================================================ */
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex         { display: flex !important; }
.d-grid         { display: grid !important; }

/* ================================================================
   FLEXBOX
   ================================================================ */
.flex-row     { display: flex !important; flex-direction: row; }
.flex-col     { display: flex !important; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap !important; }
.flex-nowrap  { flex-wrap: nowrap !important; }
.flex-1       { flex: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-grow-1  { flex-grow: 1 !important; }

.justify-start   { justify-content: flex-start !important; }
.justify-end     { justify-content: flex-end !important; }
.justify-center  { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-around  { justify-content: space-around !important; }

.align-start   { align-items: flex-start !important; }
.align-end     { align-items: flex-end !important; }
.align-center  { align-items: center !important; }
.align-stretch { align-items: stretch !important; }

.gap-1   { gap: var(--sp-1) !important; }
.gap-2   { gap: var(--sp-2) !important; }
.gap-3   { gap: var(--sp-3) !important; }
.gap-4   { gap: var(--sp-4) !important; }
.gap-5   { gap: var(--sp-5) !important; }
.gap-6   { gap: var(--sp-6) !important; }
.gap-8   { gap: var(--sp-8) !important; }

/* ================================================================
   WIDTH & HEIGHT
   ================================================================ */
.w-auto   { width: auto !important; }
.w-full   { width: 100% !important; }
.w-half   { width: 50% !important; }
.w-third  { width: 33.333% !important; }
.h-full   { height: 100% !important; }

.max-w-xs { max-width: 320px !important; }
.max-w-sm { max-width: 440px !important; }
.max-w-md { max-width: 640px !important; }
.max-w-lg { max-width: 900px !important; }
.max-w-xl { max-width: 1200px !important; }

/* ================================================================
   BORDER & BORDER RADIUS
   ================================================================ */
.border      { border: 1px solid var(--border) !important; }
.border-top  { border-top: 1px solid var(--border) !important; }
.border-0    { border: none !important; }
.border-accent { border-color: var(--clr-accent) !important; }

.rounded     { border-radius: var(--radius) !important; }
.rounded-sm  { border-radius: var(--radius-sm) !important; }
.rounded-lg  { border-radius: var(--radius-lg) !important; }
.rounded-xl  { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* ================================================================
   BACKGROUND
   ================================================================ */
.bg-surface   { background: var(--bg-surface) !important; }
.bg-elevated  { background: var(--bg-elevated) !important; }
.bg-page      { background: var(--bg-page) !important; }
.bg-accent    { background: var(--clr-accent) !important; }

/* ================================================================
   OVERFLOW
   ================================================================ */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto   { overflow: auto !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* ================================================================
   POSITION
   ================================================================ */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed    { position: fixed !important; }
.sticky   { position: sticky !important; }

/* ================================================================
   OPACITY
   ================================================================ */
.opacity-0   { opacity: 0 !important; }
.opacity-50  { opacity: 0.5 !important; }
.opacity-75  { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ================================================================
   CURSOR
   ================================================================ */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* ================================================================
   TRANSITION
   ================================================================ */
.transition      { transition: var(--transition) !important; }
.transition-slow { transition: var(--transition-slow) !important; }
.transition-none { transition: none !important; }

/* ================================================================
   SHADOW
   ================================================================ */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow    { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-none { box-shadow: none !important; }

/* ================================================================
   VISIBILITY
   ================================================================ */
.visible   { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* Accessible hide (keeps element in document flow for screen readers) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}
