/* ============================================================
   LPK BEAUTY — BASE CSS
   Version: 1.0
   Variables, Reset, Typography, Layout
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
  /* ============ COLORS — Background ============ */
  --bg-body:        #FFFFFF;
  --bg-subtle:      #FAFAFA;
  --bg-hover:       #F4F4F5;
  --bg-active:      #E4E4E7;
  --bg-inverse:     #18181B;
  
  /* ============ COLORS — Border ============ */
  --border:         #E4E4E7;
  --border-strong:  #D4D4D8;
  --border-subtle:  #F4F4F5;
  
  /* ============ COLORS — Text ============ */
  --text-primary:   #18181B;
  --text-secondary: #52525B;
  --text-muted:     #A1A1AA;
  --text-inverse:   #FAFAFA;
  
  /* ============ COLORS — Accent (Warm Monochrome) ============ */
  --accent:         #292524;
  --accent-hover:   #1C1917;
  --accent-subtle:  #F5F5F4;
  --accent-text:    #FFFFFF;
  
  /* ============ COLORS — Status ============ */
  --success:        #15803D;
  --success-bg:     #F0FDF4;
  --success-border: #BBF7D0;
  
  --warning:        #A16207;
  --warning-bg:     #FEFCE8;
  --warning-border: #FEF08A;
  
  --danger:         #B91C1C;
  --danger-bg:      #FEF2F2;
  --danger-border:  #FECACA;
  
  --info:           #1D4ED8;
  --info-bg:        #EFF6FF;
  --info-border:    #BFDBFE;
  
  /* ============ SHADOWS ============ */
  --shadow-xs:  0 1px 2px 0 rgba(0,0,0,0.03);
  --shadow-sm:  0 1px 3px 0 rgba(0,0,0,0.06);
  --shadow:     0 2px 8px -1px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 24px -4px rgba(0,0,0,0.08);
  --shadow-xl:  0 16px 40px -8px rgba(0,0,0,0.12);
  
  /* ============ RADIUS ============ */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius:      8px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;
  
  /* ============ SPACING ============ */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  
  /* ============ TRANSITION ============ */
  --transition-fast: 0.12s ease;
  --transition:      0.18s ease;
  --transition-slow: 0.3s ease;
  
  /* ============ LAYOUT ============ */
  --sidebar-width: 240px;
  --header-height: 60px;
  --content-max-width: 1280px;
}

/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

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

strong, b {
  font-weight: 600;
  color: var(--text-primary);
}

small {
  font-size: 12px;
  color: var(--text-muted);
}

code, pre {
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
  font-size: 13px;
}

/* ============================================================
   4. FORM ELEMENTS (BASE)
   ============================================================ */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

/* ============================================================
   5. SVG
   ============================================================ */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
  width: 16px;
  height: 16px;
}

/* ============================================================
   6. LAYOUT — APP SHELL
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-body);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-header {
  height: var(--header-height);
  background: var(--bg-body);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-4);
}

.app-content {
  padding: var(--space-6);
  max-width: var(--content-max-width);
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* ============================================================
   7. PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.page-header-left {
  min-width: 0;
  flex: 1;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ============================================================
   8. UTILITY CLASSES
   ============================================================ */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.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;
}

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

.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

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

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

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

/* ============================================================
   9. SCROLLBAR (subtle)
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   10. SELECTION
   ============================================================ */
::selection {
  background: var(--accent);
  color: var(--accent-text);
}

/* ============================================================
   11. FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   12. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .app-content {
    padding: var(--space-4);
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  
  .app-sidebar.open {
    transform: translateX(0);
  }
  
  .app-main {
    margin-left: 0;
  }
  
  .app-header {
    padding: 0 var(--space-4);
  }
  
  .app-content {
    padding: var(--space-4);
  }
  
  .page-title {
    font-size: 20px;
  }
  
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
  }
