/* ==========================================================================
   CoolTechDesk SaaS - Core Design System (Vuexy Ultra Advanced)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
  /* Brand Primary Colors */
  --primary: #7367F0;
  --primary-rgb: 115, 103, 240;
  --primary-hover: #5E50EE;
  --primary-light: rgba(115, 103, 240, 0.12);
  --primary-glow: rgba(115, 103, 240, 0.35);

  /* CoolTechDesk Banner Specific Accents */
  --brand-blue: #0284C7;
  --brand-orange: #EA580C;
  --brand-cyan: #06B6D4;
  --brand-dark: #0F172A;

  /* Semantic Colors */
  --secondary: #82868B;
  --secondary-light: rgba(130, 134, 139, 0.12);
  --success: #28C76F;
  --success-light: rgba(40, 199, 111, 0.12);
  --danger: #EA5455;
  --danger-light: rgba(234, 84, 85, 0.12);
  --warning: #FF9F43;
  --warning-light: rgba(255, 159, 67, 0.12);
  --info: #00CFE8;
  --info-light: rgba(0, 207, 232, 0.12);

  /* Light Theme Variables */
  --bg-body: #F8F7FA;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.88);
  --bg-input: #FFFFFF;
  --bg-subtle: #F4F3F7;
  --border-color: #DBDADE;
  --border-subtle: #EBE9F1;
  
  --text-main: #5D596C;
  --text-heading: #33303C;
  --text-muted: #A5A2AD;
  --text-light: #6F6B7D;
  
  --shadow-sm: 0 2px 4px rgba(165, 163, 174, 0.12);
  --shadow-md: 0 4px 18px rgba(165, 163, 174, 0.18);
  --shadow-lg: 0 8px 30px rgba(165, 163, 174, 0.28);
  --shadow-card: 0 2px 12px 0 rgba(76, 78, 100, 0.08);
  --shadow-dropdown: 0 10px 30px rgba(76, 78, 100, 0.16);

  /* Dimensions & Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 84px;
  --header-height: 66px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --font-main: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Public Sans', sans-serif;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-body: #16152B;
  --bg-card: #252342;
  --bg-sidebar: #252342;
  --bg-header: rgba(37, 35, 66, 0.88);
  --bg-input: #2F2B4A;
  --bg-subtle: #1E1B38;
  --border-color: #3B3860;
  --border-subtle: #322E54;
  
  --text-main: #B6B1D8;
  --text-heading: #EAE6FE;
  --text-muted: #7E79A8;
  --text-light: #9B96C7;
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 35px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 4px 18px 0 rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* Color Accent Overrides */
[data-accent="blue"] {
  --primary: #0284C7;
  --primary-rgb: 2, 132, 199;
  --primary-hover: #0369A1;
  --primary-light: rgba(2, 132, 199, 0.14);
  --primary-glow: rgba(2, 132, 199, 0.35);
}

[data-accent="orange"] {
  --primary: #EA580C;
  --primary-rgb: 234, 88, 12;
  --primary-hover: #C2410C;
  --primary-light: rgba(234, 88, 12, 0.14);
  --primary-glow: rgba(234, 88, 12, 0.35);
}

[data-accent="emerald"] {
  --primary: #10B981;
  --primary-rgb: 16, 185, 129;
  --primary-hover: #059669;
  --primary-light: rgba(16, 185, 129, 0.14);
  --primary-glow: rgba(16, 185, 129, 0.35);
}

[data-accent="pink"] {
  --primary: #EC4899;
  --primary-rgb: 236, 72, 153;
  --primary-hover: #DB2777;
  --primary-light: rgba(236, 72, 153, 0.14);
  --primary-glow: rgba(236, 72, 153, 0.35);
}

[data-accent="amber"] {
  --primary: #F59E0B;
  --primary-rgb: 245, 158, 11;
  --primary-hover: #D97706;
  --primary-light: rgba(245, 158, 11, 0.14);
  --primary-glow: rgba(245, 158, 11, 0.35);
}

[data-accent="crimson"] {
  --primary: #EF4444;
  --primary-rgb: 239, 68, 68;
  --primary-hover: #DC2626;
  --primary-light: rgba(239, 68, 68, 0.14);
  --primary-glow: rgba(239, 68, 68, 0.35);
}

[data-accent="indigo"] {
  --primary: #6366F1;
  --primary-rgb: 99, 102, 241;
  --primary-hover: #4F46E5;
  --primary-light: rgba(99, 102, 241, 0.14);
  --primary-glow: rgba(99, 102, 241, 0.35);
}

/* Semi-Dark Sidebar Mode */
body.semi-dark-sidebar .layout-sidebar {
  background: #16152B !important;
  border-right-color: #2F2B4A !important;
}
body.semi-dark-sidebar .layout-sidebar .app-brand-text .brand-name,
body.semi-dark-sidebar .layout-sidebar .menu-text,
body.semi-dark-sidebar .layout-sidebar .menu-header {
  color: #EAE6FE !important;
}
body.semi-dark-sidebar .layout-sidebar .menu-link {
  color: #B6B1D8 !important;
}
body.semi-dark-sidebar .layout-sidebar .menu-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Content Boxed Mode */
body.content-boxed .content-wrapper,
body.content-boxed .layout-navbar,
body.content-boxed .landing-nav,
body.content-boxed .banner-hero-container {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Background Texture Patterns */
body[data-pattern="dots"] {
  background-image: radial-gradient(rgba(115, 103, 240, 0.15) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
}
body[data-pattern="mesh"] {
  background-image: radial-gradient(at 0% 0%, rgba(var(--primary-rgb), 0.12) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(234, 88, 12, 0.08) 0px, transparent 50%) !important;
}

/* Navbar Floating vs Static */
body.navbar-floating .layout-navbar {
  margin: 0.75rem 1.75rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}
body.navbar-static .layout-navbar {
  position: static !important;
}

/* Table Customizer Modifiers */
body.table-compact .table td,
body.table-compact .table th {
  padding: 0.5rem 0.85rem !important;
}
body.table-spacious .table td,
body.table-spacious .table th {
  padding: 1.35rem 1.5rem !important;
}
body.table-zebra-active .table tbody tr:nth-child(even) {
  background-color: var(--bg-subtle) !important;
}

/* Avatar Shapes */
body.avatar-squircle .avatar {
  border-radius: 12px !important;
}
body.avatar-square .avatar {
  border-radius: 6px !important;
}

/* Active Menu Style Modifiers */
body[data-menu-style="border"] .menu-item.active > .menu-link {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  border-left: 4px solid var(--primary) !important;
  box-shadow: none !important;
}
body[data-menu-style="glow"] .menu-item.active > .menu-link {
  background: var(--primary) !important;
  box-shadow: 0 0 20px var(--primary-glow) !important;
}

/* Reset & Global Elements */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.25;
}

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

ul, ol {
  list-style: none;
}

img, svg {
  vertical-align: middle;
  max-width: 100%;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(var(--primary-rgb), 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--primary-rgb), 0.45);
}

/* Layout Root Wrapper */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.layout-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  transition: padding-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-wrapper {
  flex: 1 1 auto;
  padding: 1.5rem 1.75rem;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .content-wrapper {
    padding: 1rem;
  }
}
