/* board_themes.css — ธีมส่วนตัวของ "หน้าห้องโน้ตรวม" (เลือกเองในเครื่อง เก็บใน localStorage: virrr_board_theme)
   ค่าเริ่มต้น (ไม่มี class) = สีส้มเดิมใน index.php ไม่ถูกแตะ
   ใช้ class บน <body>: bt-on + bt-dark | bt-light | bt-cyber
   ทุกกฎผูกกับ :not(.profile-mode):not(.main-profile-mode) → มีผลเฉพาะหน้าบอร์ด ไม่กระทบโปรไฟล์ห้อง/โปรไฟล์หลัก */

body.bt-dark {
    --bt-bg:#0f1117; --bt-card:#1a1d27; --bt-soft:#262a38; --bt-border:#343a4e;
    --bt-text:#e4e6ee; --bt-sub:#8a90a6; --bt-link:#ffa34d;
    --bt-accent:#ff7a00; --bt-on-accent:#ffffff; --bt-abd:#ff7a00;
}
body.bt-light {
    --bt-bg:#f3f5f9; --bt-card:#ffffff; --bt-soft:#eaeefb; --bt-border:#d3d9e5;
    --bt-text:#1f2430; --bt-sub:#6b7280; --bt-link:#3b57d9;
    --bt-accent:#4f6df5; --bt-on-accent:#ffffff; --bt-abd:#4f6df5;
}
body.bt-cyber {
    --cyber-cyan:#00f0ff;
    --bt-bg:#060810; --bt-card:#0b0d18; --bt-soft:#0b0d18; --bt-border:rgba(0,240,255,0.3);
    --bt-text:#c3cfdb; --bt-sub:#7e8b9b; --bt-link:var(--cyber-cyan);
    --bt-accent:#0b0d18; --bt-on-accent:var(--cyber-cyan); --bt-abd:rgba(0,240,255,0.3);
}

body.bt-line {
    --bt-bg:#f4f5f7; --bt-card:#ffffff; --bt-soft:#dff5e8; --bt-border:transparent;
    --bt-text:#333333; --bt-sub:#888888; --bt-link:#06a84a;
    --bt-accent:#06c755; --bt-on-accent:#ffffff; --bt-abd:#06c755;
    --bt-shadow:0 2px 10px rgba(0,0,0,0.10);
}

/* ---------- พื้นหลัง / ส่วนหัว ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) { background: var(--bt-bg); color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .header { background: var(--bt-accent); color: var(--bt-on-accent); border: 1px solid var(--bt-abd); box-shadow: var(--bt-shadow, none); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .user-info img { border-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-share { background: var(--bt-card); color: var(--bt-link); border: 1px solid var(--bt-border); }

/* ---------- แถบห้อง / สมาชิก ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .capacity-bar,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .members-panel,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .form-card {
    background: var(--bt-card); border: 1px solid var(--bt-border); box-shadow: var(--bt-shadow, none); color: var(--bt-text);
}
body.bt-on:not(.profile-mode):not(.main-profile-mode) .room-name-display,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .capacity-badge,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .members-panel-title { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .room-name-display.placeholder,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .cap-hint,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-you-tag,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-quota { color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-quota.full { color: #ff5c5c; }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-cap-edit { background: var(--bt-soft); color: var(--bt-link); border: 1px dashed var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .cap-settings-box { border-top-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .cap-settings-box input[type="number"],
body.bt-on:not(.profile-mode):not(.main-profile-mode) .room-name-edit-inline input[type="text"] { background: var(--bt-bg); color: var(--bt-text); border: 1px solid var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-cap-save { background: var(--bt-accent); color: var(--bt-on-accent); border: 1px solid var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-cap-unlimited { background: transparent; color: var(--bt-sub); border: 1px solid var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-row { border-bottom-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-name { color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-row img { background: var(--bt-soft); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .member-owner-tag { color: var(--bt-link); }

/* ---------- ช่องพิมพ์โน้ต ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) textarea { background: var(--bt-bg); color: var(--bt-text); border: 1px solid var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) textarea:focus { border-color: var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) textarea::placeholder { color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .file-label,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-sticker-toggle { background: var(--bt-soft); color: var(--bt-link); border: 1px dashed var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-send { background: var(--bt-accent); color: var(--bt-on-accent); border: 1px solid var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-send:disabled { opacity: .5; }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .file-list-preview { background: var(--bt-soft); color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .sticker-picker { background: var(--bt-soft); border-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .sticker-picker button:hover { background: var(--bt-card); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .progress-box { background: var(--bt-soft); border-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .progress-text { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .progress-bar-bg { background: var(--bt-bg); }

/* ---------- การ์ดโน้ต ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-item { background: var(--bt-card); border: 1px solid var(--bt-border); box-shadow: var(--bt-shadow, none); color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { background: var(--bt-soft); border-color: var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .pin-badge { background: var(--bt-accent); color: var(--bt-on-accent); border: 1px solid var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-author { color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-time,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .edited-tag { color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-content,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-text-body { color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-link { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-note-more { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .image-gallery img { border-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .image-gallery.single-image img { background: var(--bt-soft); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .pdf-card { background: var(--bt-soft); border-color: var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .pdf-filename { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-view-pdf { background: var(--bt-accent); color: var(--bt-on-accent); border: 1px solid var(--bt-abd); }

/* ปุ่มไอคอนบนโน้ต */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.share,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.copy,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.edit,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.move,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.share-special { background: var(--bt-soft); color: var(--bt-link); box-shadow: var(--bt-shadow, none); border: 1px solid var(--bt-border); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.pinned-active { background: var(--bt-accent); color: var(--bt-on-accent); border-color: var(--bt-abd); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.delete { color: #ff5c5c; }

/* reaction */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .reaction-chip { background: var(--bt-soft); border-color: var(--bt-border); color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .reaction-chip.active { background: var(--bt-accent); border-color: var(--bt-abd); color: var(--bt-on-accent); }

/* pagination */
body.bt-on:not(.profile-mode):not(.main-profile-mode) #pagination { color: var(--bt-sub); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) #pagination button { background: var(--bt-card); border-color: var(--bt-border); color: var(--bt-link); }

/* footer */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .footer-banner { background: var(--bt-card); border: 1px solid var(--bt-border); box-shadow: var(--bt-shadow, none); color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .banner-text a { color: var(--bt-link); }

/* ป้ายเตือน/ว่างเปล่า */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .empty-note { color: var(--bt-sub); }

/* ---------- ธีม LINE เขียว: ไม่มีกรอบ ใช้เงาบางๆ + มุมโค้ง 12px (ช่องพิมพ์ยังมีเส้นเทาอ่อนเพื่อให้เห็นขอบ) ---------- */
body.bt-line:not(.profile-mode):not(.main-profile-mode) .header,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .capacity-bar,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .members-panel,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .form-card,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .note-item,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .footer-banner { border-radius: 18px; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .header { box-shadow: none; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .note-item { border-width: 0; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { border-width: 1px; border-style: solid; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) textarea,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .cap-settings-box input[type="number"],
body.bt-line:not(.profile-mode):not(.main-profile-mode) .room-name-edit-inline input[type="text"] { background: #fff; border: 1px solid #ddd; border-radius: 8px; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-share,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action { box-shadow: none; }

/* ปุ่มเล็กต่างๆ ให้มีสีเขียวอ่อนชัดเจน (เดิมกลืนกับพื้น) */
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-cap-edit,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .file-label,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-sticker-toggle,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.share,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.copy,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.edit,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.move,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.share-special,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .reaction-chip { background: #dff5e8; color: #058a3e; border: 1px solid transparent; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .reaction-chip.active,
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.pinned-active { background: #06c755; color: #fff; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.delete { color: #ff4d4f; background: #fff0f0; }

/* ---------- Dashboard (ใช้ตัวแปรของธีมที่เลือก) ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-heading,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-title,
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-label { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-num { color: var(--bt-link); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-quota-text { color: var(--bt-text); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .dash-sub { color: var(--bt-sub); }
body.bt-dark:not(.profile-mode):not(.main-profile-mode) .dash-warn,
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .dash-warn { color: #ff8a8a; }

/* ---------- Cybertech: จุดที่ต้องเห็นชัด (ปักหมุด / อีโมจิที่กด) = พื้นทึบสีเดียวกับกรอบธีม ตัวอักษรเข้ม ---------- */
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .btn-icon-action.pinned-active,
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .pin-badge,
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .reaction-chip.active { background: var(--cyber-cyan); color: #05070d; border-color: var(--cyber-cyan); }
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { background: var(--bt-card); border: 1px solid var(--cyber-cyan); }
/* Dashboard: หลอดปกติเป็นสีฟ้าตามธีม (ส้ม/แดงเตือนยังคงไว้เพราะเป็นสัญญาณเตือน) */
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .dash-bar:not(.lv-mid):not(.lv-high) .dash-bar-fill { background: linear-gradient(90deg, #00909b, var(--cyber-cyan)); }

/* ---------- สีสามเหลี่ยมลำดับโน้ตตามธีม ---------- */
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-item { --seq-bw: 1px; --seq-line: var(--bt-border); --seq-bg: var(--bt-accent); --seq-fg: var(--bt-on-accent); }
body.bt-on:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { --seq-line: var(--bt-abd); }
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .note-item { --seq-bg: var(--cyber-cyan); --seq-fg: #05070d; }
body.bt-cyber:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { --seq-line: var(--cyber-cyan); }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .note-item { --seq-bw: 0px; }
body.bt-line:not(.profile-mode):not(.main-profile-mode) .note-item.pinned { --seq-bw: 1px; }