/*
 * Modern Luxury Design System - demo.css
 * Premium CMS styling with glassmorphism and contemporary aesthetics
 ******************************************************************************/

/* ============================================
   DESIGN TOKENS - Modern Luxury Palette
   ============================================ */
:root {
  /* Premium Color Palette */
  --luxury-primary: #2A4B7C;
  --luxury-primary-light: #3D5A8C;
  --luxury-primary-dark: #1F3A60;
  --luxury-accent: #B8860B;
  --luxury-accent-light: #D4A017;

  /* Neutral Tones */
  --luxury-bg: #F8F9FA;
  --luxury-surface: #FFFFFF;
  --luxury-text-primary: #1A1A1A;
  --luxury-text-secondary: #4A4A4A;
  --luxury-text-tertiary: #6B6B6B;

  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.18);

  /* Shadows - Layered for depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   GLOBAL TYPOGRAPHY - Premium Font System
   ============================================ */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
div,
li,
td,
th {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--luxury-text-primary) !important;
  background: linear-gradient(135deg, #F5F5F7 0%, #E8E8EA 100%);
}

/* ============================================
   CARD ENHANCEMENTS - Glassmorphism
   ============================================ */
.card {
  background: var(--glass-bg) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--shadow-md) !important;
  transition: box-shadow var(--transition-fast);
  border-radius: 16px !important;
}

.card:hover {
  box-shadow: var(--shadow-lg) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  padding: 1.5rem !important;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--luxury-text-primary) !important;
}

/* ============================================
   BUTTON SYSTEM - Premium Interactions
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--luxury-primary) 0%, var(--luxury-primary-light) 100%) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(42, 75, 124, 0.3) !important;
  transition: all var(--transition-normal);
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 12px !important;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(42, 75, 124, 0.4) !important;
  background: linear-gradient(135deg, var(--luxury-primary-dark) 0%, var(--luxury-primary) 100%) !important;
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(42, 75, 124, 0.3) !important;
}

/* ============================================
   SIDEBAR - Modern Luxury Navigation
   ============================================ */
.menu .app-brand.demo {
  height: 64px;
  margin-top: 12px;
  padding: 0 1.5rem;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--luxury-primary) 0%, var(--luxury-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Menu Items - Enhanced Visual Hierarchy */
.menu-vertical .menu-item .menu-link {
  color: var(--luxury-text-secondary) !important;
  padding: 0.75rem 1.5rem;
  margin: 0.25rem 0.75rem;
  border-radius: 12px;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.menu-vertical .menu-item .menu-link i.menu-icon {
  color: var(--luxury-text-secondary) !important;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

/* Active State - Premium Highlight */
.menu-vertical .menu-item.active>.menu-link {
  background: linear-gradient(135deg, rgba(42, 75, 124, 0.12) 0%, rgba(42, 75, 124, 0.08) 100%) !important;
  color: var(--luxury-primary) !important;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.menu-vertical .menu-item.active>.menu-link i.menu-icon {
  color: var(--luxury-primary) !important;
}

/* Hover States - Smooth Interactions */
.menu-vertical .menu-item .menu-link:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--luxury-text-primary) !important;
}

.menu-vertical .menu-item .menu-link:hover i.menu-icon {
  color: var(--luxury-primary) !important;
}

/* ============================================
   NAVBAR - Fixed Positioning
   ============================================ */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}

.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

.content-wrapper .navbar {
  z-index: auto;
  background: var(--glass-bg) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-sm) !important;
}

/* ============================================
   FORM ELEMENTS - Modern Input Design
   ============================================ */
.form-control,
.form-select {
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  background: var(--luxury-surface) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--luxury-primary) !important;
  box-shadow: 0 0 0 4px rgba(42, 75, 124, 0.1) !important;
}

/* ============================================
   TABLE ENHANCEMENTS - Clean Data Display
   ============================================ */
.table {
  border-radius: 12px;
  overflow: hidden;
}

.table thead th {
  background: linear-gradient(135deg, rgba(42, 75, 124, 0.08) 0%, rgba(42, 75, 124, 0.04) 100%) !important;
  color: var(--luxury-text-primary) !important;
  font-weight: 600;
  border: none !important;
  padding: 1rem 1.5rem;
}

.table tbody tr {
  transition: all var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(42, 75, 124, 0.04) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.demo-blocks>* {
  display: block !important;
}

.demo-inline-spacing>* {
  margin: 1rem 0.375rem 0 0 !important;
}

.demo-vertical-spacing>* {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
  margin-top: 0 !important;
}

/* ============================================
   RESPONSIVE MOBILE SIDEBAR - Floating Design
   ============================================ */
@media (max-width: 1199.98px) {
  #layout-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    width: 260px !important;
    background: var(--glass-bg) !important;
    backdrop-filter: saturate(180%) blur(40px);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    z-index: 1200 !important;
    transform: translate3d(-100%, 0, 0) !important;
    transition: transform var(--transition-normal) !important;
    display: block !important;
    box-shadow: var(--shadow-xl);
    border-right: 1px solid var(--glass-border);
  }

  /* Show sidebar when expanded */
  html.layout-menu-expanded #layout-menu {
    transform: translate3d(0, 0, 0) !important;
  }

  /* Force content visibility */
  html.layout-menu-expanded .menu-text,
  html.layout-menu-expanded .menu-item,
  html.layout-menu-expanded .app-brand {
    display: block !important;
    opacity: 1 !important;
  }

  html.layout-menu-expanded .app-brand {
    display: flex !important;
  }

  /* Premium Overlay with Blur */
  html.layout-menu-expanded .layout-overlay {
    opacity: 1;
    visibility: visible;
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100;
    transition: all var(--transition-normal);
  }
}

/* ============================================
   RTL SUPPORT
   ============================================ */
.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* ============================================
   LAYOUT DEMO
   ============================================ */
.layout-demo-wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 1rem;
}

.layout-demo-placeholder img {
  width: 900px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

/* ============================================
   ANIMATIONS - Disabled for Performance
   ============================================ */
/* Animations removed for smoother, less distracting experience */

/* ============================================
   SCROLLBAR STYLING - Premium Touch
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--luxury-primary) 0%, var(--luxury-accent) 100%);
  border-radius: 10px;
  transition: all var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--luxury-primary-dark) 0%, var(--luxury-accent-light) 100%);
}