/* ─────────────────────────────────────────────────────────────
   توکن‌های رنگ — مستقیما از MyColors.dart استخراج شده‌اند.
   تم روشن روی html[data-theme="light"] و تم تیره روی "dark".
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'IRANYekanX';
  src: url('../fonts/IRANYekanX-Light.woff2') format('woff2'),
       url('../fonts/IRANYekanX-Light.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IRANYekanX';
  src: url('../fonts/IRANYekanX-Medium.woff2') format('woff2'),
       url('../fonts/IRANYekanX-Medium.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* رنگ‌های ثابت در هر دو تم */
  --primary:            #344955;   /* color_primary  (production: #223651) */
  --primary-dark:       #232f34;   /* color_primary_dark (production: #182536) */
  --text-always-white:  #fbfbfb;
  --text-always-black:  #333333;
  --hint:               #9aa2a7;
  --silver:             #c0c0c0;
  --gold:               #ffd700;
  --green:              #00796b;
  --light-green:        #4caf50;
  --red:                #e53935;

  /* رنگ‌های معنایی اسناد */
  --sell:            #2196f3;
  --buy:             #f44336;
  --recive:          #4caf50;
  --pay:             #ff9800;
  --input:           #2196f3;
  --output:          #f44336;
  --back-from-buy:   #8d6e63;
  --back-from-sell:  #78909c;
  --main-group:      #104d8a;
  --sub-group:       #1976d2;
  --advanced:        #64b5f6;

  /* اندازه و ریتم */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --appbar-h: 56px;
  --bottombar-h: 60px;
  --drawer-w: 288px;
  --gap: 8px;

  --shadow-1: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-2: 0 4px 14px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-3: 0 12px 34px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.08);

  /* منحنی‌های حرکتی — معادل Curves در فلاتر */
  --ease-standard: cubic-bezier(.2, 0, 0, 1);      /* Curves.easeInOutCubicEmphasized */
  --ease-out:      cubic-bezier(.05, .7, .1, 1);   /* Curves.easeOutCubic */
  --ease-in:       cubic-bezier(.3, 0, .8, .15);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1); /* حالت فنری برای FAB و دیالوگ */
  --dur-fast: 140ms;
  --dur-mid:  240ms;
  --dur-slow: 380ms;
}

html[data-theme='light'] {
  --attention:         #faab1a;
  --attention-reverse: #03dac6;
  --text-black:        #000000;
  --text-gray:         #888888;
  --text-white:        #edf0f2;
  --bg-white:          #fafafa;
  --bg-light:          #edf0f2;
  --bg-gray:           #e3e3e3;
  --scrim:             rgba(0, 0, 0, .42);
  --skeleton:          linear-gradient(90deg, #e6e9ec 25%, #f2f4f6 37%, #e6e9ec 63%);
  color-scheme: light;
}

html[data-theme='dark'] {
  --attention:         #03dac6;
  --attention-reverse: #faab1a;
  --text-black:        #edf0f2;
  --text-gray:         #edf0f2;
  --text-white:        #edf0f2;
  --bg-white:          #161616;
  --bg-light:          #1d1d1d;
  --bg-gray:           #383838;
  --scrim:             rgba(0, 0, 0, .62);
  --skeleton:          linear-gradient(90deg, #222 25%, #2c2c2c 37%, #222 63%);
  color-scheme: dark;
}
