/* ═══════════════════════════════════════════════════════════
   THEMES — 5 тем через CSS variables
   Переключение: document.documentElement.dataset.theme = "dracula"
   ═══════════════════════════════════════════════════════════ */

/* ─── GitHub Dark (default) ─── */
:root,
[data-theme="github-dark"] {
    --bg:           #0d1117;
    --bg-elevated:  #161b22;
    --bg-hover:     #1c2128;
    --bg-input:     #0d1117;
    --border:       #30363d;
    --border-hover: #484f58;

    --text:         #e6edf3;
    --text-muted:   #8b949e;
    --text-dim:     #6e7681;

    --accent:       #1f6feb;
    --accent-hover: #388bfd;
    --accent-text:  #ffffff;

    --success:      #3fb950;
    --warning:      #d29922;
    --danger:       #f85149;
    --info:         #58a6ff;

    --status-waiting-bg:  rgba(210,153,34,0.15);
    --status-waiting-fg:  #d29922;
    --status-active-bg:   rgba(88,166,255,0.15);
    --status-active-fg:   #58a6ff;
    --status-done-bg:     rgba(63,185,80,0.15);
    --status-done-fg:     #3fb950;
    --status-timeout-bg:  rgba(248,81,73,0.15);
    --status-timeout-fg:  #f85149;

    --password-fg:  #ff7b72;
    --password-bg:  rgba(255,123,114,0.1);

    --shadow:       0 8px 24px rgba(0,0,0,0.5);
    --shadow-sm:    0 2px 6px rgba(0,0,0,0.3);

    --scrollbar-thumb:        rgba(255,255,255,0.1);
    --scrollbar-thumb-hover:  rgba(255,255,255,0.2);
}

/* ─── GitHub Light ─── */
[data-theme="github-light"] {
    --bg:           #ffffff;
    --bg-elevated:  #f6f8fa;
    --bg-hover:     #eaeef2;
    --bg-input:     #ffffff;
    --border:       #d0d7de;
    --border-hover: #8c959f;

    --text:         #1f2328;
    --text-muted:   #656d76;
    --text-dim:     #8c959f;

    --accent:       #0969da;
    --accent-hover: #218bff;
    --accent-text:  #ffffff;

    --success:      #1a7f37;
    --warning:      #9a6700;
    --danger:       #cf222e;
    --info:         #0969da;

    --status-waiting-bg:  rgba(154,103,0,0.1);
    --status-waiting-fg:  #9a6700;
    --status-active-bg:   rgba(9,105,218,0.1);
    --status-active-fg:   #0969da;
    --status-done-bg:     rgba(26,127,55,0.1);
    --status-done-fg:     #1a7f37;
    --status-timeout-bg:  rgba(207,34,46,0.1);
    --status-timeout-fg:  #cf222e;

    --password-fg:  #cf222e;
    --password-bg:  rgba(207,34,46,0.08);

    --shadow:       0 8px 24px rgba(140,149,159,0.2);
    --shadow-sm:    0 2px 6px rgba(140,149,159,0.15);

    --scrollbar-thumb:        rgba(0,0,0,0.15);
    --scrollbar-thumb-hover:  rgba(0,0,0,0.25);
}

/* ─── Dracula ─── */
[data-theme="dracula"] {
    --bg:           #282a36;
    --bg-elevated:  #343746;
    --bg-hover:     #44475a;
    --bg-input:     #282a36;
    --border:       #44475a;
    --border-hover: #6272a4;

    --text:         #f8f8f2;
    --text-muted:   #bd93f9;
    --text-dim:     #6272a4;

    --accent:       #bd93f9;
    --accent-hover: #ff79c6;
    --accent-text:  #282a36;

    --success:      #50fa7b;
    --warning:      #f1fa8c;
    --danger:       #ff5555;
    --info:         #8be9fd;

    --status-waiting-bg:  rgba(241,250,140,0.15);
    --status-waiting-fg:  #f1fa8c;
    --status-active-bg:   rgba(139,233,253,0.15);
    --status-active-fg:   #8be9fd;
    --status-done-bg:     rgba(80,250,123,0.15);
    --status-done-fg:     #50fa7b;
    --status-timeout-bg:  rgba(255,85,85,0.15);
    --status-timeout-fg:  #ff5555;

    --password-fg:  #ff79c6;
    --password-bg:  rgba(255,121,198,0.1);

    --shadow:       0 8px 24px rgba(0,0,0,0.6);
    --shadow-sm:    0 2px 6px rgba(0,0,0,0.4);

    --scrollbar-thumb:        rgba(189,147,249,0.3);
    --scrollbar-thumb-hover:  rgba(189,147,249,0.5);
}

/* ─── Nord ─── */
[data-theme="nord"] {
    --bg:           #2e3440;
    --bg-elevated:  #3b4252;
    --bg-hover:     #434c5e;
    --bg-input:     #2e3440;
    --border:       #434c5e;
    --border-hover: #4c566a;

    --text:         #eceff4;
    --text-muted:   #d8dee9;
    --text-dim:     #7b88a1;

    --accent:       #88c0d0;
    --accent-hover: #8fbcbb;
    --accent-text:  #2e3440;

    --success:      #a3be8c;
    --warning:      #ebcb8b;
    --danger:       #bf616a;
    --info:         #81a1c1;

    --status-waiting-bg:  rgba(235,203,139,0.15);
    --status-waiting-fg:  #ebcb8b;
    --status-active-bg:   rgba(129,161,193,0.15);
    --status-active-fg:   #81a1c1;
    --status-done-bg:     rgba(163,190,140,0.15);
    --status-done-fg:     #a3be8c;
    --status-timeout-bg:  rgba(191,97,106,0.15);
    --status-timeout-fg:  #bf616a;

    --password-fg:  #bf616a;
    --password-bg:  rgba(191,97,106,0.1);

    --shadow:       0 8px 24px rgba(0,0,0,0.4);
    --shadow-sm:    0 2px 6px rgba(0,0,0,0.25);

    --scrollbar-thumb:        rgba(216,222,233,0.2);
    --scrollbar-thumb-hover:  rgba(216,222,233,0.35);
}

/* ─── Solarized Dark ─── */
[data-theme="solarized-dark"] {
    --bg:           #002b36;
    --bg-elevated:  #073642;
    --bg-hover:     #094552;
    --bg-input:     #002b36;
    --border:       #094552;
    --border-hover: #586e75;

    --text:         #93a1a1;
    --text-muted:   #839496;
    --text-dim:     #657b83;

    --accent:       #268bd2;
    --accent-hover: #2aa198;
    --accent-text:  #fdf6e3;

    --success:      #859900;
    --warning:      #b58900;
    --danger:       #dc322f;
    --info:         #2aa198;

    --status-waiting-bg:  rgba(181,137,0,0.15);
    --status-waiting-fg:  #b58900;
    --status-active-bg:   rgba(38,139,210,0.15);
    --status-active-fg:   #268bd2;
    --status-done-bg:     rgba(133,153,0,0.15);
    --status-done-fg:     #859900;
    --status-timeout-bg:  rgba(220,50,47,0.15);
    --status-timeout-fg:  #dc322f;

    --password-fg:  #d33682;
    --password-bg:  rgba(211,54,130,0.1);

    --shadow:       0 8px 24px rgba(0,0,0,0.5);
    --shadow-sm:    0 2px 6px rgba(0,0,0,0.35);

    --scrollbar-thumb:        rgba(147,161,161,0.25);
    --scrollbar-thumb-hover:  rgba(147,161,161,0.4);
}
