/* T2 centralized theme layer. ORIGINAL is the default: this file is inert until data-erp-theme="orange-black". */
:root[data-erp-theme="orange-black"] {
  --theme-primary: #ff5a00;
  --theme-primary-dark: #b93400;
  --theme-page: #fff8f4;
  --theme-surface: #ffffff;
  --theme-text: #000000;
  --theme-muted: #5f514b;
  --theme-heading: #000000;
  --theme-border: #efc9b5;
  --theme-hover: #fff0e6;
  --theme-selected: #ffe0cc;
  --theme-shadow: rgba(112, 35, 0, .16);
}

:root[data-erp-theme="orange-black"] body { background: var(--theme-page); color: var(--theme-text); }
:root[data-erp-theme="orange-black"] .topbar,
:root[data-erp-theme="orange-black"] .login-panel,
:root[data-erp-theme="orange-black"] .editor-panel,
:root[data-erp-theme="orange-black"] .workspace-card,
:root[data-erp-theme="orange-black"] .mobile-app-screen,
:root[data-erp-theme="orange-black"] .mobile-app-card { background: var(--theme-surface); color: var(--theme-text); }
:root[data-erp-theme="orange-black"] .login-brand,
:root[data-erp-theme="orange-black"] .sidebar,
:root[data-erp-theme="orange-black"] .button-primary,
:root[data-erp-theme="orange-black"] .mobile-app-button-primary { background: var(--theme-primary); color: #fff; }
:root[data-erp-theme="orange-black"] .workspace-card:before,
:root[data-erp-theme="orange-black"] .button-primary:hover { background: var(--theme-primary-dark); }
:root[data-erp-theme="orange-black"] h1,
:root[data-erp-theme="orange-black"] h2,
:root[data-erp-theme="orange-black"] h3,
:root[data-erp-theme="orange-black"] .workspace-card strong { color: var(--theme-heading); }
:root[data-erp-theme="orange-black"] button,
:root[data-erp-theme="orange-black"] a { color: var(--theme-primary-dark); }
:root[data-erp-theme="orange-black"] input,
:root[data-erp-theme="orange-black"] select,
:root[data-erp-theme="orange-black"] textarea,
:root[data-erp-theme="orange-black"] .workspace-card,
:root[data-erp-theme="orange-black"] .editor-panel,
:root[data-erp-theme="orange-black"] .mobile-app-card { border-color: var(--theme-border); }
:root[data-erp-theme="orange-black"] .theme-preview-panel { color: var(--theme-text); }

/* The preview control is local-only and never changes server or organization state. */
.theme-preview-panel { position: fixed; right: 16px; bottom: 16px; z-index: 2000; display: none; width: min(300px, calc(100vw - 32px)); padding: 14px; border: 1px solid #d9e2df; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px rgba(0,0,0,.16); font: 12px/1.4 Inter,Segoe UI,Arial,sans-serif; }
.theme-preview-panel[ data-visible="true"] { display: block; }
.theme-preview-panel h2 { margin: 0 0 8px; font-size: 15px; }
.theme-preview-panel p { margin: 0 0 10px; color: #60716e; }
.theme-preview-panel .theme-preview-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.theme-preview-panel button { min-height: 34px; padding: 7px 10px; border: 1px solid #cbd8d4; border-radius: 7px; background: #fff; cursor: pointer; }
.theme-preview-panel button[data-theme-choice="orange-black"] { border-color: #ff5a00; color: #b93400; }
.theme-preview-panel button[data-theme-choice="original"] { color: #102c31; }
