/* ============================================
   SOLFACIL Admin Portal — Self-hosted fonts
   Inter v20 + JetBrains Mono v24 (woff2)
   ============================================ */

/* Inter — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter — vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* Inter — greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Inter — greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* Inter — cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Inter — cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono — vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* JetBrains Mono — greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* JetBrains Mono — cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* JetBrains Mono — cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrainsmono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ============================================
   SOLFACIL Admin Portal — CSS Variables
   Design tokens extracted from v1.2 spec
   ============================================ */

:root {
  /* Background & Border */
  --bg: #0f1117;
  --card: #1a1d27;
  --border: #2a2d3a;
  --text: #e4e4e7;
  --muted: #9ca3af;

  /* Semantic Colors — 3 groups */
  --positive: #22c55e;        /* Green: savings / generation / online / target met */
  --positive-bg: rgba(34, 197, 94, 0.1);
  --negative: #ef4444;        /* Red: cost / offline / below target */
  --negative-bg: rgba(239, 68, 68, 0.1);
  --neutral: #a855f7;         /* Purple: battery dispatch / VPP / system actions */
  --neutral-bg: rgba(168, 85, 247, 0.1);
  --accent: #3b82f6;          /* Blue: interactive elements / links */
  --accent-bg: rgba(59, 130, 246, 0.1);
  --amber: #f59e0b;           /* Amber: warnings / pending */
  --amber-bg: rgba(245, 158, 11, 0.1);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.1);
  --pink: #ec4899;
  --pink-bg: rgba(236, 72, 153, 0.1);

  /* Fonts */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-data: 'JetBrains Mono', monospace;

  /* Spacing (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-collapsed: 60px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;

  /* ---- P1/P2 Unification Tokens (v6.x visual sync with P3-P5) ---- */

  /* Surface hierarchy */
  --surface-0: var(--bg);          /* page background */
  --surface-1: var(--card);        /* primary cards */
  --surface-2: #1e2130;            /* elevated / hero panels */
  --surface-3: #252839;            /* nested / inset panels */

  /* Shadow system */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);

  /* Extended spacing */
  --space-2xl: 40px;
  --space-3xl: 56px;
}

/* Breakpoints (used as literals in @media — CSS vars not supported in queries)
   --bp-xl: 1440px   (wide desktop — sidebar expands)
   --bp-lg: 1200px   (standard desktop)
   --bp-md: 1024px   (tablet landscape / small laptop — sidebar hidden)
   --bp-sm:  768px   (tablet portrait)
   --bp-xs:  480px   (mobile)
*/

/* Light theme placeholder — same values for now, fill in real light colors later */
[data-theme="light"] {
  --bg: #f8f9fa;
  --card: #ffffff;
  --border: #e2e4e9;
  --text: #1a1d27;
  --muted: #6b7280;
  --positive: #16a34a;
  --positive-bg: rgba(22, 163, 74, 0.1);
  --negative: #dc2626;
  --negative-bg: rgba(220, 38, 38, 0.1);
  --neutral: #9333ea;
  --neutral-bg: rgba(147, 51, 234, 0.1);
  --accent: #2563eb;
  --accent-bg: rgba(37, 99, 235, 0.1);
  --amber: #d97706;
  --amber-bg: rgba(217, 119, 6, 0.1);
  --cyan: #0891b2;
  --cyan-bg: rgba(8, 145, 178, 0.1);
  --pink: #db2777;
  --pink-bg: rgba(219, 39, 119, 0.1);
  --surface-0: #f8f9fa;
  --surface-1: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e8eaee;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
}
