/* ---------------------------------------------------------------------------
   Portal theme variables.

   One selector drives the whole estate: the portal writes a `portal_theme`
   cookie on .eigentrage.com (dark|light) and stamps data-theme on <html>.
   Every dashboard reads that same cookie, so the choice is made once here
   instead of seven times in seven localStorage keys.

   Dark is the default: an unset data-theme resolves to the dark values, so a
   first visit with no cookie renders dark rather than flashing light.
   --------------------------------------------------------------------------- */

:root,
:root[data-theme="dark"] {
    --pf-bg:         #0f0f0f;   /* page background            */
    --pf-surface:    #1a1a1a;   /* cards, panels              */
    --pf-surface-2:  #2a2a2a;   /* raised / hovered surfaces  */
    --pf-fg:         #f0f0f0;   /* primary text               */
    --pf-muted:      #999999;   /* secondary text             */
    --pf-border:     #333333;   /* hairlines                  */
    --pf-border-2:   #444444;   /* stronger dividers          */
}

:root[data-theme="light"] {
    --pf-bg:         #f4f6f8;
    --pf-surface:    #ffffff;
    --pf-surface-2:  #eceff3;
    --pf-fg:         #1c1e21;
    --pf-muted:      #5c6470;
    --pf-border:     #d8dde3;
    --pf-border-2:   #c2c9d2;
}

/* Semantic accents are deliberately theme-independent — success stays green in
   both, so status colours never change meaning when the theme flips. */
:root {
    --pf-success: #2ecc71;
    --pf-danger:  #e74c3c;
    --pf-warning: #f39c12;
    --pf-info:    #3498db;
}

html, body {
    background-color: var(--pf-bg);
    color: var(--pf-fg);
    transition: background-color .15s ease, color .15s ease;
}

/* The two Bootstrap sheets are both loaded; a clientside callback disables the
   one that is not in use. Without this the page briefly paints in whichever
   sheet the browser applied first. */
link[data-bs-sheet][disabled] { display: none; }
