/* ============================================================
   TRX Seafood Wharf — Design System
   CSS Custom Properties (Variables)
   ============================================================ */

:root {
  /* ── Background Colors ── */
  --color-bg-primary:      #2C2C2C;
  --color-bg-secondary:    #3A3A3A;
  --color-bg-tertiary:     #4A4A4A;
  --color-bg-overlay:      rgba(0, 0, 0, 0.6);

  /* ── Accent Colors ── */
  --color-accent-primary:  #00B4D8;
  --color-accent-secondary:#0096C7;
  --color-accent-deep:     #0077B6;
  --color-accent-glow:     rgba(0, 180, 216, 0.25);

  /* ── Text Colors ── */
  --color-text-primary:    #FFFFFF;
  --color-text-secondary:  #B0B8C1;
  --color-text-muted:      #6B7280;
  --color-text-inverse:    #1A1A1A;

  /* ── Semantic Colors ── */
  --color-success:         #2DCE89;
  --color-success-bg:      rgba(45, 206, 137, 0.15);
  --color-warning:         #F6B000;
  --color-warning-bg:      rgba(246, 176, 0, 0.15);
  --color-danger:          #F5365C;
  --color-danger-bg:       rgba(245, 54, 92, 0.15);
  --color-info:            #00B4D8;
  --color-info-bg:         rgba(0, 180, 216, 0.15);

  /* ── Border ── */
  --color-border:          rgba(255, 255, 255, 0.08);
  --color-border-focus:    #00B4D8;
  --color-border-strong:   rgba(255, 255, 255, 0.16);

  /* ── Typography ── */
  --font-family-base:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC',
                           'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
  --font-family-mono:      'SF Mono', 'Fira Code', 'Courier New', monospace;

  --font-size-xs:          0.75rem;    /* 12px */
  --font-size-sm:          0.875rem;   /* 14px */
  --font-size-base:        1rem;       /* 16px */
  --font-size-md:          1.125rem;   /* 18px */
  --font-size-lg:          1.25rem;    /* 20px */
  --font-size-xl:          1.5rem;     /* 24px */
  --font-size-2xl:         1.875rem;   /* 30px */
  --font-size-3xl:         2.25rem;    /* 36px */

  --font-weight-normal:    400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;

  --line-height-tight:     1.25;
  --line-height-normal:    1.5;
  --line-height-relaxed:   1.75;

  /* ── Spacing ── */
  --space-1:   0.25rem;  /* 4px */
  --space-2:   0.5rem;   /* 8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */
  --space-20:  5rem;     /* 80px */

  /* ── Border Radius ── */
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-2xl:   24px;
  --radius-full:  9999px;

  /* ── Shadows ── */
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl:    0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow:  0 0 20px rgba(0, 180, 216, 0.3);
  --shadow-glow-strong: 0 0 32px rgba(0, 180, 216, 0.5);

  /* ── Transitions ── */
  --transition-fast:    150ms ease;
  --transition-base:    250ms ease;
  --transition-slow:    400ms ease;
  --transition-spring:  300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-Index ── */
  --z-base:      0;
  --z-above:     1;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-nav:       300;
  --z-modal:     400;
  --z-toast:     500;
  --z-tooltip:   600;

  /* ── Layout ── */
  --nav-height-top:    64px;
  --nav-height-bottom: 64px;
  --sidebar-width:     240px;
  --content-max-width: 1200px;
  --card-gap:          var(--space-4);
}

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

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

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}

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

a:hover {
  color: var(--color-accent-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ── Focus Ring ── */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* ── Selection ── */
::selection {
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}

/* ── Utility Classes ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-primary    { color: var(--color-text-primary); }
.text-secondary  { color: var(--color-text-secondary); }
.text-muted      { color: var(--color-text-muted); }
.text-accent     { color: var(--color-accent-primary); }
.text-success    { color: var(--color-success); }
.text-warning    { color: var(--color-warning); }
.text-danger     { color: var(--color-danger); }

.text-xs   { font-size: var(--font-size-xs); }
.text-sm   { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg   { font-size: var(--font-size-lg); }
.text-xl   { font-size: var(--font-size-xl); }
.text-2xl  { font-size: var(--font-size-2xl); }

.font-medium   { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold     { font-weight: var(--font-weight-bold); }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.flex-wrap       { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm   { border-radius: var(--radius-sm); }
.rounded-md   { border-radius: var(--radius-md); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
