/* ============================================================
   前台皮肤（Skin）· 8 套
   ------------------------------------------------------------
   骨架样式在 app.css，这里只提供「色板 + 圆角 + 阴影」三类变量。
   切换方式：html[data-theme="皮肤键名"]，键名由后台
   「站点设置 → 前台风格」写入 settings.theme，前台布局输出。
   新增皮肤：config/themes.php 里注册一项 + 这里加一段同名定义。

   浅色皮肤：default / paper / sand
   深色皮肤：b1-cyan / b2-blue / b3-amber / b4-silver / b5-magenta
   ============================================================ */

/* ---------- 1. default：蓝色商务（默认，站点初装观感） ---------- */
html[data-theme="default"] {
    --brand: #1a56db;          --brand-dark: #1341a8;
    --brand-ink: #0a1f4d;      --brand-rgb: 26, 86, 219;
    --ink: #0b1220;            --ink-2: #1e2836;
    --muted: #5c6776;          --muted-2: #66707e;
    --line: #e4e8ee;           --line-dark: #d3d9e2;
    --bg: #ffffff;             --bg-alt: #f5f7fa;      --bg-soft: #eef2f8;
    --surface: #ffffff;        --surface-rgb: 255, 255, 255;
    --hero-solid: #0b1220;     --hero-grad-a: #0a1f4d; --hero-grad-b: #0b1220;
    --hero-glow-a: 60, 130, 255; --hero-glow-b: 26, 86, 219;
    --footer-bg: #080d18;
    --on-dark: #ffffff;        --on-dark-rgb: 255, 255, 255;
    --invert-bg: #ffffff;      --invert-bg-hover: #eef3ff; --invert-ink: #0a1f4d;
    --on-brand: #ffffff;
    --shadow-rgb: 11, 18, 32;
    --focus: 0 0 0 3px rgba(26, 86, 219, .12);
    --brand-weak: rgba(26, 86, 219, .35);  --brand-tint: rgba(26, 86, 219, .04);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 12px rgba(11, 18, 32, .04);
    --shadow-md: 0 8px 28px rgba(11, 18, 32, .09);
    --ok-bg: #ecfdf3;          --ok-fg: #067647;       --ok-line: #abefc6;
    --danger: #d92d20;         --danger-bg: #fef3f2;   --danger-fg: #b42318;
    --danger-line: #fecdca;
}

/* ---------- 2. paper：纸白墨蓝（朱红只给按钮与编号） ---------- */
html[data-theme="paper"] {
    --brand: #d6432c;          --brand-dark: #b3351f;
    --brand-ink: #0e2b45;      --brand-rgb: 214, 67, 44;
    --ink: #12212e;            --ink-2: #2c3d4a;
    --muted: #5e6e7a;          --muted-2: #5f676d;
    --line: #e3dfd5;           --line-dark: #d0c9ba;
    --bg: #f7f5f0;             --bg-alt: #efebe2;      --bg-soft: #e8e2d5;
    --surface: #fffdf8;        --surface-rgb: 255, 253, 248;
    --hero-solid: #0e2b45;     --hero-grad-a: #123a57; --hero-grad-b: #0b2238;
    --hero-glow-a: 214, 67, 44; --hero-glow-b: 14, 43, 69;
    --footer-bg: #0b2238;
    --on-dark: #f7f5f0;        --on-dark-rgb: 247, 245, 240;
    --invert-bg: #f7f5f0;      --invert-bg-hover: #e8e2d5; --invert-ink: #0e2b45;
    --on-brand: #fffdf8;
    --shadow-rgb: 40, 30, 20;
    --focus: 0 0 0 3px rgba(214, 67, 44, .16);
    --brand-weak: rgba(214, 67, 44, .40);  --brand-tint: rgba(214, 67, 44, .05);
    --radius: 6px;             --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(40, 30, 20, .05), 0 4px 12px rgba(40, 30, 20, .05);
    --shadow-md: 0 8px 28px rgba(40, 30, 20, .10);
    --ok-bg: #eef5e8;          --ok-fg: #3f6b34;       --ok-line: #c8dcb8;
    --danger: #c0392b;         --danger-bg: #fbf0ee;   --danger-fg: #9c3227;
    --danger-line: #eccdc7;
}

/* ---------- 3. sand：暖沙陶土（大圆角、暖色三层阴影） ---------- */
html[data-theme="sand"] {
    --brand: #be5f2b;          --brand-dark: #9e4a1e;
    --brand-ink: #2f4038;      --brand-rgb: 190, 95, 43;
    --ink: #22302a;            --ink-2: #37473e;
    --muted: #5f6e66;          --muted-2: #5c6865;
    --line: #e4daca;           --line-dark: #d3c6b2;
    --bg: #f0e8db;             --bg-alt: #eae0d0;      --bg-soft: #e2d6c2;
    --surface: #fbf5ea;        --surface-rgb: 251, 245, 234;
    --hero-solid: #2f4038;     --hero-grad-a: #35483f; --hero-grad-b: #26332c;
    --hero-glow-a: 190, 95, 43; --hero-glow-b: 47, 64, 56;
    --footer-bg: #26332c;
    --on-dark: #f2eadf;        --on-dark-rgb: 242, 234, 223;
    --invert-bg: #f2eadf;      --invert-bg-hover: #e2d6c2; --invert-ink: #2f4038;
    --on-brand: #fbf5ea;
    --shadow-rgb: 60, 45, 30;
    --focus: 0 0 0 3px rgba(190, 95, 43, .16);
    --brand-weak: rgba(190, 95, 43, .40);  --brand-tint: rgba(190, 95, 43, .06);
    --radius: 14px;            --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(60, 45, 30, .05), 0 6px 16px rgba(96, 70, 40, .08);
    --shadow-md: 0 12px 36px rgba(96, 70, 40, .14);
    --ok-bg: #eaf3e4;          --ok-fg: #43682f;       --ok-line: #c9ddb8;
    --danger: #b3432c;         --danger-bg: #f9ece7;   --danger-fg: #94351f;
    --danger-line: #e8cdc2;
}

/* ---------- 4. b1-cyan：深场 · 光纤青绿 ---------- */
html[data-theme="b1-cyan"] {
    --brand: #2be8c0;          --brand-dark: #1c7f86;
    --brand-ink: #062a26;      --brand-rgb: 43, 232, 192;
    --ink: #e6eef2;            --ink-2: #c6d5dd;
    --muted: #8fa2af;          --muted-2: #95a8b4;
    --line: rgba(230, 238, 242, .14); --line-dark: rgba(230, 238, 242, .24);
    --bg: #0a0f14;             --bg-alt: #0e151c;      --bg-soft: #121c24;
    --surface: #101821;        --surface-rgb: 16, 24, 33;
    --hero-solid: #070c10;     --hero-grad-a: #0c1a24; --hero-grad-b: #070c10;
    --hero-glow-a: 43, 232, 192; --hero-glow-b: 43, 232, 192;
    --footer-bg: #060a0e;
    --on-dark: #f2f8fa;        --on-dark-rgb: 242, 248, 250;
    --invert-bg: #2be8c0;      --invert-bg-hover: #1c7f86; --invert-ink: #062a26;
    --on-brand: #062a26;
    --shadow-rgb: 0, 0, 0;
    --focus: 0 0 0 3px rgba(43, 232, 192, .28);
    --brand-weak: rgba(43, 232, 192, .42);  --brand-tint: rgba(43, 232, 192, .07);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .30), 0 4px 14px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .50);
    --ok-bg: rgba(43, 232, 192, .12);   --ok-fg: #7df0d8;  --ok-line: rgba(43, 232, 192, .35);
    --danger: #ff8a8a;         --danger-bg: rgba(255, 99, 99, .14);
    --danger-fg: #ffb3b3;      --danger-line: rgba(255, 99, 99, .35);
}

/* ---------- 5. b2-blue：深场 · 电气蓝 ---------- */
html[data-theme="b2-blue"] {
    --brand: #4d9dff;          --brand-dark: #1e5faf;
    --brand-ink: #04121f;      --brand-rgb: 77, 157, 255;
    --ink: #e8f0fa;            --ink-2: #c4d3e4;
    --muted: #8b9cb0;          --muted-2: #93a4b8;
    --line: rgba(232, 240, 250, .14); --line-dark: rgba(232, 240, 250, .24);
    --bg: #070b14;             --bg-alt: #0a101b;      --bg-soft: #0e1826;
    --surface: #0d1420;        --surface-rgb: 13, 20, 32;
    --hero-solid: #05080f;     --hero-grad-a: #0b1830; --hero-grad-b: #05080f;
    --hero-glow-a: 77, 157, 255; --hero-glow-b: 30, 95, 175;
    --footer-bg: #04070d;
    --on-dark: #f2f7ff;        --on-dark-rgb: 242, 247, 255;
    --invert-bg: #4d9dff;      --invert-bg-hover: #1e5faf; --invert-ink: #04121f;
    --on-brand: #04121f;
    --shadow-rgb: 0, 0, 0;
    --focus: 0 0 0 3px rgba(77, 157, 255, .28);
    --brand-weak: rgba(77, 157, 255, .42);  --brand-tint: rgba(77, 157, 255, .07);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .30), 0 4px 14px rgba(0, 0, 0, .35);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .50);
    --ok-bg: rgba(77, 157, 255, .12);   --ok-fg: #a8cdff;  --ok-line: rgba(77, 157, 255, .35);
    --danger: #ff8a8a;         --danger-bg: rgba(255, 99, 99, .14);
    --danger-fg: #ffb3b3;      --danger-line: rgba(255, 99, 99, .35);
}

/* ---------- 6. b3-amber：深场 · 机房琥珀 ---------- */
html[data-theme="b3-amber"] {
    --brand: #f5a524;          --brand-dark: #8a5a10;
    --brand-ink: #1a1206;      --brand-rgb: 245, 165, 36;
    --ink: #f4ede2;            --ink-2: #d8ccbc;
    --muted: #a2937f;          --muted-2: #ab9c88;
    --line: rgba(244, 237, 226, .14); --line-dark: rgba(244, 237, 226, .24);
    --bg: #0c0a08;             --bg-alt: #100d0a;      --bg-soft: #1a140e;
    --surface: #16110c;        --surface-rgb: 22, 17, 12;
    --hero-solid: #080605;     --hero-grad-a: #1a1208; --hero-grad-b: #080605;
    --hero-glow-a: 245, 165, 36; --hero-glow-b: 138, 90, 16;
    --footer-bg: #070504;
    --on-dark: #fdf6ea;        --on-dark-rgb: 253, 246, 234;
    --invert-bg: #f5a524;      --invert-bg-hover: #8a5a10; --invert-ink: #1a1206;
    --on-brand: #1a1206;
    --shadow-rgb: 0, 0, 0;
    --focus: 0 0 0 3px rgba(245, 165, 36, .28);
    --brand-weak: rgba(245, 165, 36, .42);  --brand-tint: rgba(245, 165, 36, .07);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32), 0 4px 14px rgba(0, 0, 0, .36);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .52);
    --ok-bg: rgba(79, 192, 141, .12);   --ok-fg: #8fe0bc;  --ok-line: rgba(79, 192, 141, .32);
    --danger: #ff8a8a;         --danger-bg: rgba(255, 99, 99, .14);
    --danger-fg: #ffb3b3;      --danger-line: rgba(255, 99, 99, .35);
}

/* ---------- 7. b4-silver：深场 · 雾银单色 ---------- */
html[data-theme="b4-silver"] {
    --brand: #d7dbde;          --brand-dark: #6c7276;
    --brand-ink: #121314;      --brand-rgb: 215, 219, 222;
    --ink: #f2f3f4;            --ink-2: #d2d6d9;
    --muted: #8e9296;          --muted-2: #9da1a5;
    --line: rgba(242, 243, 244, .12); --line-dark: rgba(242, 243, 244, .22);
    --bg: #0b0b0c;             --bg-alt: #0f0f11;      --bg-soft: #151517;
    --surface: #121214;        --surface-rgb: 18, 18, 20;
    --hero-solid: #070708;     --hero-grad-a: #121214; --hero-grad-b: #070708;
    --hero-glow-a: 215, 219, 222; --hero-glow-b: 108, 114, 118;
    --footer-bg: #060607;
    --on-dark: #f7f8f8;        --on-dark-rgb: 247, 248, 248;
    --invert-bg: #f2f3f4;      --invert-bg-hover: #d7dbde; --invert-ink: #121314;
    --on-brand: #121314;
    --shadow-rgb: 0, 0, 0;
    --focus: 0 0 0 3px rgba(215, 219, 222, .26);
    --brand-weak: rgba(215, 219, 222, .40); --brand-tint: rgba(215, 219, 222, .06);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32), 0 4px 14px rgba(0, 0, 0, .36);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .52);
    --ok-bg: rgba(180, 220, 200, .12);  --ok-fg: #b8ddc9;  --ok-line: rgba(180, 220, 200, .30);
    --danger: #ff8a8a;         --danger-bg: rgba(255, 99, 99, .14);
    --danger-fg: #ffb3b3;      --danger-line: rgba(255, 99, 99, .35);
}

/* ---------- 8. b5-magenta：深场 · 霓虹品红 ---------- */
html[data-theme="b5-magenta"] {
    --brand: #ff4d9d;          --brand-dark: #a11a5e;
    --brand-ink: #20040f;      --brand-rgb: 255, 77, 157;
    --ink: #f5eaf2;            --ink-2: #dcc8d5;
    --muted: #a396ac;          --muted-2: #ab9cab;
    --line: rgba(245, 234, 242, .14); --line-dark: rgba(245, 234, 242, .24);
    --bg: #0b0810;             --bg-alt: #0f0b17;      --bg-soft: #171023;
    --surface: #130e1b;        --surface-rgb: 19, 14, 27;
    --hero-solid: #07040b;     --hero-grad-a: #1a0e28; --hero-grad-b: #07040b;
    --hero-glow-a: 255, 77, 157; --hero-glow-b: 161, 26, 94;
    --footer-bg: #060309;
    --on-dark: #fdf2f8;        --on-dark-rgb: 253, 242, 248;
    --invert-bg: #ff4d9d;      --invert-bg-hover: #a11a5e; --invert-ink: #20040f;
    --on-brand: #20040f;
    --shadow-rgb: 0, 0, 0;
    --focus: 0 0 0 3px rgba(255, 77, 157, .28);
    --brand-weak: rgba(255, 77, 157, .42);  --brand-tint: rgba(255, 77, 157, .07);
    --radius: 10px;            --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .32), 0 4px 14px rgba(0, 0, 0, .36);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, .52);
    --ok-bg: rgba(79, 192, 141, .12);   --ok-fg: #8fe0bc;  --ok-line: rgba(79, 192, 141, .32);
    --danger: #ff8a8a;         --danger-bg: rgba(255, 99, 99, .14);
    --danger-fg: #ffb3b3;      --danger-line: rgba(255, 99, 99, .35);
}

/* ---------- 深色皮肤下的细节修正 ---------- */
html[data-theme^="b1-"], html[data-theme^="b2-"],
html[data-theme^="b3-"], html[data-theme^="b4-"],
html[data-theme^="b5-"] {
    color-scheme: dark;
}
/* 深色皮肤里输入框/下拉需要用深色原生控件 */
html[data-theme^="b1-"] .form input,
html[data-theme^="b1-"] .form textarea,
html[data-theme^="b1-"] .form select,
html[data-theme^="b2-"] .form input,
html[data-theme^="b2-"] .form textarea,
html[data-theme^="b2-"] .form select,
html[data-theme^="b3-"] .form input,
html[data-theme^="b3-"] .form textarea,
html[data-theme^="b3-"] .form select,
html[data-theme^="b4-"] .form input,
html[data-theme^="b4-"] .form textarea,
html[data-theme^="b4-"] .form select,
html[data-theme^="b5-"] .form input,
html[data-theme^="b5-"] .form textarea,
html[data-theme^="b5-"] .form select {
    color-scheme: dark;
}
/* 深色皮肤里品牌色按钮需要一点发光感，浅色皮肤不需要 */
html[data-theme^="b1-"] .btn-primary,
html[data-theme^="b2-"] .btn-primary,
html[data-theme^="b3-"] .btn-primary,
html[data-theme^="b4-"] .btn-primary,
html[data-theme^="b5-"] .btn-primary {
    box-shadow: 0 6px 22px -6px rgba(var(--brand-rgb), .55);
}
