* {
  box-sizing: border-box;
}

/************* main css ********************/

html body {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
}

/* Color Theme */
:root {
  /* ========= Brand ========= */
  --color-primary: #3367e8;
  --color-primary-hover: #2954c8;
  --color-primary-light: #eef4ff;
  --color-primary-border: #c7d7ff;

  /* ========= Background ========= */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-hover: #fcfcfd;

  /* ========= Text ========= */
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-text-inverse: #ffffff;

  /* ========= Border ========= */
  --color-border: #e5e7eb;
  --color-border-light: #f1f5f9;
  --color-divider: #eef2f7;

  /* ========= Status ========= */
  --color-success: #10b981;
  --color-success-light: #ecfdf5;

  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;

  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;

  --color-info: #0ea5e9;
  --color-info-light: #f0f9ff;

  /* ========= Disabled ========= */
  --color-disabled-bg: #f3f4f6;
  --color-disabled-text: #9ca3af;
  --color-disabled-border: #e5e7eb;

  /* ========= Overlay ========= */
  --color-backdrop-light: rgba(255, 255, 255, 0.55);
  --color-backdrop-dark: rgba(15, 23, 42, 0.45);

  --color-black: #000;
  --color-white: #fff;
}

/* ==========================================================
   Light Theme
========================================================== */

:root[data-theme="light"] {
  /* ========= Brand ========= */
  --color-primary: #3367e8;
  --color-primary-hover: #2954c8;
  --color-primary-light: #eef4ff;
  --color-primary-border: #c7d7ff;

  /* ========= Background ========= */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-hover: #fcfcfd;

  /* ========= Text ========= */
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-text-inverse: #ffffff;

  /* ========= Border ========= */
  --color-border: #e5e7eb;
  --color-border-light: #f1f5f9;
  --color-divider: #eef2f7;

  /* ========= Status ========= */
  --color-success: #10b981;
  --color-success-light: #ecfdf5;

  --color-warning: #f59e0b;
  --color-warning-light: #fffbeb;

  --color-danger: #ef4444;
  --color-danger-light: #fef2f2;

  --color-info: #0ea5e9;
  --color-info-light: #f0f9ff;

  /* ========= Disabled ========= */
  --color-disabled-bg: #f3f4f6;
  --color-disabled-text: #9ca3af;
  --color-disabled-border: #e5e7eb;

  /* ========= Overlay ========= */
  --color-backdrop-light: rgba(255, 255, 255, 0.55);
  --color-backdrop-dark: rgba(15, 23, 42, 0.45);
}

/* ==========================================================
   Dark Theme
========================================================== */

:root[data-theme="dark"] {
  /* ========= Brand ========= */
  --color-primary: #4f7df5;
  --color-primary-hover: #3d6ef2;
  --color-primary-light: rgba(79, 125, 245, 0.15);
  --color-primary-border: rgba(79, 125, 245, 0.35);

  /* ========= Background ========= */
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-hover: #273449;

  /* ========= Text ========= */
  --color-text: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #111827;

  /* ========= Border ========= */
  --color-border: #334155;
  --color-border-light: #475569;
  --color-divider: #263243;

  /* ========= Status ========= */

  --color-success: #22c55e;
  --color-success-light: #163824;

  --color-warning: #fbbf24;
  --color-warning-light: #3d2f0a;

  --color-danger: #f87171;
  --color-danger-light: #3b1d22;

  --color-info: #38bdf8;
  --color-info-light: #0d3343;

  /* ========= Disabled ========= */
  --color-disabled-bg: #1e293b;
  --color-disabled-text: #64748b;
  --color-disabled-border: #334155;

  /* ========= Overlay ========= */
  --color-backdrop-light: rgba(255, 255, 255, 0.08);
  --color-backdrop-dark: rgba(2, 6, 23, 0.7);
}

/* ========= Effects ========= */
:root {
  /* ========= Shadows ========= */
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 4px 10px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 24px rgba(17, 24, 39, 0.1);

  /* ========= Border Radius ========= */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* ========= Transition ========= */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* font  */
:root {
  /* ========= Font Family ========= */
  --font-family: "Figtree", sans-serif;

  /* ========= Font Sizes ========= */
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-md: 14px; /* Default */
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-size-5xl: 36px;

  /* ========= Font Weights ========= */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ========= Line Heights ========= */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* ========= Letter Spacing ========= */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.02em;
}

body {
  background-color: var(--color-bg);
  font-family: var(--font-family);
}

html {
  font-size: calc(16px * var(--font-scale));
}

/* Global Thin Scrollbar - Webkit (Chrome, Edge, Safari) */
/* ========= Scrollbar ========= */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-border-light);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 2px solid var(--color-border-light);
  border-radius: 999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

::-webkit-scrollbar-thumb:active {
  background: var(--color-primary-hover);
}

::-webkit-scrollbar-corner {
  background: var(--color-border-light);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 var(--color-border-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-border);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

* {
  scrollbar-color: var(--color-primary-border) var(--color-border-light);
}

/* outlet  */
.outlet-container {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}

/* ---------------------------------------------------
         Animations( Side Nav and Side panel)
  ---------------------------------------------------- */
/* .page-side-panel {
  overflow: hidden;
  transition:
    flex-basis 0.6s ease,
    margin-left 0.6s ease,
    padding-left 0.6s ease,
    opacity 0.6s ease;
}

.page-side-panel.closed {
  opacity: 0;
  pointer-events: none;
}

.page-side-panel.open {
  opacity: 1;
}

.page-side-panel.resizing {
  transition: none !important;
} */

.page-side-panel {
  overflow: hidden;
  /* transition: opacity 0.6s ease; */
  transition: transform 0.6s ease;
  transform: translateX(0);
}

.page-side-panel.closed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

.page-side-panel.open {
  /* opacity: 1; */
  transform: translateX(0);
}

.page-side-panel.resizing {
  transition: none !important;
}

.side-nav-menu {
  overflow: hidden;
  transition:
    width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.side-nav-menu.closed {
  width: 0 !important;
  opacity: 0;
  pointer-events: none;
}

.side-nav-menu.open {
  opacity: 1;
}

.side-nav-menu.resizing {
  transition: none !important;
}

/* fade-in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 400ms ease-in-out;
}
